Good morning, Friends,
Is there a way to select all suppressed constraints, similar to select all suppressed components?
I have an automation project which suppresses and un-suppresses a lot of constraints as needed.
At the end of the project generation, I'd like to delete all the suppressed constraints.
Ideally, I'd like to go back into each component, from the top level assembly, to perform this.
Thank You, Al
Solved! Go to Solution.
Solved by Andrii_Humeniuk. Go to Solution.
Hi @al.popovich . This rule looks for a suppressed constraint and removes it:
Sub main
Dim oDoc As Document = ThisDoc.Document
If Not TypeOf oDoc Is AssemblyDocument Then Exit Sub
Dim oAsmDoc As AssemblyDocument = oDoc
Dim oCnsts As AssemblyConstraints = oAsmDoc.ComponentDefinition.Constraints
If oCnsts.Count = 0 Then Exit Sub
For Each oCnst As AssemblyConstraint In oCnsts
If oCnst.Suppressed Then oCnst.Delete()
Next
End Sub
Andrii Humeniuk - CAD Coordinator, Autodesk Certified Instructor
LinkedIn | My free Inventor Addin | My Repositories
Did you find this reply helpful ? If so please use the Accept as Solution/Like.
Can't find what you're looking for? Ask the community or share your knowledge.