5 Apr 2023

Quick tests using iLogic

I often need to test something fairly simple on Design Automation, and keep modifying the code. Doing it using an app bundle can be a bit of a hassle: after each change you have to compile the project and upload a new app bundle version.

Design Automation also supports running iLogic even without creating an app bundle. An iLogic code file is much smaller (which is better for uploading too) than an app bundle and don't have to be compiled. 

I was thinking of creating a web app where you can just type in the iLogic code you want to use, but it would be difficult to provide all the functionality (formatting, auto-complete, etc) that is already available in the iLogic rule editor dialog. 

So instead, you can just edit your external rule inside Inventor and use the same file from the web app to run something on Design Automation. You can of course edit the iLogic code file in any editor you want, including notepad 😀 

In order to run iLogic you need to have a document open, so apart from providing an /s parameter in the command line of the activity for the iLogic file, you also need to add an /i for a document you want to open.

You can use a tool like the Buckets Tools or the VS Code Extension to create the bucket the app will be using and upload files into it that you want to work with.

Here is a video showing how the app can be used:

And here is the source code:

The live version: 
You can also use a zip file as input, just name it like so <root file name>.zip - e.g. myAssembly.iam.zip

Related Article

Posted By

Adam Nagy

Follow @AdamTheNagy Adam Nagy joined Autodesk back in 2005 and has been providing programming support, consulting, training and evangelism to external developers. He started his career in Budapest, then worked in Prague for 3 years and now lives in South England, UK. At the moment focusing on Inventor and Fusion 360, plus cloud and mobile related technologies. Adam has a degree in Software Engineering and has...