We have ilogic code that is triggered to run on a save.
But whenever we do a save as on a part or assembly, it also triggers the code to run for the initial save as and then again for the save after we've made the changes.
Is there any way to skip running all the code on the save as?
Mostly just trying to stop it from running so that it doesn't slow us down running multiple times when we don't need it to.
Hi @acanx21. Are yo using the Event Triggers dialog, or custom event handler code? If you are using the Event Triggers dialog, then are you using the 'before save' event, or 'after save' event? Does the code that gets ran when the event happens have instructions within it to save the document? If so, you may need to remove that from the code. If that is not the problem, you may have to use the more complicated route of creating custom event handler code for this task.
Wesley Crihfield
(Not an Autodesk Employee)
I am currently using the Event Triggers dialog.
It's set to the Before Save event because the code changes iproperties within the part when saved and setting it to run after save made the part dirty and needing to save again.
Does the rule include instructions to save the document? If so, that will cause 2 saves. Because the trigger means that a save is already about to happen, but this code is simply running before that save happens. Once the rule finishes it will continue to save on its own.
Wesley Crihfield
(Not an Autodesk Employee)
Can't find what you're looking for? Ask the community or share your knowledge.