Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I had trouble finding an example, so I thought I'd post one here for future reference:
' a reference to the assembly component definintion.
Dim oAsmCompDef As AssemblyComponentDefinition
oAsmCompDef = ThisApplication.ActiveDocument.ComponentDefinition
sName = "Constraint1"
Dim oConstraint As AssemblyConstraint
oConstraint = oAsmCompDef.Constraints.Item(sName)
oInput = InputRadioBox("Select one", "Mate", "Flush", True, "ilogic")
If oInput = False
'convert to Flush
oConstraint = oConstraint.ConvertToFlushConstraint( oConstraint.EntityOne, oConstraint.EntityTwo, 0)
Else
'Convert to Mate
oConstraint = oConstraint.ConvertToMateConstraint( oConstraint.EntityOne, oConstraint.EntityTwo, 0)
End If
oConstraint.Name = sName
Join me at AU 2026
MFG1053: AI Tips and Tricks for iLogic and the Inventor API
MFG2514: A Panel of Experts on Rule Management and Automation Excellence
Solved! Go to Solution.