05-16-2024
10:31 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
05-16-2024
10:31 AM
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
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
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com