Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Component Visibility iLogic

1 REPLY 1
Reply
Message 1 of 2
Anonymous
1634 Views, 1 Reply

Component Visibility iLogic

I have some parts in a subassembly that I want to make invisible. When I input my iLogic code(that I used hundreds of times before) the part is made invisible in the subassembly only if I open the subassembly. When I go back to the parent assembly it still shows the part visible. Here is a sample of my code:

 

If ACCESS_DOOR = "NO DOOR" Then

Component.InventorComponent("INSPECTION DOOR:1").BOMStructure=BOMStructureEnum.kReferenceBOMStructure
Component.Visible("INSPECTION DOOR:1") = False

Else If ACCESS_DOOR = "12X12X6" Then

	Component.InventorComponent("INSPECTION DOOR:1").BOMStructure=BOMStructureEnum.kDefaultBOMStructure
	Component.Visible("INSPECTION DOOR:1") = True
	Parameter("ACCESS DOOR GASKET:1", "HORIZ_DOOR_SIZE") = 12
	Parameter("ACCESS DOOR:1", "HORIZ_DOOR_SIZE") = 12
	Parameter("ACCESS DOOR BACK PLT:1", "HORIZ_DOOR_SIZE") = 12
	Parameter("ACCESS DOOR GASKET:1", "HORIZ_DOOR_SIZE2") = 6
	Parameter("ACCESS DOOR:1", "HORIZ_DOOR_SIZE2") = 6
	Parameter("ACCESS DOOR BACK PLT:1", "HORIZ_DOOR_SIZE2") = 6
	Parameter("ACCESS DOOR GASKET:1", "VERT_DOOR_SIZE") = 12
	Parameter("ACCESS DOOR:1", "VERT_DOOR_SIZE") = 12
	Parameter("ACCESS DOOR BACK PLT:1", "VERT_DOOR_SIZE") = 12
	Component.Visible("ACCESS DOOR STUD:2")= False
	Component.Visible("ACCESS DOOR CLAMP:2") = False
	Component.Visible("ACCESS DOOR HANDLE:2") = False
	Component.Visible("ACCESS DOOR STUD:8") = False 
	Component.Visible("ACCESS DOOR CLAMP:8") = False
	Component.Visible("ACCESS DOOR HANDLE:8") = False
	Parameter("ACCESS DOOR:1", "SIDE_CLAMP_OFFSET") = "5.625"
	Parameter("ACCESS DOOR:1", "LOWER_CLAMP_OFFSET") = "1.5"
	Parameter("ACCESS DOOR:1", "UPPER_CLAMP_OFFSET") = "3"

Else If ACCESS_DOOR = "16X16X9" Then

	Component.InventorComponent("INSPECTION DOOR:1").BOMStructure=BOMStructureEnum.kDefaultBOMStructure
	Component.Visible("INSPECTION DOOR:1") = True
	Parameter("ACCESS DOOR GASKET:1", "HORIZ_DOOR_SIZE") = 16
	Parameter("ACCESS DOOR:1", "HORIZ_DOOR_SIZE") = 16
	Parameter("ACCESS DOOR BACK PLT:1", "HORIZ_DOOR_SIZE") = 16
	Parameter("ACCESS DOOR GASKET:1", "HORIZ_DOOR_SIZE2") = 9
	Parameter("ACCESS DOOR:1", "HORIZ_DOOR_SIZE2") = 9
	Parameter("ACCESS DOOR BACK PLT:1", "HORIZ_DOOR_SIZE2") = 9
	Parameter("ACCESS DOOR GASKET:1", "VERT_DOOR_SIZE") = 16
	Parameter("ACCESS DOOR:1", "VERT_DOOR_SIZE") = 16
	Parameter("ACCESS DOOR BACK PLT:1", "VERT_DOOR_SIZE") = 16
	Component.Visible("ACCESS DOOR STUD:2") = True
	Component.Visible("ACCESS DOOR CLAMP:2") = True
	Component.Visible("ACCESS DOOR HANDLE:2") = True
	Component.Visible("ACCESS DOOR STUD:8") = True 
	Component.Visible("ACCESS DOOR CLAMP:8") = True
	Component.Visible("ACCESS DOOR HANDLE:8") = True
	Parameter("ACCESS DOOR:1", "SIDE_CLAMP_OFFSET") = "7"
	Parameter("ACCESS DOOR:1", "LOWER_CLAMP_OFFSET") = "3"
	Parameter("ACCESS DOOR:1", "UPPER_CLAMP_OFFSET") = "6"

End If

 The components I'm referring to are the components "Component.Visible("ACCESS DOOR STUD:2") = True" for the stud,clamp, and handle. Any help with this will be much appreciated. It's driving me a little crazy.

1 REPLY 1
Message 2 of 2
Anonymous
in reply to: Anonymous

Hi,
In parent assembly, create an ilogic, which should control your "Sub Assembly Parameter = ACCESS_DOOR"
Example:
Parameter("XXX:1", "ACCESS_DOOR") = "12X12X6"
Check out and reply....

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report