Showing results for 
Search instead for 
Do you mean 


I use this subroutine many many times, but now I little confused... If I have single part, not assembly - this function return correct values as point coordinates.

But if I have an assembly, and I want to ask point coords in one sub-component of assembly - incorrect output...

Have anybody any advise?

Very simple function - but..


Re: UF_CURVE_ask_point_data

The output probably depends on what is passed to the function: the prototype point object, or an occurrence point object. In other functions (such as AskBoundingBox), the prototype object will return coordinates in part space while the occurrence object will return coordinates in assembly space.


For instance, if you start a new part and create a point in the part then add that part to an assembly 3 times (use move component to spread them out a bit); then query the coordinates of the "prototype" point, you will get the same coordinates for each point. This is because the point is at the reported location in the parent part (the part where the point was created). However, if you query the "occurrence" point object, you will get 3 different coordinates returned, because each is at a different location in the assembly. All of the occurrence objects point to the same prototype object.

Re: UF_CURVE_ask_point_data

Thanks for answer!

But I cannot to get ANY REAL VALUES as point coords. If I ask point properties manualy (Information->Object) - I see some expected coords. But from UGOPEN dll - unreal values.

If I use non-initialised point_coords[3] for output point coords - I see INF INF Q etc.

If I declare

double point_coords[3] = {5.0, 6.0, 7.0}

after my function I see:

Re: UF_CURVE_ask_point_data

Do you have a reference to an actual point object? If so, why not use the .Coordinates.X [.Y, .Z] property?


Or does that give the same answer?

Re: UF_CURVE_ask_point_data

I will try. Now I use old UGOPEN functions..


Re: UF_CURVE_ask_point_data

Excuse me.. How I can Select Object by name in C++ ?

Re: UF_CURVE_ask_point_data

One way is to use the UF_OBJ_cycle_by_name function. If you search in the GTAC solution center, they will probably have one or more C++ examples that shows how to use it.

Re: UF_CURVE_ask_point_data

I cannot to mix "old" C code with cxx code. If I have tag_t of object (point) from  UF_OBJ_cycle_by_name - how I can ask Coordinates.X (Y Z) ?


Re: UF_CURVE_ask_point_data

I've not used the C++ API; but using the .net API, I would use the NXObjectManager to get a tagged object from the tag then cast it to a point object and query the coordinates property.

Re: UF_CURVE_ask_point_data


If you had an occurrence, UF_CURVE_ask_point_data() would give you a valid set of numbers, but they would be the location of the point in the assembly part, not in the component, unless you first asked for he prototype.


But the fact that you are getting the initial value back, or garbage values, makes me wonder whether you are passing the tag of a point or something else - is it possible you are passing a point feature?


Was there a non-zero integer return code from UF_CURVE_ask_point_data()?  Id so, what was it?


It is actually not hard to mix your UF_CURVE calls with the newer NXOpen C++ calls, but first please try calling UF_POINT_ask_point_output(), which will let you get the tag of the point entity from the point feature, in case that is what you have.  If that doesn't resolve the issue, please log an IR with GTAC, and we'll certainly try to help you get it sorted out.