by Clint Brown
I wanted to look at some common error messages in Inventor’s iLogic, and offer some advice on how to get around them.
There are 2 common errors that seem to crop up every now and then, and I thought I would offer some guidance on what the common causes are, and how you can do some basic de-bugging on iLogic.
Error Message One, looks like this “Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))”
This one is a bit of a red herring, as the error message is for an “unspecified error”. From my experience of this error, and from the Customer files I have looked at over the years, the most common causes are actually quite simple to fix.
In most cases I have seen this message pops up during a “File Save”, “File Save As”, a DXF Export (or other file conversion type).
There are a few things to look out for:
- Have you saved the file you are currently working on? Often the code will look at the current file name or file location before saving the file as a different file format etc. If the file has not been saved, it will not have a file name or save location.
- Do you have permission to write the file to the location specified in the code? Often iLogic code will contain a save path, you need to ensure that EVERY user that is using this code has permission to write to the save location
- Does the save path exist? Some code will specify a location for the files to be saved in, if the physical folders do not exist, you will
Error Message Two, looks like this “The active Level of Detail in YourAssembly.iam is not a custom Level of Detail”
This is a pretty easy one to solve too. This error message is a bit friendlier, as it is actually telling us what is wrong. It is being flagged up because the Level of Detail is set to Master. Master Levels of Detail (in most instances) cannot be changed though iLogic, the best practice is to create a Custom Level of Detail called “iLogic” and to set your model to this LOD before running any rules. This will avoid the error message.
From memory, I seem to remember that Inventor 2012 would also throw a .NET error (Unhandled Exception) if you tried to change the model when the LOD was set to “MASTER” the same workflow above applies.