Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

converting units 3

Status
Not open for further replies.

phbalance

Mechanical
Oct 19, 2005
31
Need help with converting units from metric to inches. I tried using the 'ug_convert_part' program from This works fine, but my sketch dimensions and other values stay in metric. I'd like all the values to be changed to inches. Is there another way to convert them? Using NX4.0
 
Replies continue below

Recommended for you

This PLM world site should help you out the tip which shows you how to create right click command actions for the ug_convert_part utility. To give proper credit this tip was written by Pat Barrett of Sherpa Design, Inc.


Most important to note is the following
ug_convert_part -mm to convert to mm
ug_convert_part -in to convert to in

I believe the site you listed shows a Direction option with an inch,mm selection. The picture on the site says Convert Inch<->mm at the top of the window but the Inch option is selected. Maybe Direction is direction from and not to. Check what happens if you select the other direction option or use the PLMworld tip I've shown above.

I've used this at the last UG company I worked at and there is no need to run a separate program for it.

Michael
 
This issue has been explained on the UGS BBS several times. The 'ug_convert_part' utility is intended to convert the internal database units, it does NOT change the units assigned to expressions as they have been supported since NX 3. The units of an expression is considered to be 'design intent' and therefore NOT related the database units of the part file. Granted, unless changed the expression units are consistent with the database units, but that can be changed anytime by the user.

As an example of what I mean by 'design intent', take the following example as a case in point:

I have a part file created in NX 4 using metric database units. Say I have designed a sheetmetal part where the material thickness as 2mm and at one point the design required that a 2 inch hole needed to be punched in one of the flanges of the sheetmetal part and the user, using the option to change design units while defining a parameter, either explicitly in the expression system or by changing the input units under Analysis/Units. OK, now assume that the part was converted from mm database units to inches. The original design intent of the sheetmetal thickness being 2 mm and the hole being 2 inches is unchanged since those units are part of the models design specifications.

For another example, let's say that there was extensive use of measuements and complex equations involving the use of several of the pre-programmed engineering handbook functions available in the expression system calculating say some beam deflections or some of the forces found in the 'Mechanics' set of formulas.

In the above examples, how would you expect the conversion software to resolve all of the possible units implications? This was never the intent of the 'ug_convert_part' and there are no plans to change that since this would be a totally unrealistic task. Sorry, the 'ug_convert_part' was intended only to convert the untis of the database and not the engineering oncstraints and parameters that make up the designer's intent. The utility was intended to overcome those iussues that involve attempts to mix part files of different units in such operations as assemblies, WAVE linking, etc.

I hope this helps explain what is and what is NOT happening with using the 'ug_convert_part' utility.


John R. Baker, P.E.
Product "Evangelist"
NX Product Line
UGS Corp
Cypress, CA
 
I see your point about the design intent. This verifies that my conversion was successful then. Thanks.
 
It seems the linked How-To was written a few years ago. Using his exact steps, the MB3 -> Convert will not work on XP. I had to input the following in the Application Used to Perfom Action box:

"[Path to UGII directory here]\ug_convert_part.exe" -mm "%1"

Omit the brackets but INCLUDE the quotes where shown. What is shown above will convert from inch to metric. To convert from metric to inch, omit -mm and add -in while leaving everything else the same.

Tim Flater
Senior Designer
Enkei America, Inc.
 
John,

let's say I inadvertently create a part file in INCH units. I then create all of my sketches, features etc ... On noticing this mistake, I now want to convert the part file to METRIC.
I use the ug_convert_part program (as I always have done for many years now), but it leaves all of my expressions as INCH, and doesn't allow me to change them to MILLIMETER. What I now have to do is edit all of these expressions adding mm() to the values.
Why not at least allow the user to change the "units" of an expression ?

Paul Phillips
Specialty Engineered Automation
 
Trust me, it's not as easy as it might sound. When the expression world of UG/NX was 'unitless' (everything was in part units and the only odd stuff we had to figure out was which were the angles versus the linear dimensions) it was an easier task. However, now that we have introduced dimensionality and engineering handbook formulas, which requires explicit units, we have exposed some of the dirty little secrets that engineers have managed to look the other way on for the last 330 years or so (since the introduction of the Metric system). For example, despite the fact that there is a special unit for Mass, a Slug, the Imperial system has traditionally used Pounds for both Mass and Weight (a Force), but at least we represented these as either 'lbm' and 'lbf', however, they did still have the same value. Now in the case of the Metric system, we sort of have the opposite problem; a special unit for Weight (a Force) called Newtons, yet most people use Kilograms for Mass, and when working in Earth bound frames of reference, also as Weight (a Force), yet there is no clear way of indicating whether they're talking about Mass or Force since there is only ONE designated unit, 'kg'.

