×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Selection Mask Journalling Problem

Selection Mask Journalling Problem

Selection Mask Journalling Problem

(OP)
I'm using a selection mask to allow users to select objects from the screen.  I'd like to allow the selection of a type of object eg face but not have it selected in the object type in the selection dialog until the user goes in and changes which objects to select.  I've seen this done in bulit in selection dialogs in UG before but can't find how to do it in a journal below is my code:

Dim my_ui As UI = ui.GetUI
        Dim message As String = " Select Objects To Link"
        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 = _
            Selection.SelectionAction.ClearAndEnableSpecific
        Dim selectionMask_array(5) As Selection.MaskTriple

        nxs.listingwindow.open()

        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, _
                                                        selectedObject)

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


            ' / Exit execution /
            Exit Sub
        End If

Mark Benson
Aerodynamic Model Designer

To a Designer, the glass was right on CAD.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources