#1
|
||||
|
||||
Suppress Error Messages???
Hi,
we are trying to build a kind of CAD worker that loads an Annotation Drawing and it's owning 3D Model from Workgroup Manager, then updates the text references in the drawing (that's where we need the model for), and then creates a pdf. We can do all actions except the loading of the drawing. We use the command Code:
(sd-uwgm-element-load "A0046550.mi") Code:
(oli::sd-call-cmds(AM_LOAD_DRAWING :FILENAME "g:/.wgm/.ws/ourwindchillservername/Parts/myannotationdrawing.mi")) My question: is there a Lisp trick to press the OK button of the error message, or prevent the error message from getting in the way?? That way, we can go on with our Lisp macro... The reason: although the command fails, at least it gets the drawing from Windchill to the workspace, so we can get it from there afterwards with AM_LOAD_DRAWING, that is, if we could get rid of the error message... The weird (good) thing is that a 3D model loads nicely with Code:
(sd-uwgm-element-load "A0046550.sdpc") Thanks for any suggestion! Jaap |
#2
|
||||
|
||||
Re: Suppress Error Messages???
Good news, problem solved. By putting the command in a function it suddenly worked. Something like:
Code:
(defun loadfromwgm (elementname) (sd-uwgm-element-load elementname) ) (loadfromwgm "A0046550.mi") |
#3
|
|||
|
|||
Re: Suppress Error Messages???
Hi Jaap,
I'm trying to do something simular, and I also get the same error "Illegal call to action routine". I also tried your alternative, but I get the same error again. Did you found some other way to solve this problem, or somebody else? This error indeed only comes with mi-files and not with sdac or sdpc files. Thanks in advance |
#4
|
||||
|
||||
Re: Suppress Error Messages???
Sorry, no. I do know that wherever possible sd-call-cmds should be used, but this can only be done from within functions / sd-defdialog. So, when typing stuff in the command line, it won't work. Nice thing about sd-call-cmds is that the :failure and :success options often work :-)
|
#5
|
|||
|
|||
Re: Suppress Error Messages???
I retried this today and found a working solution for me.
make a lisp file with only this code in it. Code:
(progn (sd-uwgm-element-load (sd-uwgm-element-exists "number.mi")) ) Do not put this between other code or it will not work. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|