CoCreate User Forum  

Go Back   CoCreate User Forum > Support > Customization

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 09-25-2014, 12:27 AM
jkramer's Avatar
jkramer jkramer is offline
Registered User
 
Join Date: Oct 2002
Location: the Netherlands
Posts: 382
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")
There is a bug in the Workgroup manager: in the Console we see that it uses
Code:
(oli::sd-call-cmds(AM_LOAD_DRAWING :FILENAME "g:/.wgm/.ws/ourwindchillservername/Parts/myannotationdrawing.mi"))
This gives an error "Illegal call to action routine". Probably the sd-call-cmds that they use shouldn't be there, because I get the same error if I manually type in the command, and without sd-call-cmds I get my drawing.
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")
We also found a bug report on ptc.com that bundle files also fail... not good!
Thanks for any suggestion!
Jaap
Reply With Quote
  #2  
Old 09-25-2014, 07:51 AM
jkramer's Avatar
jkramer jkramer is offline
Registered User
 
Join Date: Oct 2002
Location: the Netherlands
Posts: 382
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")
Still weird...
Reply With Quote
  #3  
Old 05-31-2016, 12:26 PM
rvn rvn is offline
Registered User
 
Join Date: Mar 2011
Posts: 52
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
Reply With Quote
  #4  
Old 06-01-2016, 04:56 AM
jkramer's Avatar
jkramer jkramer is offline
Registered User
 
Join Date: Oct 2002
Location: the Netherlands
Posts: 382
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 :-)
Reply With Quote
  #5  
Old 11-08-2016, 10:45 AM
rvn rvn is offline
Registered User
 
Join Date: Mar 2011
Posts: 52
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 anything else in it and open the lisp file in Modeling. Then it works fine. Very strange.
Do not put this between other code or it will not work.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 03:00 AM.



Hosted by SureServer    Forums   Modeling FAQ   Macro Site   Vendor/Contractors   Software Resellers   CoCreate   Gallery   Home   Board Members   Regional User Groups  By-Laws  

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.