Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Selection Mask Journalling Problem

Status
Not open for further replies.

MSPBenson

Mechanical
Jan 13, 2005
190
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor