Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Hi @harland.jU5ZCW ,

 

Here is a basic example done with 2023, see attached example files. 

 

bSize = InputRadioBox("Prompt", "Short", "Long", True, Title := "iLogic")

If bSize = True Then
	Dim myBolt = Components.AddContentCenterPart("My Bolt", "Fasteners:Bolts:Countersunk", "AS 1427 - Metric", "M2 x 4", , grounded := True)
Else
	Dim myBolt = Components.AddContentCenterPart("My Bolt", "Fasteners:Bolts:Countersunk", "AS 1427 - Metric", "M2 x 25", grounded := True)
End if
 

 

The easy way to get this code is to extract it:

  • From within a rule in your assembly that has the CC part, right click on the part in the Model tab as shown and choose Capture Current State ( Components.Add)
  • Exit the rule and change the CC part size manually
  • Back in the rule, extract the code using Capture Current State again
  • Create the conditional logic to choose when to use each, etc

Curtis_Waguespack_0-1715880413853.png

 

 

This example uses a grounded component, but one that uses constraints would be similar, but you would choose Capture Current State ( Components Constraints.Add) to extract the constraint code as well

Curtis_Waguespack_1-1715880614673.png

 

 

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