Cancel
Showing results for 
Search instead for 
Did you mean: 

Re: Selection mask polygon geometry

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

You need a reference to the UF session. See the example code here:

http://solutions.industrysoftware.automation.siemens.com/view.php?si=nx_api4033

 

Select the object of interest then run the code, it will report the type and subtype of the preselected object.

Re: Selection mask polygon geometry

Legend
Legend

Hello cowski1,

 

This works. Thank you very much!

 

 

For future reference:

Dim SelectionMask(0) As Selection.MaskTriple
'For polygon geomety With SelectionMask(0) 'Polygon Geometry .Type = 31 End With 'For polygon body With SelectionMask(0) 'Polygon Geometry .Type = 31 .Subtype = 12 End With 'For polygon face With SelectionMask(0) 'Polygon Geometry .Type = 31 .Subtype = 9 End With

Regards,

Frederik

Highlighted

Re: Selection mask polygon geometry

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

Excerpt from %UGII_BASE_DIR%\UGOPEN\uf_object_types.h

 

#define UF_caegeom_type                          31
#define    UF_caegeom_region_subtype                   8
#define    UF_caegeom_face_subtype                     9
#define    UF_caegeom_edge_subtype                     10
#define    UF_caegeom_vertex_subtype                   11
#define    UF_caegeom_body_subtype                     12
#define    UF_caegeom_volume_subtype                   13

So you can use the UFConstants here too for more readability.

Stefan Pendl, Systemmanager CAx, HAIDLMAIR GmbH
Production: NX12.0.2, VERICUT 8.2, FBM, MRL 3.1.7 | TcUA 10.1 MP7 Patch 0 (10.1.7.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: Selection mask polygon geometry

Siemens Phenom Siemens Phenom
Siemens Phenom

Sorry for the incorrect information in the other post. I've edited it to correctly include the proper UF_caegeom_type references.

Re: Selection mask polygon geometry

Legend
Legend
Thank you!