Marleen Paul Valery
In last week's blog. I created an iLogic rule that changed the length, width, and thickness of a board for the template I use in my woodworking projects. It also turned the tenon joint on and off, as well as setting the dimensions of the tenon.
But, while effective, the rule could be refined to make it more effective. This is especially true when looked at with respect to ease of use.
So in this blog post, we don't make the rule. We make the rule better.
How do we do that? We create a dialog box, or form, that makes the rule easier to interact with. It puts all the critical inputs in one simple, easy to use interface.
The board with the form open. |
To create the form, right click in the iLogic Browser, and choose "Add Form"
Adding the new form |
Drag from left to tight to build the form. |
We'll also set up two types of triggers. This will help control when the form is displayed.
The first, is an Event Trigger that will start the form when the template starts.
The second, will fire the form when the iLogic "iTrigger" icon is clicked. This will let us fire the rule, "at will".
In order to create the iTrigger functionality, add a new rule by clicking "Add Rule" from the iLogic Panel on the Manage tab.
The :"Add Rule" icon |
trigger = iTrigger0
'Shows form named "Board Options"
iLogicForm.Show("Board Options")
Where "Board Options" is the name of the form created.
Now this rule will fire when the 'iTrigger" icon is clicked.
Next, we add an "Event Trigger" which fires the rule when the template starts.
Selecting the Event Trigger |
Setting the rule to fire when the template starts. |
Have more ideas? Leave a comment!
P.S. If you'd like to download the part used for this blog post. It's located on the GrabCAD website here!
Could you be so kind and share some links to other resources dedicated to this topic in case you are aware of any.
ReplyDeleteHi, I would like to know how I could use ilogiForm.show("") to show global forms?
ReplyDeleteHmm. I tried it on my machine at work (Inventor 2015), and it errors out on me. I can't say for sure, but it sounds like it doesn't do it. :/
DeleteIs it something you can use an event trigger for?