Hello
I have this jornal that find all visible objects, and work fine for bodys, but now i want find the visible csys to get his coodinates.
I already tried with CartesianCoordinateSystem and with point but till now with no results.
Can someone help me?
Below is the code that i have
Option Strict Off
Imports System
Imports NXOpen
Module csys
Dim theSession As Session = Session.GetSession()
Dim lw As ListingWindow = theSession.ListingWindow()
Dim workPart As Part = theSession.Parts.Work
Sub Main()
Dim displayPart As Part = theSession.Parts.Display
Dim a_body As NXOpen.Tag = NXOpen.Tag.Null
Dim Name As String
Dim cont_obj as integer = 0
lw.open()
Dim visibleObjects() As DisplayableObject
visibleObjects = workPart.Views.WorkView.AskVisibleObjects()
For Each displayableObject As DisplayableObject In visibleObjects
' bodys
If TypeOf displayableObject Is Body Then
Dim bodyFeature1 As Features.BodyFeature = CType(workPart.Features.FindObject(displayableObject.JournalIdentifier), Features.BodyFeature)
' lw.writeline("GetType: " & displayableObject.GetType.tostring)
Name = bodyFeature1.name
cont_obj += 1
' csys CartesianCoordinateSystem
elseIf TypeOf displayableObject Is CartesianCoordinateSystem Then
' lw.writeline("GetType: " & displayableObject.GetType.tostring)
' Point
elseIf TypeOf displayableObject Is Point Then
' Dim pointFeature1 As Point = CType(workPart.Features.FindObject(displayableObject.JournalIdentifier), Features.Point)
' lw.writeline("GetType: " & displayableObject.GetType.tostring)
End If
Next
End Sub
End Module
Solved
It's solved