Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Save vs Save As Ilogic Trigger

3 REPLIES 3
Reply
Message 1 of 4
acanx21
199 Views, 3 Replies

Save vs Save As Ilogic Trigger

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. 

Tags (2)
3 REPLIES 3
Message 2 of 4
WCrihfield
in reply to: acanx21

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

EESignature

(Not an Autodesk Employee)

Message 3 of 4
acanx21
in reply to: WCrihfield

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.

Message 4 of 4
WCrihfield
in reply to: acanx21

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

EESignature

(Not an Autodesk Employee)

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report