06-28-2016 02:21 AM
I need a block can provide the feature to allow users select Polygon Faces in Advanced Simulation Application.
For now, I can select Polygon Edges with the block of "Curve Collector", but I cannot use "Face Collector" to select Polygon Face.
It seems that these selection blocks can be used to select CAD objects such as Body, Face, Edge, Point. They cannot be used to select CAE objects like Polygon Body, Polygon Face, Mesh Point...
Solved! Go to Solution.
06-28-2016 03:39 AM
You might need an object selector and use your own selection mask to accomplish this.
Private selRefHole As NXOpen.BlockStyler.SelectObject' Block type: Selection
Dim oSelectionMask(0) As Selection.MaskTriple
With oSelectionMask(0)
.Type = UF.UFConstants.UF_machining_geom_type
.Subtype = UF.UFConstants.UF_mach_geom_feature_subtype
.SolidBodySubtype = 0
End With
selRefHole.SetSelectionFilter(Selection.SelectionAction.ClearAndEnableSpecific, oSelectionMask)The above is just a sample of the used methods, you will have to merge it into your existing UI code.
The NXOpen reference will give you more explanations about how to use this.
Production: NX10.0.3, VERICUT 8.1, FBM, MRL 3.1.7 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 10.1
Development: VB.NET, Tcl/Tk Testing: NX12.0 Preparing: NX12.0
Employees of the customers, together we are strong
How to Get the Most from Your Signature in the Community
NX Customization - Best Practice Guide
06-28-2016 10:43 PM - edited 08-12-2016 08:39 PM
This is correct. For FEM/SIM entities other than nodes or elements (which have their own dedicated selection blocks), you need to use the generic SelectObject block with the appropriate selection filter (MaskTriple).
Most of these are defined in %UGII_BASE_DIR%\UGOPEN\uf_object_types.h. Polygon geometry is of type UF_caegeom_type:
#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
Note that there are some "pseudo" entities defined in %UGII_BASE_DIR%\UGOPEN\uf_ui_types.h. For example, to enable node or element selection in the generic SelectObject block, the MaskTriple is defined by (for NX 10):
/* Define UF_pseudo_object_type and corresponsing subtypes and detail types: * UF_pseudo_object_type is used for selection only and for object types not defined in uf_object_types.h */ #define UF_pseudo_object_type (-1) /* The subtypes for UF_pseudo_object_type: */ /* For CAE: */ #define UF_pseudo_CAE_subtype (1) #define UF_pseudo_CAE_node (1) /* first CAE detail type */ #define UF_pseudo_CAE_element (2) /* second CAE detail type */
For NX 11, this is expanded to include element faces and edges:
/* Define UF_pseudo_object_type and corresponsing subtypes and detail types: * UF_pseudo_object_type is used for selection only and for object types not defined in uf_object_types.h */ #define UF_pseudo_object_type (-1) /* The subtypes for UF_pseudo_object_type: */ /* For CAE: */ #define UF_pseudo_CAE_subtype (1) #define UF_pseudo_CAE_node (1) /* first CAE detail type */ #define UF_pseudo_CAE_element (2) /* second CAE detail type */ #define UF_pseudo_CAE_elemface (3) /* third CAE detail type */ #define UF_pseudo_CAE_elemedge (4) /* fourth CAE detail type */
07-05-2016 10:11 PM
Thank you for your replies. I will try it now! ![]()