If you have never used iLogic, but would like to try, I got a nice little code you can try out.
But first, let’s get you started. Follow this little tutorial, and you should be set to go.
(This code will only work in an assembly)
If you got Inventor up and running, go to your iLogic Browser (Manage Tab, iLogic Browser)
Note that the iLogic browser might appear different depending on what version of Inventor you are using.
In ex. 2017 there will be a extra pop-up window, or perhaps a extra section to your Inventor browser, but in
2019 the iLogic browser will appear as a tab in the browser section.
Right click in your browser and choose Add Rule, then name the rule.
Copy and paste the code from the end of this article below. (Or download from link)
Press save, then close the ilogic window.
Right click on the rule and press Run rule (You will need some sick constraints in the assembly for it to work)
***** Start of iLogic *****
Dim oAssDoc As AssemblyDocument
oAssDoc = ThisApplication.ActiveDocument
Dim oConstraint As AssemblyConstraint
RUSure = MessageBox.Show _
("Are you sure you want to Delete all sick constraints?", _
If RUSure = vbNo Then
i = 0
For Each oConstraint In oAssDoc.ComponentDefinition.Constraints
If oConstraint.HealthStatus <> oConstraint.HealthStatus.kUpToDateHealth And _
oConstraint.HealthStatus <> oConstraint.HealthStatus.kSuppressedHealth Then
i = i + 1
MessageBox.Show(" A total of "& i & " constraints were deleted.", "Cad-IT iLogic")
***** End of iLogic *****
Download ZIP containing .txt file with code HERE (Right click, then save as)
Got any comments or questions regarding this post, feel free to leave a reply.