Imports System Imports NXOpen Imports NXOpen.UF Imports NXOpen.Utilities Module scan_wp Dim sess As Session = Session.GetSession() Dim ufs As UFSession = UFSession.GetUFSession() Dim lw As ListingWindow = sess.ListingWindow Sub Main() Dim wp As Part = sess.Parts.Work Dim candidate As Tag = Tag.Null Dim nloop As Integer = 0 lw.Open() lw.WriteLine("=========== Objects in Work Part ===========") Do nloop += 1 candidate = ufs.Obj.CycleAll(wp.Tag, candidate) If candidate = NXOpen.Tag.Null Then Exit Sub lw.WriteLine("object " & nloop & " " & NXObjectManager.Get(candidate).ToString) Loop Until candidate = NXOpen.Tag.Null lw.WriteLine("============== End of Program ==============") End Sub End Module