Inventor iLogic: Shrink-wrap Substitute Level of Details

Zen Admin
Zen Admin
  • Updated

By Clint Brown

clint_brown_autodesk_inventor_ilogic.png

I've adapted one of the Inventor API samples to work with iLogic, specifically to create Shrinkwrap Substitute Levels of Details (LOD's). In the image above, you see 3 sets of bicycle sprocket assemblies. These models are Substitute LOD representations, based on the code below. The first shows a Substitute LOD with no holes patched, the second shows a patched hole range and the third shows all holes patched.

To give the user a bit more interaction with the options in the code, I created an arraylist, which lets the user select the hole patching options they prefer.  

From the Selection above, if the user selects "Patch a Range" they are presented with 2 input boxes which allow them to specify the range for the hole patching. The defaults are set to 0.5mm (minimum) and 10mm (maximum), but this can be edited in the code. 

Some housekeeping:

You can only create a Substitute LOD from an Assembly, and you can't create an LOD while you are already in one, so I put in a simple error trap that will come up "ON ERROR". This will appear if you are in a part file, or if you already have a substitute LOD active.

The Code is attached below, enjoy!

 

 

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.