Autodesk Inventor 2019 – Keep your iLogic assembly code tidy - Useful tips

Autodesk Inventor 2019 – Keep your iLogic assembly code tidy - Useful tips

See our overview of the new iLogic features in the two Autodesk Inventor 2019 videos below:

Note: the below videos were created by Excitech prior to becoming Symetri in January 2021, following its acquisition by Addnode Group. All Excitech products, services and solutions mentioned in these recordings are available through Symetri.

Introduction to the additions - 38min 30 seconds onwards

Some examples of how the new features can be used - start until 26 minutes.

Moving on from the above videos, I wanted to blog a few very basic tips for housekeeping your iLogic assembly code - in particular, how to keep the iLogic rule nice and neat once you’ve done the ‘capture current state’ operation (shown at 43 minutes 0 seconds in the first link above).


This operation is fantastic for creating a huge amount of code very quickly, but for future debugging purposes, I’d really recommend going in and cleaning up the code Autodesk Inventor 2019 has helpfully created for you. So what can you do?


1. Consider defining a load of file names at the start of the rule, to keep the rest of the code brief and easy to read. Something like this:

Dim LargeLatch As String = "Penn Elcom-L944-537-10MOL4 [Large Latch & Lock]-Full.ipt"
Dim MedLatch As String = "Penn Elcom-l907-928 [Medium Latch Cranked]-Full.ipt"
Dim LargeHinge As String = "Penn Elcom-P2554Z [Large Hinge]-Full.ipt"
Dim MedHinge As String = "Penn Elcom-P2593 [Medium Hinge]-Full.ipt"

Then replace any file names in the captured code with the shorter variables. 

E.g. replace:

"Penn Elcom-L944-537-10MOL4 [Large Latch & Lock]-Full.ipt" with LargeLatch



2. Whenever you’ve added a component occurrence with ‘Components.Add’, consider letting Autodesk Inventor 2019 give it a ‘default’ name to avoid name conflicts. To do this - you just leave the component name blank (“”), then Autodesk Inventor 2019 will give the component a default name, which is the name of the file (minus the file extension), and a incremented counter (:1, :2, :3 etc.).

So instead of this:

Dim Latch1 = Components.Add("Penn Elcom-L944-537-10MOL4 [Large Latch & Lock]-Full:4", "Penn Elcom-L944-537-10MOL4 [Large Latch & Lock]-Full.ipt")

Use something like this:

Dim Latch1 = Components.Add("",LargeLatch)

Of course, you might want to define a nice short name for the component occurrence, to keep the model browser nice and neat. This can be anything you want, for example: 

Dim Latch1 = Components.Add("L1",LargeLatch)

  

3. If you’ve also captured constraints for the component (instead of just grounding it), consider using the .Name property of the component you just added to create any constraints on it. So using the ‘Latch1’ component we just added as an example: 

Instead of this:

Constraints.AddFlush("Flush:262",
                       "Penn Elcom-L944-537-10MOL4 [Large Latch & Lock]-Full:4,
                       "Work PlaneA", "Master Part:1",
                       "Work PlaneA", -1.5 mm)

Use something like this:

Constraints.AddFlush("",
                       Latch1.Name,
                       "Work PlaneA", "Master Part:1",
                       "Work PlaneA", -1.5 mm)

 
Note, just like with the component names above, you don’t need to tell Autodesk Inventor 2019 what name to give a mate or flush constraint, just let Inventor assign the next available name to the constraint and there’s no chance of conflict with any existing constraint names.


4. Extra credit: The eagle-eyed iLogicians amongst you will have spotted that when you add a component with a statement like this:

Dim Latch1 = Components.Add("",LargeLatch)

‘Latch1’ then gives you access to the ‘component occurrence’ object, which you can do other stuff with, such as 

Latch1.Occurrence.Visible = False

Or 

Latch1.Occurrence.Transparent = True

And loads of other stuff, just by hitting ‘.’ (welcome to the Autodesk Inventor 2019 API, and hooray again for intellisense in iLogic).

Thats all for today. See you next time.


Bluebeam Max: The Superpower Taking Revu Into the AI Era

17 March 2026

The construction industry is entering a new era, and Bluebeam is once again leading the way. In 2026, Bluebeam Max will launch as a new premium subscription that combines the power of Revu with advanced AI technology. This blog highlights just some of features you will expect to see within Bluebeam Max.

How Bluebeam + GoCanvas Are Revolutionising Field Data Capture

27 February 2026

In construction, the gap between the construction site and the office has always been a challenge. But by combining Bluebeam’s powerful PDF markup tools with GoCanvas’s mobile forms, companies can finally achieve seamless documentation that flows effortlessly from site to office.

Which Bluebeam Studio Is Right for You? Cloud vs On-premise

25 February 2026

Collaboration is the backbone of modern construction projects. Whether you’re reviewing drawings, marking up RFIs, or coordinating across multiple stakeholders, having the right platform makes all the difference. This blog reviews Bluebeam Studio (cloud-based) and Bluebeam Studio On-premise. While both enable teams to work together on PDFs in real time, the choice between them depends on your project requirements, IT policies, and security needs.