09-30-2024
06:26 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
09-30-2024
06:26 AM
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
Solved! Go to Solution.
09-30-2024
06:56 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
09-30-2024
06:56 AM
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:")
09-30-2024
08:57 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
09-30-2024
08:57 AM
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?
09-30-2024
09:24 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
09-30-2024
09:24 AM
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
09-30-2024
09:49 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report