Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Hole & Slot UDF

Status
Not open for further replies.

claforet

Mechanical
Apr 8, 2010
54
Hello,

I'm trying to figure out how to make a UDF in NX (5.0.6.3)that makes a hole and slot which lie on the same axis on a plane. I know how to make it so I can define the slot and hole sizes, but I want to be able to select a line on a face and then have the hole placed at on end of the line and the slot placed at the other, with the slot being parallel to that line. Can this be done?

Thanks.
 
Replies continue below

Recommended for you

Can you include the line in the Udf ?
I.e create the line as a Sketch line (It can probably be set to reference)and then define the other two depending on that line.
The problem otherwise is that you need to resolve both the placement of the hole and the slot when you use the Udf. ( i.e pick what endpoint of the line that the hole should snap to and then define placement dimensions for the slot to the same line.
If you include the line, you should only need to place that sketch and possibly correct the length. The hole and the slot should update automatic.
 
Thanks for the replies. I tried to include the line as a reference but maybe I'm not doing it right. I have a sketch as shown in the attached picture with the hole, slot and reference line. I then extrude this sketch to make the hole and the slot. When I make the UDF, I try giving it 3 reference geometries: Planar surface, horizontal reference, and I added the reference line. But when I try using it on a block in another part (by selecting a face, an edge for horizontal reference and a line I sketched on the face), I get the error "Cannot Copy Feature".
 
 http://files.engineering.com/getfile.aspx?folder=f830dd80-72f0-43b6-bedd-d0c644ce6b81&file=UDF_Sketch.JPG
Sorry if i confused you, you shouldn't need to include the line as a "reference" in the UDF. But your UDF must contain the sketch where the line is drawn. In the picture it looks if you only need to copy ( = include in the Udf) two features, Sketch (3)"Sketch_001" and Extrude(4).
I assume that Sketch (1) and Extrude (2) is the grey block which the later 2 is drawn upon.
If you test the "mechanics" by copying the Sketch(3) and extrude (4) , then i the same part do a "Paste", NX should prompt you to resolve the needed references. You should be able to paste this in any plane onto that grey solid, or in a different part. If you cannot, there is some strange reference in the Sketch or the extrude.
 
One of the "tricks" someone once showed me was when creating a UDF that has a sketch use a Fixed constraint on the sketch to tie down the location. Then when you import the UDF you only need to define the placement face and positioning dimensions. This eliminates the need to select external references.

John Joyce
N.C. Programming Supervisor
Barnes Aerospace, Windsor CT
NX6.0.5.3
 
I think my issue is that I want to choose an external reference. I want to be able to pick any line on any part and automatically have a hole placed at one end of the line and a slot placed on the other. The size of the hole and slot would be UDF parameters, but I want the spacing and orientation to be determined by whatever line I choose.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor