Showing results for 
Search instead for 
Did you mean: 

Impossible to select Nodes


Hi everyone,

I'm programmming an application which requires a selection of nodes (on a FemPart) by the user.
I am using the SelectTaggedObjects function from the SelectionManager, but the problem is that I don't know exactly which Type and Subtype to put in the MaskTriple. I've tried several possibilities, but no one works... The selection window shows up, but the selection filter is always on "curve feature" and it is not possible to select anything.

Here is my code, I've created a function which takes in argument the message to display, the type and the subtype of the objects to select:


Dim theSession As Session = Session.GetSession()
Dim workFemPart As CAE.FemPart = CType(theSession.Parts.BaseWork, CAE.FemPart)
Dim fEModel1 As CAE.FEModel = CType(workFemPart.FindObject("FEModel"), CAE.FEModel)

Dim selectedObjects() As TaggedObject
selectedObjects = SelectObject("Please select interface nodes", UFConstants.UF_sfem_mesh_type, UFConstants.UF_sfem_mesh_nodes_subtype)

Function SelectObject(ByVal message As String, ByVal Type As Integer, ByVal Subtype As Integer) As TaggedObject()

Dim title As String = "Selection"
Dim context As Selection.SelectionScope = Selection.SelectionScope.AnyInAssembly
Dim keepHighlighted As Boolean = False
Dim includeFeautures As Boolean = True
Dim selectionAction As Selection.SelectionType = Selection.SelectionAction.ClearAndEnableSpecific
Dim mask(0) As Selection.MaskTriple
mask(0).Type = Type
mask(0).Subtype = Subtype
mask(0).SolidBodySubtype = 0

Dim selectedObject() As TaggedObject = Nothing
Dim ui As UI = ui.GetUI()

ui.SelectionManager.SelectTaggedObjects(message, title, context, selectionAction, includeFeautures, keepHighlighted, mask, selectedObject)

Return selectedObject
End Function

I can't find where the problem comes from, so any help would be greatly appreciated !


Re: Impossible to select Nodes

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

There is a GTAC example that allows the user to select nodes by creating points on the nodes and allowing the user to select the points. The journal then maps the points to the nodes to get the selected nodes.

Re: Impossible to select Nodes

Siemens Phenom Siemens Phenom
Siemens Phenom

Define the MaskTriple as follows:


        Dim mask(0) As Selection.MaskTriple
        mask(0).Type = UFConstants.UF_pseudo_object_type
        mask(0).Subtype = NXOpen.UF.UFConstants.UF_pseudo_CAE_subtype
        mask(0).SolidBodySubtype = NXOpen.UF.UFConstants.UF_pseudo_CAE_node


Note that most of the UFConstants are defined in uf_object_types.h. There are a few (including these CAE pseudo types) defined in uf_ui_types.h.


They all show up in VS intellisense under the UFConstants class:



Re: Impossible to select Nodes

Thank you! It works !

Re: Impossible to select Nodes

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor



Thanks for the info, good to know.


Any insight on why the

UFConstants.UF_sfem_mesh_type, UFConstants.UF_sfem_mesh_nodes_subtype

doesn't work?