×
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

Face Rule with SelectionManager.SelectObjects()

Face Rule with SelectionManager.SelectObjects()

Face Rule with SelectionManager.SelectObjects()

(OP)
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

CODE --> VB.NET

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() 

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