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

iLogic Check End of Part

eugenio_fU5HMF
Contributor

iLogic Check End of Part

eugenio_fU5HMF
Contributor
Contributor

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

0 Likes
Reply
Accepted solutions (1)
192 Views
4 Replies
Replies (4)

Gabriel_Watson
Mentor
Mentor

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:")

 

eugenio_fU5HMF
Contributor
Contributor

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?

0 Likes

Gabriel_Watson
Mentor
Mentor
Accepted solution

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

 

eugenio_fU5HMF
Contributor
Contributor

Thanks so much.

 

Regards,