Showing results for 
Search instead for 
Did you mean: 

Reach from operation to related faces (face ID)

Siemens Creator Siemens Creator
Siemens Creator



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)

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

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: NX12.0.2, VERICUT 8.2, FBM, MRL 3.1.7 | TcUA 10.1 MP7 Patch 0 ( | TcVis 11.4
Development: C (ITK), .NET, Tcl/Tk Testing: NX (1876) | AWC 3.4 Preparing: -

Employees of the customers, together we are strong Smiley Wink
How to Get the Most from Your Signature in the Community
NX Customization - Best Practice Guide

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

Valued Contributor
Valued Contributor

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.



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

Siemens Experimenter Siemens Experimenter
Siemens Experimenter

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