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
. 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:
then I get the reference text
And use it to create the reference Text in my Knowledge Fusion UDF-class
I am so desperate at this point that even though I am not a native speaker, I need to make this topic here
![[smile] [smile] [smile]](/data/assets/smilies/smile.gif)
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 + "};";