Quantcast
Channel: NX Journaling - Journaling / NXOpen API
Viewing all articles
Browse latest Browse all 783

Get coordinates of visible csys

$
0
0

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 
	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.DisplayDim a_body As NXOpen.Tag= NXOpen.Tag.NullDim Name AsStringDim cont_obj asinteger=0 
 lw.open() 
		Dim visibleObjects()As DisplayableObject
		visibleObjects = workPart.Views.WorkView.AskVisibleObjects()ForEach displayableObject As DisplayableObject In visibleObjects   
 
' bodys		IfTypeOf displayableObject Is Body ThenDim 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 CartesianCoordinateSystemelseIfTypeOf displayableObject Is CartesianCoordinateSystem Then'	lw.writeline("GetType: " & displayableObject.GetType.tostring) 
' PointelseIfTypeOf displayableObject Is Point Then'	Dim pointFeature1 As Point = CType(workPart.Features.FindObject(displayableObject.JournalIdentifier), Features.Point)'	lw.writeline("GetType: " & displayableObject.GetType.tostring) 
			EndIfNext 
	EndSub 
EndModule

Viewing all articles
Browse latest Browse all 783

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>