Using iLogic to enable or disable hardware in an iAssembly

Using iLogic to enable or disable hardware in an iAssembly

Anonymous
Not applicable
406 Views
1 Reply
Message 1 of 2

Using iLogic to enable or disable hardware in an iAssembly

Anonymous
Not applicable

I was referred to post to this forum from the Inventor Forum. I have a machine design that I am working on that has 200+ different configurations. I need to generate a model, print and BOM for each machine configuration. This is great, until a change is required that effects the entire product line, such as a logo modification or sheet metal change. To reduce the redundancy, I wanted to use an iAssembly with sub iAssemblies to generate all of the models in 1 file. The table option seemed perfect as I can assign part numbers and the models are generated based on the options in the table. 

 

I however want to limit the items that are in the table to these 4 sub iAssemblies:

 

Transformer (1-10)

Bridge (1-2)

Output Style (1-4)

UI Style (1-3)

 

So when I select Transformer 1, Bridge 1, Output 1 and UI1, I want the model to use iLogic to "know" that Bridge 1 uses 2 cables and 14 fasteners and since Bridge 2 uses uses 3 cables and 21 fasteners, we need to exclude 1 cable and 7 fasterners. 

 

If Component.iComponentIsActive("750650110:1") Then

Component.InventorComponent("RING TERMINAL .25 12-10GA RING TERMINAL .25 12-10GA-Silver:3").Excluded = True
Component.InventorComponent("Plain Washer - Inch 1/4 - Regular - Type B:10").Excluded = True
Component.InventorComponent("Hex Nut - Inch 1/4 - 28:8").Excluded = True
Component.InventorComponent("Split Lock Washer - Inch 0.25:8").Excluded = True
Component.InventorComponent("HHCS - Inch 1/4-28 UNF - 0.75:7").Excluded = True
Component.InventorComponent("Plain Washer - Inch 1/4 - Regular - Type B:8").Excluded = True
Component.InventorComponent("Hex Nut - Inch 1/4 - 28:6").Excluded = True
Component.InventorComponent("Split Lock Washer - Inch 0.25:6").Excluded = True
Component.InventorComponent("HHCS - Inch 1/4-28 UNF - 0.75:6").Excluded = True
Component.InventorComponent("Plain Washer - Inch 1/4 - Regular - Type B:7").Excluded = True
Component.InventorComponent("Hex Nut - Inch 1/4 - 28:5").Excluded = True
Component.InventorComponent("Split Lock Washer - Inch 0.25:5").Excluded = True
Component.InventorComponent("Plain Washer - Inch 1/4 - Regular - Type B:5").Excluded = True
Component.InventorComponent("Hex Nut - Inch 1/4 - 28:3").Excluded = True
Component.InventorComponent("Split Lock Washer - Inch 0.25:3").Excluded = True
Component.InventorComponent("HHCS - Inch 1/4-28 UNF - 0.75:3").Excluded = True
Component.InventorComponent("HHCS - Inch 1/4-28 UNF - 0.75:4").Excluded = True

I have tried this code and it does "hide" the parts that are not supposed to be there, but it does not actually exclude them. When I rebuild the model they reappear. Is the option to exclude parts only linked to a table entry in the iAssembly or can iLogic include or exclude them as well. 

0 Likes
407 Views
1 Reply
Reply (1)
Message 2 of 2

Curtis_Waguespack
Consultant
Consultant

Hi @Anonymous ,

I just noticed you created this duplicate thread here. When doing do please include links so that folks don't spend time answering in two places. But note for the future, you can use the REPORT button to ask the admin staff to move a thread to another forum should you start off in the wrong one.

 

I replied to the old thread before seeing this one:

https://forums.autodesk.com/t5/inventor-forum/using-ilogic-to-exclude-or-include-hardware-in-an-iassembly/td-p/9112375

 

My recommendation is really just to ditch iAssemblies and do this work with iLogic, but I've tried to inform you on the issues and answer your questions more directly than just saying "this is how I would do it". 

 

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

 

EESignature

0 Likes