Case not working in Master Assembly

Case not working in Master Assembly

christof.gosselin
Contributor Contributor
253 Views
1 Reply
Message 1 of 2

Case not working in Master Assembly

christof.gosselin
Contributor
Contributor

Hi all, 

 

I'm working on a product configurator for our company and would like to automate the flanged connection. In the master assembly i have a reference to a sub assembly where the flane is placed (See picture)

christofgosselin_0-1655798035335.png

i also coded this part so the FFG_Connection is the same in the master assembly as in the sub assembly .

christofgosselin_1-1655798086171.pngchristofgosselin_2-1655798093279.png

in the sub assembly i made a case for the flanges (See picture)

christofgosselin_3-1655798134405.png

and now if i run the code in the MASTER ASSEMBLY it doesn't seem to work? is there something that i am missing?

christofgosselin_4-1655798177779.png

christofgosselin_5-1655798183823.png

 

hope someone can help 🙂 

 

Christof 

 

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

dalton98
Collaborator
Collaborator

I cant see an obvious problem. I'm assuming the different case components represent the same part. So you unsuppress the one you want shown. It might work if you try 'ManageComponents', this doesn't require any suppression, but you do have to name your geometry mates. Here's an example from a course I took on iLogic:

ThisAssembly.BeginManage("Group 1")
If BitType = "Flat"
	Dim componentB = Components.Add("Bit", "screwdriver_bit_Flat.ipt")
ElseIf BitType = "Robertson"
	Dim componentB = Components.Add("Bit", "screwdriver_bit_Robertson.ipt")
ElseIf BitType = "TorxSmall"
	Dim componentB = Components.Add("Bit", "screwdriver_bit_TorxSmall.ipt")
ElseIf BitType = "TorxStandard"
	Dim componentB = Components.Add("Bit", "screwdriver_bit_TorxStandard.ipt")

End If
ThisAssembly.EndManage("Group 1")

Constraints.AddMate("Mate1", "Bit", "MateFace2", "screwdriver_body:1", "MateFace2")
Constraints.AddMate("Mate2", "Bit", "Work Point2", "screwdriver_body:1", "Work Point2")

'iProperties.InstanceValue("Part1:1", "PropertyName_Text") = "5"
0 Likes