Automated UDF's
Automated UDF's
(OP)
I am relatively new to NX and I have a UDF of an o-ring port that I would like to automate using NXOpen or SNAP where the user would pick the thread size from a dialog box and based upon their selection would change the dimensional values of the port to match that of the thread size they selected. I have 13 different thread sizes ranging from 5/16-24 to 2-1/2-12 and there are 9 different dimensions that would change based upon the selection of a thread size. If this is possible I can send the NX part and the details of the dimensional data. I have decent programming skills in Visual Basic but I just need someone to get me pointed in the right direction if this is even possible. We initially thought about using a part family for the different thread sizes but we want the different sizes presented to the user perhaps in a dialog box so they can select which size they want and the UDF would then be created.
Thanks in advance for any help.
Scott
Thanks in advance for any help.
Scott





RE: Automated UDF's
John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:
To an Engineer, the glass is twice as big as it needs to be.
RE: Automated UDF's
RE: Automated UDF's
John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:
To an Engineer, the glass is twice as big as it needs to be.
RE: Automated UDF's
Note that the way you use the UDF is that you only need to supply a single number from 1 thru 13 representing the size of the threaded hole (of course, at the moment only 1 thru 7 is working).
Before you ask, the way I got this down to working by entering only one number is through the use of 'List' expressions to store the values for all of the variables. As for the threaded hole, I replaced your revolved hole and symbolic thread with an actual threaded-hole which updates as long as the size can be found in the Threaded-Hole table.
Anyway, take a look and let me know if you can supply the needed data for the non-standard threads. This includes, major diameter, minor diameter and tap drill size. As I said I can extrapolate them, but if you already have them that would be better.
John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:
To an Engineer, the glass is twice as big as it needs to be.
RE: Automated UDF's
MAJOR DIA MINOR DIA TAP DRILL
1-1/16-12 1.0625 .981 .990
1-3/16-12 1.1875 1.006 1.115
1-5/16-12 1.3125 1.231 1.240
1-5/8-12 1.625 1.544 1.553
1-7/8-12 1.875 1.794 1.803
2-1/2-12 2.500 2.419 2.178
Will this information need to be added to the threaded hole XML file that is used by NX?
Thanks again,
Scott
RE: Automated UDF's
Have you tested what I got done? Is this what you were looking for? Have you looked at how I formatted your parameter data using the 'List' expressions?
John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:
To an Engineer, the glass is twice as big as it needs to be.
RE: Automated UDF's
John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:
To an Engineer, the glass is twice as big as it needs to be.
RE: Automated UDF's
Attached is a zip file containing an updated UDF master and the modified threaded-hole table. As for what to do with the threaded-hole file, there are two options. The easiest is to simply replace the old file with the new one but that means that the file could be clobbered during an update or when you upgrade to a new version of NX. The safest approach is to put the modified data file in some 'safe' folder somewhere and then set an environment variable pointing to this folder.
Now the current threaded-hole table is located at...
...\UGII\modeling_standards
...so if you're going the replacement route, just put the modified threaded-hole file there, replacing the current one.
If you go the modified file in a 'safe' folder route, then the variable that you need to set is...
UGII_THREADED_HOLE_STANDARD_DIR=<full path to the 'safe' folder>
You will need to restart NX after setting this variable. Also, if you were to put this variable in either the system profile or the user's profile, this will automatically keep NX connected to the modified file even if you were to install a new version of NX.
Anyway, take a look and see if this now works as you would like it to. I've tested all the sizes so it should work for you.
John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:
To an Engineer, the glass is twice as big as it needs to be.
RE: Automated UDF's
Also I have one other question. Would it be possible todisplay the list of thread sizes (5/16-24, 3/8-20....) from the the Size dropdown rather than a number and then whichever one was selected converted to a number? This would make more sense to the user as to which thread size they were selecting.
Thanks again,
Scott
RE: Automated UDF's
As for using the thread sizes instead of the numbers, yes it's possible, just that it would have required a rather complex IF statement which would have resulted in those same 13 numeric values anyway since they are what's needed to retrieve the proper values from the various 'List' expressions. But if you would like, I could update the part file and set it up to use the thread sizes instead of the numbers (I could have it by the end of the day if you wish).
John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:
To an Engineer, the glass is twice as big as it needs to be.
RE: Automated UDF's
Thanks again for all your help!
Scott
RE: Automated UDF's
John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:
To an Engineer, the glass is twice as big as it needs to be.
RE: Automated UDF's
Regards,
Scott
RE: Automated UDF's
John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:
To an Engineer, the glass is twice as big as it needs to be.
RE: Automated UDF's
Thanks again for all your help.
Scott