×
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 10: Implement UDF within Block UI Styler (NXOpen basics)

NX 10: Implement UDF within Block UI Styler (NXOpen basics)

NX 10: Implement UDF within Block UI Styler (NXOpen basics)

(OP)
Hello everyone,

I am so desperate at this point that even though I am not a native speaker, I need to make this topic here smile. Would really appreciate ANY help suggestions.
I created a user-defined feature ( UDF ) and everything works perfectly fine. However I need to make a GUI for the UDF and so far I was having little success with Block UI Styler.
I figured that in NXOpen you need to create the UDF via Knowledge Fusion udf-class and it has been working for simple reference selections like ONE edge or one face.

Problem:
When having to select several edges, the UDF would create references like “Edge Set” or “Guide to Skin”. Now when I have reference geometry in the UDF like “additional edge”, then I know the NXOpen object for that is simply NXOpen.Edge.
But what NXOpen classes do I use for Edge Sets or “Guide to Skin” or “Sketch external Reference”?


Background:
First I create the UDF with .prt and .cgm file and then the Block UI Styler .dlx-file with Curve Selection.
My sample code looks somewhat like this:
I get the Properties of the Curve Selection and convert it to edge:

CODE --> c#

PropertyList selEdgeProp = edge_select0.GetProperties();
if (block == edge_select0)
            {
                targetEdge = (Edge)selEdgeProp.GetTaggedObjectVector("SelectedObjects")[0]; } 

then I get the reference text

CODE --> c#

String targetEdgeRef = rm.GetReferenceText(targetEdge()); 

And use it to create the reference Text in my Knowledge Fusion UDF-class

CODE --> c#

String references = "{" + targetEdgeRef + "};"; 

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