Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Search for suppressed constraints

2 REPLIES 2
Reply
Message 1 of 3
GeorgK
260 Views, 2 Replies

Search for suppressed constraints

Hello together,

 

how could I search for suppressed constraints and list them in a Listbox.

 

Thank you very much

 

Georg

2 REPLIES 2
Message 2 of 3
Anonymous
in reply to: GeorgK

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

Message 3 of 3
GeorgK
in reply to: Anonymous

Thank you very much. I'll give it a try.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report