iLogic to detect bad iPart members

iLogic to detect bad iPart members

Alexrose1942
Advocate Advocate
157 Views
1 Reply
Message 1 of 2

iLogic to detect bad iPart members

Alexrose1942
Advocate
Advocate

I need an iLogic rule that switches through all iPart members and detects which ones have errors/warnings.

Currently using oFactory.DefaultRow = tableRow to switch members, but can't reliably detect problematic ones that show error dialogs or browser warning icons.

What's the best way to automatically identify bad iPart members?

Need final output: "Good: X, Bad: Y" with list of problem members.

showing here error message that i want to "count" 

Inventor_2025-07-27_11-29-36.png

 Thanks!

0 Likes
158 Views
1 Reply
Reply (1)
Message 2 of 2

WCrihfield
Mentor
Mentor

Hi @Alexrose1942.  I honestly don't use iParts or iAssemblies any more, but I may be able to suggest a couple things that you could try.  There are multiple settings within Inventor, and within the 'iLogic' realm for avoiding dialogs.  On of those settings is a 'per rule' setting, and you can check it when editing that rule, and go to the Options tab within the editor dialog.  There is an option there named 'Silent Operation' which you can turn on by checking the checkbox next to it.  There is also a similar setting for effecting everything done by iLogic accross all rules, and there is also an Inventor application level setting, but those should not be necessary here.

Next, try using a Try...Catch...End Try statement within your iLogic rule, and place that line of code that sets the 'default row' within the 'Try' side of it.  Maybe declare a Boolean Type variable just before that point, and set its default value to False.  That Boolean will represent...when it gets set to True, the member is 'bad/errors'.  Then, on the 'Catch' side of the statement, set the value of that Boolean variable to True, indicating an error 'was caused, but allowed your rule to continue past it'.  Not sure if that will work, or if it will still throw an exception through all of that, but it would be worth testing.  After the Try statement is finished, you can check the value of that Boolean, then report its findings whichever way is needed.  You may have to do an update after setting the 'default row', to be sure. 

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes