Inventor

No, You Can't Do That: Enforcing Standards with iLogic

6 Apr, 2011 By: Paul Harrison

IMAGINiT Tricks Tutorial: Use this Autodesk Inventor functionality to ensure that all your designs are compliant.


Editor's note: This tutorial courtesy of IMAGINiT Technologies.
 

Are you having a hard time enforcing your design group's modeling standards? In this tutorial, I'll show you how to use Inventor's iLogic functionality to make sure your designs are compliant — every time.

Why Templates?

If your design group is creating parts that are similar to one another, you can save a great deal of time by creating a "head-start" template. If every part you make starts with a rectangular extrusion, why not create a template containing the extrusion and save yourself a few minutes every day? It's easy to do this in Inventor — just model up the template you'd like to work with and navigate to Inventor's Save As menu. There, you'll find the Save Copy As Template command. This will allow you to save off your template in the appropriate location.


The Save Copy As Template command.


Building Smart Templates

Now that you've cut down on some repetitive modeling, let's take things to the next level: standards compliance. Since we're working with a common template, it's easy to embed rules in our parts that enforce our design group's standards. With a few simple clicks, we can use Inventor's iLogic technology to build "smart" templates that will alert the user to any non-compliant geometry.

Preparing the part. The first thing we'll need to do is add parameters to our parts in an intelligent way. We'll be writing rules to monitor these parameters; for instance, if a part always needs to be less than five inches in length, we'll create a rule that keeps an eye on our Length parameter. Sometimes we'll need to monitor dimensions that aren't necessarily model parameters. In this case, we'll need to create driven dimensions and monitor the associated reference parameters.

Let's take a look at an example. I'd like to create a template for the adapter fitting seen here, which changes dimensions based on the fitting and plate sizes.


Adapter assembly.
 


It's important that the fitting and adaptor do not interfere; as a result, we need to maintain 1" of clearance around the fitting. In order to monitor this distance, I need to create a driven dimension.

Here, you can see the reference parameter that I've created using the Driven Dimension tool. Note that I renamed this dimension using the Parameters dialog box.


The driven dimension that we'll be monitoring.


Embedding rules. Now that we've got our parameter all set, it's time to embed an iLogic rule into our template. Click Add Rule on the Manage tab to open up the iLogic Rule Editor. You'll need to give your rule a name — remember to be descriptive!



In most rules, the first thing we'll be doing is creating a logical statement. In a nutshell, we're just translating the logic you would use while making design decisions into a format that Inventor can understand. In our adaptor example, the real-world logic that I'd like to translate goes like this:

If the distance between the fitting and the part's edge is less than 1", we can't make the part.

 


Since the distance between the fitting and the part's edge is described by the reference parameter we created above, it's easy to see how we can put this statement in Inventor's language. In order to do this, press the If…Then…End If button on the rule editor's toolbar. This will provide a template for our logical statement.

From here, it's just a matter of filling in the blanks:

If Clearance < 1 Then
'We can't make the part
End If

The last thing we need to do is tell Inventor what to do if we can't make the part. Since we are enforcing standards, let's have Inventor display an error message if the clearance distance is less than 1". First, position your cursor on the second line of your rule. Then, expand the MessageBox section of the Snippets panel and double-click on the Show snippet. This snippet will tell Inventor to display a message box if the above condition is satisfied. You'll need to replace the Title and Message fields with your own text:

If Clearance < 1 Then
MessageBox.Show("There is not enough clearance.", "Error!")
End If

That's it! The iLogic rule is finished. Press OK at the bottom-right of the screen and give your rule a try. We can see the dialog box that our iLogic rule has generated.

From here, it's just a matter of saving the file as a template. With just a few lines of code, we've created a smart template that will actively enforce our design group's standards. This tutorial is only the tip of the iceberg — using iLogic, we can monitor and enforce things like part color, weight, and more.
 


About the Author: Paul Harrison


Add comment

Note: Comments are moderated and will appear live after approval by the site moderator.

AutoCAD Tips!

Lynn Allen

Autodesk Technical Evangelist Lynn Allen guides you through a different AutoCAD feature in every edition of her popular "Circles and Lines" tutorial series. For even more AutoCAD how-to, check out Lynn's quick tips in the Cadalyst Video Gallery. Subscribe to Cadalyst's Tips & Tricks Tuesdays free e-newsletter and we'll notify you every time a new video tip is available. All exclusively from Cadalyst!
Follow Lynn on Twitter Follow Lynn on Twitter


Latest News from Cadalyst Partners
Feed
Autodesk Gallery Powers of Design Exhibit: 10**15 Cat's Eye Nebula   23 May, 2013

I work out of our office on One Market Street in San Francisco. My standup-desk is right across from our Gallery at One Market. One of our newer...More>>Read more It's Alive in the Lab blog posts>>

Feed
Load ‘Em Up! Stackers, Conveyors, and Advanced Assembly   23 May, 2013

Mineral resources come out of the ground and are then processed into energy, fertilizer, steel, and so on. We all kind of knew that already. But...More>>Read more PTC Creo blog posts>>

Feed
Excel Hyperlinks & Document Management Tricks   22 May, 2013

Do you have to keep track of a lot of different folders and files? Do you wish you peers could open the correct Revit file? Are you tired of having...More>>Read more BIMbuilder blog posts>>

Feed
New Certification Logos And Certificate Designs Available   23 May, 2013

Every few years we undergo a redesign of our logos and certificate backgrounds which is done to keep them looking fresh.  This week we released the...More>>Read more SolidWorks Blog posts>>

Feed
Cool Tools of Doom n’ Stuff: Episode 22   23 May, 2013

Have the cicadas been hassling you all week? Perhaps its just time you try a new bean paste? Either way, we’ve got you covered with...More>>Read more SolidSmack blog posts>>

Poll
What type of input device (besides the keyboard) do you use at your primary CAD workstation?
Standard mouse
Trackball mouse
Programmable mouse
3D navigation device
Pen/tablet
Multiple devices
Submit Vote




Considering Wide Format Printing Solutions?
Four FREE White Papers Available:






Subscribe Cadalyst Newsletters