cancel
Showing results for 
Search instead for 
Did you mean: 

Error in casting TaggedObject as extract face feature

Valued Contributor
Valued Contributor

Hello everyone,

 

I am trying to cast a taggedobject as a extract feature. When I use journaling

 

NXOpen::Features::ExtractFace *extractFace1(dynamic_cast<NXOpen::Features::ExtractFace *>(workPart->Features()->FindObject("EXTRACT_BODY(3)")));

 

This line works.

 

However,

 

std::vector<NXOpen::TaggedObject*> selectedObjects = selection0->GetSelectedObjects();

extractFace1 = dynamic_cast<NXOpen::Features::ExtractFace *>(selectedObjects[0]);

 

returns a Null pointer. Any suggestions?

 

thanks!

1 REPLY

Re: Error in casting TaggedObject as extract face feature

Siemens Phenom Siemens Phenom
Siemens Phenom

Try hovering the cursor for a few seconds before making the selection, to be sure you are selecting the extracted face, and not some other geometry - for example, the original face from which it was extracted.