Showing results for 
Search instead for 
Do you mean 
Reply

UI Blockstyler Face Selection

Hi there,

 

Ive worked before with BodySelection and FeatureSelection in my source code. But right now I just want to extract a selected frace from a FaceCollector in a UI Blockstyler. So normally I would use:

 

NXOpen.BlockStyler.PropertyList koerper = GetBlockProperties("face_ss");
TaggedObject[] koerper_2 =koerper.GetTaggedObjectVector("SelectedObjects");
NXOpen.Body[] koerper_3 = new NXOpen.Body[koerper_2.Length];
koerper_3[0] = (NXOpen.Body)(koerper_2[0]);

This code would get me all selected Bodys out of a BodyCollector.

 

When I try the same with a FaceCollector I get following error:

 

"NXOpen.NXException: The Property could not be found at NXOpen.BlockStyler.GetBlockProperties(String blockName) and so on..."

 

So is there a special way to get selected faces out of the UI Blockstyler?

 

Thanks in advance.

2 REPLIES

Re: UI Blockstyler Face Selection

Why not use the GetSelectedObjects() method?:

TaggedObject[] koerper_2 = koerper.GetSelectedOjects();
Graham Inchley Snr R&D Engineer (Systems Development), Sandvik Coromant
Lenovo ThinkPad W540, Win7, 16GB. Developing in: Java | C | C# | KF
Production: NX8.5.3.3 MP11 64bit Testing: NX9.0.2.5

Re: UI Blockstyler Face Selection

Ive found the error. Actually its caused: When you are using one of my features which I have programmed twice it will get the error.

 

It seems like something isnt unloading properly. Any idea how I can check that?