×
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

NX Journal - Masking for Edge

NX Journal - Masking for Edge

NX Journal - Masking for Edge

(OP)
I'm trying to learn by example how to do some journalling.  I found an NX code snippet to filter a selection to curves only, but I want to modify it to filter by edges.  Where can I find a good explanation of how NX parses this and how to make changes?

CODE

Function mask_for_curve(ByVal select_ As IntPtr, ByVal userdata As IntPtr) As Integer

        Dim num_triples As Integer = 5
        Dim mask_triples(4) As UFUi.Mask

        mask_triples(0).object_type = UFConstants.UF_line_type
        mask_triples(0).object_subtype = 0
        mask_triples(0).solid_type = 0

        mask_triples(1).object_type = UFConstants.UF_circle_type
        mask_triples(1).object_subtype = 0
        mask_triples(1).solid_type = 0

        mask_triples(2).object_type = UFConstants.UF_conic_type
        mask_triples(2).object_subtype = 0
        mask_triples(2).solid_type = 0

        mask_triples(3).object_type = UFConstants.UF_spline_type
        mask_triples(3).object_subtype = 0
        mask_triples(3).solid_type = 0

        mask_triples(4).object_type = UFConstants.UF_point_type
        mask_triples(4).object_subtype = 0
        mask_triples(4).solid_type = 0

        ufs.Ui.SetSelMask(select_, _
                           UFUi.SelMaskAction.SelMaskClearAndEnableSpecific, num_triples, mask_triples)
        Return UFConstants.UF_UI_SEL_SUCCESS

    End Function
Thanks,
Jeff

RE: NX Journal - Masking for Edge

(OP)
Nevermind, I just realized I could add:

CODE

mask_triples(5).object_type = UFConstants.UF_solid_type  
mask_triples(5).object_subtype = 0  
mask_triples(5).solid_type = UFConstants.UF_UI_SEL_FEATURE_ANY_EDGE

I'm good now.

Thanks,
Jeff

RE: NX Journal - Masking for Edge

If you add that code to the existing code, also change

CODE

Dim num_triples As Integer = 6
Dim mask_triples(5) As UFUi.Mask

The change you made will filter for curves, points, or edges; if you want just edges, delete the filters for curves and points and change the dim statements to:

CODE

Dim num_triples As Integer = 1
Dim mask_triples(0) As UFUi.Mask

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