View Single Post
  #4  
Old 12-05-2016, 05:43 PM
Andy Poulsen Andy Poulsen is offline
Administrator
 
Join Date: Apr 2003
Location: Fort Collins, Colorado
Posts: 273
Re: sd-return-to-model-checkpoint function

Thanks for the additional information.

I'm not totally sure why it would be giving you the error. However, one thing that I noticed that's different from the way I usually do things is that you're using sd-call-cmds to call your own function that then calls the Modeling commands.

The way I'd usually do that is in the push-action for doit_p, just call test_process, and then in the test_process function do something like this
Code:
(test_process ()
  (sd-call-cmds (position_pa ...  ))
  (sd-call-cmds (position_pa ...  ))
  (sd-call-cmds (other_modeling_function ....))
  )
This allows you to check the status at each step of the process to make sure you got the result you were expecting (and I believe it's more the way sd-call-cmds was intended to be used).

Also, I don't believe you need to include the :done in your position_pa function. Even though I don't believe it will cause an error, I don't think it does anything, either.

I hope this helps -- please let me know if you have more questions.

Thanks!

andy
__________________
Andy Poulsen
AI MAXTools: Dream. Design. Done. It's that easy!
Add-ins bringing new functionality and speed to Creo Elements/Direct and CoCreate products. Now available for v17-v20+!
See them in action at www.ai-maxtools.com and then try them for yourself -- FREE!
Reply With Quote