- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Just adding constraints is easy enough. But I want to override that constraint (modifying the dimension or suppressing the constraint altogether) in a Positional Representation.
Is it even possible?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
It is possible, just takes a bit of setup to get there.
objDef = ThisDoc.Document.ComponentDefinition
objPosRep = objDef.RepresentationsManager.PositionalRepresentations.Item("PositionName")
colConstraints = objDef.Constraints
objPosRep.SetRelationshipSuppressionOverride(colConstraints.Item("Mate1"), True)
'If you have an object with the constraint creation earlier in your code, you can use that instead of calling the 'constraint by name.
bojPosRep.SetRelationshipValueOverride(colConstraints.Item("Mate1"), kRelationshipOffsetValue, "10 in")
You can explore the majority of Inventor's API (Application Programming Interface) through it's help guide. Just keep in mind that not every feature and add-in is available, and not all that is available can be used in iLogic:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
This code snippet doesn't work when the constraints originate from a composite iMate. Is it possible to suppress constraints within a composite iMate?
Thanks,
john