Suppress and Answer Event Triggered iLogic Forms

Suppress and Answer Event Triggered iLogic Forms

amirandaL4VAC
Advocate Advocate
407 Views
4 Replies
Message 1 of 5

Suppress and Answer Event Triggered iLogic Forms

amirandaL4VAC
Advocate
Advocate

I have an iLogic code that automatically creates new drawings from our standard template. We also have an event trigger for new drawing documents that runs a rule in which a user has to fill out a form. How can I tell my iLogic code to anticipate this trigger and fill out the form with pre-determined answers? I don't want to have to fill it out for every created drawing. 

0 Likes
408 Views
4 Replies
Replies (4)
Message 2 of 5

WCrihfield
Mentor
Mentor

Is it really an iLogic form that pops-up, or is it just something like InputBox, InputListBox, InputRadioBox type pop-up prompts?  If it is an iLogic form, we would not be able to access that form to fill stuff in on it by code.  But the stuff shown in a form is usually just iProperties and/or Parameters, which we could access by code without the form, as long as the code knows which ones that need to be worked with, and what values to input as their values.  It's sort of an either/or situation though.  How would you determine when you want the form to show, and when you want the form to not show and to go ahead and fill stuff in without any prompting?  What event is being used to run that rule that shows the form?  Maybe that rule that you have at that event trigger could include extra code before it shows the form?  Then that early code could attempt to set certain 'default' values before showing the form.  That way when it does show the form, some, if not all data will be filled in, and if anything doesn't look right, it can be edited, or accepted.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 3 of 5

amirandaL4VAC
Advocate
Advocate
Hi @WCrihfield I'm dealing with both a form and an input box. For the form, it links to document parameters, so I would ideally like to say somehow in my code "suppress the form, override the parameters with this". Same with the input box, somehow say "create new drawing, I know it's gonna ask XYZ question, don't show me that, here is the answer". The event trigger is New Document in the Drawings tab. That form actually does already have default values, so really if I could find a way to just click "cancel" on that form that would be great. I think to start, I just need to find a way for my code to identify that a question is being asked or that a form has popped up at all.
0 Likes
Message 4 of 5

WCrihfield
Mentor
Mentor

Hi @amirandaL4VAC.  If the form and the InputBox are both being shown by the same rule that you have under 'New Document' event for all drawings, then it sounds to me like you will need to either edit that rule, or create an alternative rule to replace that rule under that event.  The altered rule, or alternative rule will not have those lines of code in it that show the form, or show the InputBox, and instead just write the needed data to the parameters involved, if any is needed.  There is no simple way to monitor for when an Inventor form is launched, then cancel it; and no simple way to monitor for an InputBox being shown, then cancel it.  If there was a specific condition or multiple conditions where you would want the form and/or InputBox to show, and other/opposing condition(s) where you would not want them to show, then you could probably just incorporate If...Then type statements into the rule around where those lines of code are that show the form or InputBox, then only show them when the conditions are met.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 5 of 5

amirandaL4VAC
Advocate
Advocate
Hi @WCrihfield, is there a way the event triggered rule can note if it was externally triggered by a different rule? Maybe that could be my work around, when it's triggered through some other iLogic code then cancel those dialogs. It would have to be generic though, I wouldn't want it to just be for my current code.
0 Likes