Community
Hello together,
how could I search for suppressed constraints and list them in a Listbox.
Thank you very much
Georg
In this case you need a userform, a listbox named ListBox1 and a commandbutton named CommandButton1
put the code in the sub CommandButton1_Click() , run the form and press the button
Private Sub CommandButton1_Click()
Dim oAssDoc As AssemblyDocument
Set oAssDoc = ThisApplication.ActiveDocument
Dim oConstraint As AssemblyConstraint
For Each oConstraint In oAssDoc.ComponentDefinition.Constraints
If oConstraint.HealthStatus = kSuppressedHealth Then
Call ListBox1.AddItem(oConstraint.Name)
End If
Next oConstraint
End Sub
Can't find what you're looking for? Ask the community or share your knowledge.