Cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

C++ , UfSession ?

Solution Partner Pioneer Solution Partner Pioneer
Solution Partner Pioneer

Hello,

 

I'm trying to write a program using C++ and NXOpen. First programming with C++...
One of the function must extract the related nodes of each element of the model (the objective is to evaluate the center of each element).

With VB.net I would have used something like that :

...

theUFSession.Sf.LocateAllMeshes(meshtag, num_of_mesh, mesh_tags_p)

...

theUFSession.Sf.LocateElement(mesh_tags_p(i), num_of_elems_mesh, element_tags_p)

...

mon_elem = NXOpen.Utilities.NXObjectManager.Get(element_tags_p(j))

...

Elem_Nodes = mon_elem.GetNodes

...

But I can't find the equivalent in C++

Does someone could help me ? To find the equivalent, or someother method ?

Many Thanks !

Marie

 

4 REPLIES 4

Re: C++ , UfSession ?

Siemens Phenom Siemens Phenom
Siemens Phenom

This is the Open C API. This API is wrapped for .NET, Python and Java. You use it directly with C++

 

Open C API

Re: C++ , UfSession ?

Siemens Phenom Siemens Phenom
Siemens Phenom

See also the interoperability sample provided with the NX installation: 

UGOPEN\SampleNXOpenApplications\C++\InteropNXOpenWithUFunc\InteropNXOpenWithUFunc.cpp

Re: C++ , UfSession ?

Solution Partner Pioneer Solution Partner Pioneer
Solution Partner Pioneer

Thank you Jim !
that's what I was looking for without any success ;-)

 

Have to add : #include <uf_sf.h> in my case.

 

Have a nice week end !

Marie

Re: C++ , UfSession ?

Solution Partner Pioneer Solution Partner Pioneer
Solution Partner Pioneer

Hello @Beetle ,

thanks for yout post, I will also have a look at this !

Have a nice week end,

Marie