Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
eugenio_fU5HMF
191 Views, 4 Replies

iLogic Check End of Part

Goodmorning Folks,

I was looking for an Ilogic that give me back an error message if the "end fo part" of an .ipt is not at the bottom of the three.

This can avoid us to forget to move down the "end of part" and be sure the part is complete with all features.

 

Thanks for your help.

 

Ciao

Use the "HealthStatusEnum.kBeyondStopNodeHealth": 
https://help.autodesk.com/view/INVNTOR/2023/ENU/?guid=GUID-58D84911-253B-47F3-ABE7-3BF323CA85AD

 

For example:

 

Dim openDoc As Document
openDoc = ThisDoc.Document
Dim FeatureList As New ArrayList

For Each oFeature In openDoc.ComponentDefinition.Features
    If oFeature.HealthStatus = HealthStatusEnum.kBeyondStopNodeHealth = True  Then
            FeatureList.Add(oFeature.Name)
    End If		
Next

' Count the number of items in the FeatureList array
Dim FeatureCount As Integer
FeatureCount = FeatureList.Count

'Message box (customize this as you wish):
MessageBox.Show(FeatureCount, "Warning, features found below the End of Part marker:")

 

Thanks so much for your solution.

Is it possible to edit this script and receive back the message just if the end of part is up?

Sure, you can modify the prompt any way you like. Add a condition:

 

'Message box (customize this as you wish):
If FeatureCount <> 0  Then
        MessageBox.Show(FeatureCount, "Number of features below End of Part:")
End If

 

Thanks so much.

 

Regards,