Showing results for 
Search instead for 
Do you mean 

Selection.MaskTriple - Allow type but not by default

I've been trying to get something to work for a while now and all but given up.


I'm using a selection dialog in some customisation that I would like to allow the selection of:

Sheet Body

Solid Body





However I only want the first three to be available when you run the program and then allow the user to select the other types if they want them.  This is similar behaviour to the 'Object Display' function in NX that allows the selection of entities but by default the Type of 'Face' is never active unless the user goes into the type filter and swithces it on.


Does anyone know how to replicate this behaviour with the 'MaskTriple' function?


The code below allows all of the types I'm after to be selected but all of them are available to select immediately.


        '....................Select Objects..........................


               Dim my_ui As UI = ui.GetUI
        Dim message As String = " Select Objects"
        Dim title As String = "Selection"
        Dim scope As Selection.SelectionScope = Selection.SelectionScope.AnyInAssembly
        Dim keepHighlighted As Boolean = False
        Dim includeFeatures As Boolean = False
        Dim response As Selection.Response
        Dim selectionAction As Selection.SelectionAction = _
        Dim selectionMask_array(5) As Selection.MaskTriple

        With selectionMask_array(0)
            .Type = UFConstants.UF_solid_type
            .Subtype = 0
            .SolidBodySubtype = 0
        End With
         With selectionMask_array(1)
            .Type = UFConstants.UF_line_type
            .Subtype = 0
            .SolidBodySubtype = 0
        End With
        With selectionMask_array(2)
            .Type = UFConstants.UF_spline_type
            .Subtype = 0
            .SolidBodySubtype = 0
        End With
         With selectionMask_array(3)
            .Type = UFConstants.UF_circle_type
            .Subtype = 0
            .SolidBodySubtype = 0
        End With
            With selectionMask_array(4)
            .Type = UFConstants.UF_face_type
            .Subtype = 0
            .SolidBodySubtype = 0
        End With
        With selectionMask_array(5)
            .Type = UFConstants.UF_solid_type
            .Subtype = 0
            .SolidBodySubtype = UFConstants.UF_UI_SEL_FEATURE_ANY_EDGE 

        End With
        Dim selectedobject() As NXObject

        response = my_ui.SelectionManager.SelectObjects(message, title, scope, _
                                                        selectionAction, includeFeatures, _
                                                        keepHighlighted, selectionMask_array, _

        If response = Selection.Response.Cancel Or response = Selection.Response.Back Then

            ' / Exit execution /
            Exit Sub
        End If