Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

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

Status
Not open for further replies.

Teepo

Industrial
Sep 9, 2014
2
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:
PropertyList selEdgeProp = edge_select0.GetProperties();
if (block == edge_select0)
            {
                targetEdge = (Edge)selEdgeProp.GetTaggedObjectVector("SelectedObjects")[0]; }

then I get the reference text
Code:
String targetEdgeRef = rm.GetReferenceText(targetEdge());

And use it to create the reference Text in my Knowledge Fusion UDF-class
Code:
String references = "{" + targetEdgeRef + "};";
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor