#1
|
|||
|
|||
sd-return-to-model-checkpoint function
Hi~
I had programed one add-on apllication and used sd-set-model-checkpoint and sd-return-to-model-checkpoint functions to do return to the initial model state.When I to do that several time,the dialog pushing OK or CANCEL buttons did not to terminate the dialog and Modeling gave a Error message as below.Could anybody tell me why?
__________________
Best regards, Kting |
#2
|
|||
|
|||
Re: sd-return-to-model-checkpoint function
Hi kting,
How are you using it? I don't think I've seen that error message before, but I've seen similar messages when trying to return to a state that no longer exists. Perhaps with a little more detail we can solve it for you. 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! |
#3
|
|||
|
|||
Re: sd-return-to-model-checkpoint function
Andy,
I tried to simplify the program code and found that would not appear the error again.See the attachmenttest11.lsp. In the simplified code it only had to do command position_pa to translate one fixed length alone one direction.And in the old code it had to do command position_pa to translate and rotate and then to do subtract. Maybe it's interrupted between the commands. I could not sure about that.
__________________
Best regards, Kting |
#4
|
|||
|
|||
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 ....)) ) 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! |
#5
|
|||
|
|||
Re: sd-return-to-model-checkpoint function
Andy,
I tried to change the code as your suggestion to use sd-call-cmds in the test_process function and do not include the :done in the position_pa function. Yes, the code was still work. When I go to do that several time again,the dialog pushing OK or CANCEL buttons still did not to terminate the dialog and Modeling gave other Error message as below.
__________________
Best regards, Kting |
#6
|
|||
|
|||
Re: sd-return-to-model-checkpoint function
Interesting.
What do you have in ok-action and cancel-action? I wonder if something there is causing the error. Where do you set the initial state that you're trying to return to? That could be a potential cause of the problem as well.
__________________
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! |
#7
|
|||
|
|||
Re: sd-return-to-model-checkpoint function
The prolem is solved by Andy's warm-hearted help.
And the cause is not right way to use sd-set-model-checkpoint and sd-return-to-model-checkpoint functions in the code.
__________________
Best regards, Kting |
#8
|
||||
|
||||
Re: sd-return-to-model-checkpoint function
Can you share the code? I would like to learn from what you did.
Thanks Tom
__________________
Tom Kirkman Creo Elements/Direct 20.1 Dell Precision 3581 https://www.o-i.com |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|