Replace content center part use ilogic

Replace content center part use ilogic

priteshkumarvinchhi
Community Visitor Community Visitor
189 Views
3 Replies
Message 1 of 4

Replace content center part use ilogic

priteshkumarvinchhi
Community Visitor
Community Visitor

i want to replace part in assembly from content center.

 

Example: i make hole parameter in assembly, i use bolt from content center.

when i change hole size my bolt will be change automatic.

0 Likes
190 Views
3 Replies
Replies (3)
Message 2 of 4

humistonandrew
Participant
Participant

Hello,

 

What i am reading from your request is to have a hole in a part, then in an assembly place and constrain a fastener from the content center. then when the hole is updated the fastener would change to reflect the hole diameter change?

Andrew Humiston
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Likes
Message 3 of 4

Curtis_W
Consultant
Consultant

 

@priteshkumarvinchhi, welcome to the forum.

You can do this using the AddContentCenterPart function. Hope this helps, Curtis

 

  • Rename the CC part in the assembly browser, in order to stabilize the component name
  • Create a new iLogic rule ( if needed) 
  • In the Model tree withing the rule editor, located the CC part and right click on it as shown
  • Select "Capture Current State Components.Add ...."
    • I've selected the one using Designation in this example

Curtis_W_1-1777496333365.png

 

  • It might take a bit as iLogic reads the CC database tables, but eventually it will give you the code to place the CC part
    • Something like this:
    • Dim Hex_Nut = Components.AddContentCenterPart("Hex Nut", "Fasteners:Nuts:Hex", "Heavy Hex Nut - Inch","1/4 - 20")
  • You can then use that to create logic such as this where the user selects from a list, and the selected input is used in the AddContentCenterPart function  
    • Dim oList = New String(){"1/4 - 20", "3/4 - 10"}
      Dim oInput As String = InputListBox("Prompt", oList, oList(0), Title := "iLogic", ListName := "List")
      Dim Hex_Nut = Components.AddContentCenterPart("Hex Nut", "Fasteners:Nuts:Hex", "Heavy Hex Nut - Inch", oInput)

EESignature

0 Likes
Message 4 of 4

Curtis_W
Consultant
Consultant

Or something like this if based on the hole size as humistonandrew suggested.

Dim holeDia As Double = InputBox("Enter Diameter", "iLogic", 0.266)

Parameter("Bottom Board", "Hole1Diameter") = holeDia

Dim Hex_Nut As ManagedComponentOccurrence = Nothing

If holeDia > 0.75 Then
	Hex_Nut = Components.AddContentCenterPart("Hex Nut", "Fasteners:Nuts:Hex", "Heavy Hex Nut - Inch", "3/4 - 10")
Else
	Hex_Nut = Components.AddContentCenterPart("Hex Nut", "Fasteners:Nuts:Hex", "Heavy Hex Nut - Inch", "1/4 - 20")
End If

 

EESignature

0 Likes