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 loop when trigger form 'Before save'

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
rmostertRGQ8T
171 Views, 2 Replies

Save loop when trigger form 'Before save'

Hej, I'm making a Form that let you fill in some iProperties and Revision info (custom properties) when you save. 

I try to do this by trigger an ILogic rule that shows the form 'before saving'. But this does not work as i would like, since the save happens after the rule but BEFORE the form is done. So the info is not saved. 

So i thought "Easy, i let the form save when close."  But that save will trigger the rule to show the form again!!

Is there a way to trigger the form 'before save' and ACTUALLY fill the form BEFORE the save happends, so the filled in info in the form is saved with it?

2 REPLIES 2
Message 2 of 3

I'm puzzling and i'm close to a workaround. I added a costum iProperty(could also be a parameter) which can be true and false. In the rule that shows the form i say "If property = false then and end sub" which the save rule/buton of the form sets on false before saving and true again after saving. This way i bypass opening the form twice. 

I said almost work around since the problem now is that the property, which i set on true AFTER the saving, is not saved when i close and reopen the document. So when i reopen the document, the property is False again and the form will never open. I tryed to put a rule in setting it on True and the rule is triggered when the document is opened. But this does not seem to work, would've been perfect... Anyone knows how to help me?

Message 3 of 3

"I tryed to put a rule in setting it on True and the rule is triggered when the document is opened. But this does not seem to work, would've been perfect..."

I had the rule suppressed so it wouldn't accidentaly run, this will prevent the trigger to run it as well. So after unsuppressing the rule, this workaround workd. Hope this post will help others!

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

Post to forums  

Autodesk Design & Make Report