Anonymous
Earlier this week, KETIV presented the Autodesk Manufacturing Academy. As always, the event was fantastic, and I got to see a lot of fellow Inventor users, and friends as well.
One question that was posed during the session was: "Can I set up an iLogic trigger in such a way, that when I start a new file from a template, the iLogic form will show up automatically?"
The short answer.... Yes!
Here's how it works.
First, the background. I have a template for sizing a wooden board, and determining if it's got a tenon joint or not. The parameters are driven by an iLogic form named "Board Options"
An example of the form and the board it drives |
Since I place these parts in an assembly, and want to resize them, I want the dialog to pop up when I create a new component in an assembly when using this template.
I can't just trigger the dialog box directly, but what I can do is create a rule with a single line of code that opens the dialog box. And I can trigger that rule to run when I start the assembly.
The first step is to create a rule, in this case I named it "Trigger Dialog", and add the following line:
iLogicForm.Show("Board Options")
An example of the iLogic rule with the required code. |
This simple line will open the dialog box, but in order for everything to work as intended, one more thing is required.
An event trigger needs to be added by choosing the "Event Triggers" icon from the iLogic panel. This is found on the Manage tab.
Set the Trigger Dialog rule to run when a new document is started.
Setting up the Event Trigger |
Now, when the file is started from a template, the dialog box, fired by the rule, will open.
And the resizing can begin!
P.S. If you'd like a copy of this file to take a look at, it's available on GrabCAD! Click on this link!