Find us on Google+ Using an iLogic Form to Make a Rule User Friendly in Autodesk Inventor ~ Inventor Tales

Sunday, June 17, 2012

Using an iLogic Form to Make a Rule User Friendly in Autodesk Inventor

“Everything that is simple is theoratically false, everything that is complicated is pragmatically useless.”
 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
Next, drag and drop the desired parameters from left to right to create the form.  That's it!

Drag from left to tight to build the form.
Labels of Parameters can also be changed, so you can make them look exactly the way you want them to.

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
Give the rule a name, and type the following code.

'Fires rule when "iTrigger" icon is clicked
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.
Now of course, this blog post wouldn't be complete without a video!  So here it is!



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!

1 comment:

  1. Could you be so kind and share some links to other resources dedicated to this topic in case you are aware of any.

    ReplyDelete