This gives a nice prompt within the Inventor UI that things are running as planned.
DebuggingĪ quick way of debugging iLogic code is to place message boxes throughout the rule: Turning “Option Explicit on” is one method to eliminate these errors before running the rule. Often, this sort of error can be as simple as a typo caused by an overly complex object name. The above is a good example of a limited number of variables leading to easily maintained code.Īnother tip is regarding named objects you create sometimes in a large iLogic rule, you will find an error, which results in a useless dialogue from the Inventor UI. The easiest way to keep things simple is to limit each method to an absolute maximum of 10 variables. It is not something I would recommend to anyone starting out. When working in iLogic, it is very easy to end up with an enormous codebase and whilst this may seem like “do as I say, not as I do” I have in the past created iLogic routines with 500+ lines of code. I have previously used this tool to discover and subsequently intercept the “file close” and “file save” events for example.
It is worth noting however that without even an Express version of Visual Studio installed, you will receive the following error and be unable to proceed with the installation: Event watcher sampleĪssuming you did have Visual Studio installed one gem in the Developer Tools -> Tools folder is the Event Watcher, a standalone app that is especially useful if you want to see what commands are firing within Inventor when using the Inventor UI. The titles of which should be self-explanatory. This installer contains the following tools: Normally available here:Ĭ:\Users\Public\Documents\Autodesk\Inventor 20#\SDK
One of the most useful (and often overlooked) repositories available to even a seasoned iLogic user is the Inventor SDK. Always make sure to include iLogic in the search string. In particular, the search function (circled above) is one of the best ways to get started. The Inventor API team are always on hand to aid with a specific question and the Expert Elite will occasionally chime in as well.Ī good starting point is the Inventor customization forum:
There is a good chance that somebody on the Autodesk Forums will have either already used the methods available (within iLogic) to do what you want to do with them, or at the very least be able to offer pointers as to how to achieve your goal. When working with Inventor iLogic, it is important to remember that for the most part, none of what you are likely to create will be “entirely new” code. I have included some mentions of the Inventor API and SDK too, since they go hand-in-hand. Here are my Top Ten Inventor iLogic tricks.