by David Gate
When working in Inventor many of our clients produce products that have and offer many variants. Often to model all of these variants is very time consuming, especially if the customer keeps changing there mind.
There are loads of options when creating configurable models. iParts and iAssemblies are one option, Configurator 360 is another, but I find iLogic is the most simple to use.
I have a simple cupboard design that can come with different door and handle combinations. Having an assemble file for each variation would be very time consuming to create, so I modelled 1 variant and then used alittle ilogic code to allow the easy swap of door and handle types.
To accomplish this you need only a few things. Ilogic coding is not complex, If you imagine how you would do that manually then it points you in the direction of how to code it with ilogic.
To do this manually you would open the assembly and replace an existing component with a new one. To do this you would use the Component Replace command and then manually pick then new part.
Well component replace has an ilogic snippet available in the ilogic rule creation.
Component.Replace("current component node name to be removed", "path + new filename to be placed", True)
This obviously requires you to know exactly which part to take out and which to put in.
If you make sure you have the current component’s node name set (ie not the default node name) then this remains the same even after the component replace. So the first part of the code is always static.
But the second part of the code needs to give you a choice rather than always replacing it with a static value.
For it to provide you with sensible options then you could create a multi value list of all the filenames and then you can ilogic a component replace based on the selection from the multivalue list.
Component.Replace("current component node name to be removed", "path + filename picked from multivalue list", True)
To make my code easy I changed the node name of the Doors and Handles to something generic.
Then that little bit of code in an ilogic rule so that the chosen type model is switched in for the existing.
Component.Replace("LH DOOR", "C:\Datasets\Autodesk\Cupboard\Doors\LH Door " & Door_Type & ".ipt", True)
Component.Replace("RH DOOR", "C:\Datasets\Autodesk\Cupboard\Doors\RH Door " & Door_Type & ".ipt", True)
Component.Replace("LH HANDLE", "C:\Datasets\Autodesk\Cupboard\Handles\"& Handle_Type & ".iam", True)
Component.Replace("RH HANDLE", "C:\Datasets\Autodesk\Cupboard\Handles\"& Handle_Type & ".iam", True)
Notice I have combined the path with my chosen parameter and then file extension.
Then alittle form can be used or the Parameters dialog to then alter the model variants.