08-19-2018
07:17 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
08-19-2018
07:17 PM
Can you try below code if it helps:
Dim oCompdef As PartComponentDefinition
oCompdef = ThisDoc.Document.ComponentDefinition
Dim oPane As BrowserPane
oPane = ThisDoc.Document.BrowserPanes("PmDefault")
Dim MsgBody As String
Dim AboveEoP_SkCount As Integer=0
For Each oSketch As Sketch In oCompDef.Sketches
Dim oNode As BrowserNode
oNode = oPane.GetBrowserNodeFromObject(oSketch)
If oNode.Visible And oSketch.HealthStatus <> HealthStatusEnum.kBeyondStopNodeHealth Then
SkCount = AboveEoP_SkCount + 1
MsgBody = MsgBody & " " & oSketch.Name & " - " & oSketch.IsOwnedByFeature & vbCrLf
Else
Exit For
End If
Next
MsgBox (MsgBody,,"Out of " & oCompDef.Sketches.Count & " sketches " & AboveEoP_SkCount & " are placed above EoP: ")
If this solves the problem please click ACCEPT SOLUTION so other people can find it easily.

Rocky Zhang
Inventor API PD
Manufacturing Solutions
Autodesk, Inc.