- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
There is a question from my end, let's assume you have two components that are connected with one constraint, and you want one of that component to be suppressed, now as you know, in Inventor Mate:1 is shared between two components, if you run an iLogic rule that actually checks if the component is suppressed or not and if it is it will suppress its a constraint, but as Mate:1, in this case, is shared and the second component is not suppressed, so the rule will not suppress the constraint.
Think about it and share your thoughts,
For the time being, I have created a code for you that actually checks if the component is suppressed or not and if it is it will suppress its constraints, but if any of the components are not suppressed it will not suppress the constraint.
To check this code, please suppress both the components (which are sharing the same constraint) and then run the rule below. Also, note that you must have to create a custom level of detail to make this work, it will not work in the Master level of detail, if you are not using Inventor 2022.
Dim oDoc As AssemblyDocument = ThisApplication.ActiveDocument Dim oDef As AssemblyComponentDefinition = oDoc.ComponentDefinition Dim oCon As AssemblyConstraint Dim oJon As AssemblyJoint Dim oOcc As ComponentOccurrence Dim i As Integer For Each oOcc In oDef.Occurrences If oOcc.Suppressed = True For Each oCon In oOcc.Constraints oCon.Suppressed = True Next Else If oOcc.Suppressed = False For Each oCon In oOcc.Constraints oCon.Suppressed = False Next End If Next
Hope this helps.
Regards,
Dutt Thakar