ScottWerkema
Automotive
- May 25, 2011
- 4
It is possible to allow the user to change the Face Rule during a SelectionManager.SelectObjects()?
During a pick faces operation of a built-in function the face rule drop-down is on the selection toolbar. While picking faces using SelectionManager.SelectObjects() and a MaskTriple the drop-down is not there. We have a function to pick faces and apply color templates and users are complaining they can only select one face at a time.
I found CreateRuleFaceTangent in the documentation but the user doesn't always want tangent faces. I would like it to behave like built-in NX functions where the user can choose the rule.
Here is the code I have for reference
During a pick faces operation of a built-in function the face rule drop-down is on the selection toolbar. While picking faces using SelectionManager.SelectObjects() and a MaskTriple the drop-down is not there. We have a function to pick faces and apply color templates and users are complaining they can only select one face at a time.
I found CreateRuleFaceTangent in the documentation but the user doesn't always want tangent faces. I would like it to behave like built-in NX functions where the user can choose the rule.

Here is the code I have for reference
Code:
theUI.LockAccess()
Dim mask(0) As Selection.MaskTriple
mask(0) = New Selection.MaskTriple
Dim sel1 As Selection.Response
If type = "feature" Then
With mask(0)
.Type = UFConstants.UF_feature_type
.Subtype = UFConstants.UF_feature_subtype
.SolidBodySubtype = UFConstants.UF_UI_SEL_FEATURE_BODY
End With
Else
With mask(0)
.Type = UFConstants.UF_face_type
.Subtype = 0
.SolidBodySubtype = 0
End With
End If
Do
sel1 = theUI.SelectionManager.SelectObjects("Select " & type & "(s)", _
"Select " & type & "(s)", Selection.SelectionScope.WorkPart, Selection.SelectionAction.ClearAndEnableSpecific, _
False, True, mask, selected_objs)
Loop While sel1 = Selection.Response.ObjectSelected Or _
sel1 = Selection.Response.ObjectSelectedByName
theUI.UnlockAccess()