Showing results for 
Search instead for 
Do you mean 

Get XYZ point coordinates from PointTag

Having used the


method (in C#), returns the tag of the created point feature as the output. This variable is simply called "NewPointTag" in my case.


What I would like to do is print the XYZ coordinates of the newly created point to the listing window.


For example,


 seems to return the point object, but ".Coordinates" does not work.


How can I access the coordinates?




Re: Get XYZ point coordinates from PointTag

[ Edited ]

Here's one method:

You can use the .GetTaggedObject method to get the point object from the tag. Once you have the point object, you can access its .Coordinates property to get the XYZ values.

Re: Get XYZ point coordinates from PointTag

As is often the case in NX, there is more than one way to acoomplish this. Cowski has pointed out one.  Another method if you have the tag is to call the wrapper method for UF_CURVE_ask_point_data().  It takes the tag as the input, and provides an array of three doubles for the output relative to the Absolute coordinate system.

Re: Get XYZ point coordinates from PointTag

Thank you both, I've used the latter approach now and it works nicely!

For C#:

theUFSession.Curve.AskPointData(NewPointTag, point_coords)