Inventor Customization

Reply
Distinguished Contributor
GeorgK
Posts: 132
Registered: ‎09-21-2006
Message 1 of 3 (116 Views)

Search for suppressed constraints

116 Views, 2 Replies
01-16-2013 11:29 PM

Hello together,

 

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

 

Thank you very much

 

Georg

Valued Contributor
Frederic007
Posts: 83
Registered: ‎11-12-2007
Message 2 of 3 (110 Views)

Re: Search for suppressed constraints

01-17-2013 02:05 AM 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

Distinguished Contributor
GeorgK
Posts: 132
Registered: ‎09-21-2006
Message 3 of 3 (90 Views)

Re: Search for suppressed constraints

01-18-2013 02:03 AM in reply to: Frederic007

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

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community


Inventor Exchange Apps

Created by the community for the community, Autodesk Exchange Apps for Autodesk Inventor helps you achieve greater speed, accuracy, and automation from concept to manufacturing.

Connect with Inventor

Twitter

Facebook

Blogs

Pinterest

Youtube