Below is a simple journal that lists sketch info. It may be a starting point to give you what you want.
Option Strict Off
Imports System
Imports NXOpen
Imports NXOpen.Features
Module NXJournal
Sub Main()
Dim s As Session = Session.GetSession()
Dim ui As UI = ui.GetUI()
Dim lw As ListingWindow = s.ListingWindow
lw.Open()
For Each sk As Sketch In s.Parts.Work.Sketches
sk.Highlight()
lw.WriteLine(sk.Name & " (" & sk.ToString() & ")")
lw.WriteLine(" IsInternal: " & sk.IsInternal)
If sk.IsInternal = True Then
lw.WriteLine(" Parent(s)")
For Each feat As Feature In sk.Feature.GetParents
lw.WriteLine(" " & feat.GetFeatureName.ToString)
Next
End If
lw.WriteLine(" IsActive?: " & sk.IsActive)
lw.WriteLine(" IsBlanked?: " & sk.IsBlanked)
lw.WriteLine(" Color: " & sk.Color)
lw.WriteLine(" Layer: " & sk.Layer)
lw.WriteLine(" Font: " & sk.LineFont)
lw.WriteLine(" Width: " & sk.LineWidth)
lw.WriteLine(" Objects:")
Dim objects() As NXObject = sk.GetAllGeometry()
For Each obj As NXObject In objects
lw.WriteLine(" " & obj.Name)
Next
If sk.IsInternal = False And sk.IsBlanked = False Then
ui.NXMessageBox.Show("Information", _
NXMessageBox.DialogType.Information, _
"Sketch " & sk.Name & " is highlighted")
sk.Unhighlight()
ElseIf sk.IsBlanked = True Then
ui.NXMessageBox.Show("Information", _
NXMessageBox.DialogType.Information, _
"Sketch " & sk.Name & " is blanked")
ElseIf sk.IsInternal = True Then
ui.NXMessageBox.Show("Information", _
NXMessageBox.DialogType.Information, _
"Sketch " & sk.Name & " is internal")
End If
Next
End Sub
End Module
Hope this is of some help.
Frank Swinkels