OK, so when we look at a file to convert and we see an expression equal to say '10 kg', what do we convert it to? '22.05 lbm'? '0.057 slug'? Or perhaps we play that "let's assume that we're in an Earth bound frame of reference" and convert it to '22.05 lbf'? But what if this part file came from NASA or Aero Jet or any number of companies where they actually DO have 'Rocket Scientists' working for them and the problems that THEY may be solving really doesn't deal with "Earth bound frames of reference" and then the '10 kg' really was meant to be a Mass and not a Weight, but I still have to figure out whether the user is expecting 'lbm' or 'slug' as a result. And because of these 'quirks' (Engineering vs. Physics) in the use of units, any formula that involves Mass or Weight is going to be very difficult in terms of a direct conversion from one set of units to another.

Therefore, with the advent of the NX expression system becoming a full fledged 'engineering' formula solving system, we had to decide what it actually meant to 'convert' a prt file from one set of units to another. The alternative would have been to create a totally new scheme that would have had TWO numerical based systems, one remaining unitless representing only linear and angular values and the other for more complex computations, but even that would have required a very complex and tedious 'interface' so that numerical values could be shared yet still be properly recognized after a part conversion.

Sorry, we therefore opted for something workable and logical, but we had to accept that the world was no longer as simple as it once appeared to be, and one of the victims of that were blanket unit conversions.

John R. Baker, P.E.
Product "Evangelist"
NX Product Line
UGS Corp
Cypress, CA
 
John,

thank you for that information.

back to my last question, without converting a partfile, why can't I change the units of a feature ? Let's say I create a 2 INCH diameter hole, as that was the original design intent. Now, the design intent is that hold must be 50 MILLIMETRE diameter. Without creating an intermediate expression, or deleting the hole, how do I now change it to be MILLIMETRE ?

Paul Phillips
Specialty Engineered Automation
 
The problem is that without knowing where this expression is to be used (remember, we still have interpart expressions) we decided to not allow the direct editing of an expression's units. While you are correct that in the case of 'features', virually all of the values are either linear or angular units and those would be easy to address, but then we would have to put special code to classify editable and non-editable expressions based on the possibilty of downstream problems.

For example, lets go back to my 10 kg problem from the previous reply. What if I edited it to be 22.05 lbf instead of 0.057 slugs and it was being referenced as a Mass in some engineering formula?

With the extra functionality comes constraints and limitations. We therefore feel that the burden is on the users to make it unambiguous as to what it was that they were trying to accomplish when changing the 'design intent' of your models.


John R. Baker, P.E.
Product "Evangelist"
NX Product Line
UGS Corp
Cypress, CA
 
Regardless of what the units are, the part is still the same size. Just because you convert it to metric or english doesn't change the size of the part. Unless of course you used constant expressions, and why would you do that? You would want to (since NX3) use unit type expressions.


My two and half cents

-Dave
PLM Exchange
 
I guess I'm just going to have to admit defeat and "deal" with the situation, because that's the way the software is. In saying that, I don't agree with everything you've done, especially allowing KF to dictate the logic. Look at all the (leagcy partfile) issues that came about when NX3 was launched.

If it's MY intent that MY 2 inch hole now needs to be 50mm, then I should be able to make that change and deal with the consequences. Surely if the expression has a UNIT, then "interpart expressions" (I use a lot of these, both ALL directions) carry that UNIT through.

I'm just SO frustrated with these UNITS. I guess if I needed to deal with Engineering formulas day in, day out, it might be a different matter. But I don't, and having to deal with INCH / METRIC partfiles is a pain. Additionally, pre-NX3 deformable components no longer work in cross-unit partfiles because of expressions having no units.

Paul Phillips
Specialty Engineered Automation
 
Well since NX is built with KF being an integral part of the product, it can't be avoided. As for so-called 'legacy parts' this issue of units and how they get converted has NO impact any part file created prior to NX 3. They will convert just like they always have. As for the way NX 3 behaves, you're correct in that is way it was designed, which is the responsibility of UGS. Our obiligation is to protect legacy parts, which we have, but we also have an obligation to keep our product as modern and efficient AS WELL AS competitive as possible, for the good of BOTH UGS and our customers who not only purchased NX when they did, but also the expectations that we would keep it up-to-date and that there would continous improvements and enhancements so that there is a continuous return on investment.


John R. Baker, P.E.
Product "Evangelist"
NX Product Line
UGS Corp
Cypress, CA
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor