Showing results for 
Search instead for 
Do you mean 
Solved! Go to solution

Reach from operation to related faces (face ID)



Is there a API (or a way) to get from an operation to a face ID of the faces that related to it.

For example I have a FLOOR AND WALL operation and I want to reach to the face ID of the floor cut area.





Re: Reach from operation to related faces (face ID)

From the operation get the floor object and from there get the entities of the floor.

It is best to record a journal of adding faces to the floor to get the methods involved in the process.

Stefan Pendl, Systemmanager CAx, HAIDLMAIR GmbH
Production: NX10.0.3, VERICUT 8.0, FBM, MRL 3.1.4 | TcUA 10.1 MP7 Patch 0 ( | TcVis 10.1
Development: VB.NET, Tcl/Tk    Testing: NX11.0 EAP, NX12.0 EAP

How to Get the Most from Your Signature in the Community

Re: Reach from operation to related faces (face ID)

I'm trying to do something similar, but i cant get the journal to give me exactly what I need to reach my goal.

I'll very appreciate if someone could post the code here.



Accepted by topic author TalZamir
‎07-17-2016 02:22 AM

Re: Reach from operation to related faces (face ID)

Each operation can have one or more types of geometry related to it. For example any planar operation has part geometry, check geometry and cut area geometry. You can get access to these geometry objects via the operations builder object. For example:


 CAM::Geometry*  pCutAreaGeometry = planarOperationBuilder->CutAreaGeometry();


A CAM::Geometry object contains a list (GeometryList) wich holds zero or more GeometrySet objects which you can access by index:


Cam::GeometrySet* pGeomSet = pCutAreaGeometry->GeometryList()->FindItem(0);


The GeometrySet provides functionality for managing (adding/removing/querying) geometry. For example to get the current geometry (assuming a single face was selected) you could use:


std::vector<NXOpen::TaggedObject *> vecGeom = pGeomSet ->ScCollector()->GetObjects();

if (!vecGeom.empty())


    Face* pSelectedFace = dynamic_cast<Face*>(vecGeom[0]);





Hans Scheerder

Sr. Software Engineer