Showing results for 
Search instead for 
Did you mean: 
Showing results for 
Search instead for 
Did you mean: 

Grab part units for repeat region?


Grab part units for repeat region?

I was looking at the built in parameters of a part and I'm trying to find something that will tell me what unit system the part has so I can put it into a repeat region. I'm not seeing anything.


But I don't see anything that would tell me what the mass units of the part are.

Any ideas?

The system obviously knows, because it tells you when you do a mass prop calc.
VOLUME = 8.0000000e+00 INCH^3
SURFACE AREA = 2.8000000e+01 INCH^2
DENSITY = 1.0000000e+00 POUND / INCH^3
MASS = 8.0000000e+00 POUND

David Haigh
Phone: 925-424-3931
Fax: 925-423-7496
Lawrence Livermore National Lab
7000 East Ave, L-362
Livermore, CA 94550


Grab part units for repeat region?

Hi David...

There's nothing to tell you what units are being used by those parameters. You get a value and that's it. If you dig long enough, you'll happen upon a few dead ends. For example, you can get the units of whatever material you currently have applied to your model. Of course, this is a dead end because your material units may be different than your principle material units.

There are a few new Pro/REPORT selections which allow you to grab the units of a specific parameter... but they don't seem to work for the system parameters you're asking about. The new Pro/REPORT selectors are &ptc_unit. They're used as such: &mbr.ptc_unit.<parameter_name>

If you tried to create a Bill of Materials that pulled the units of each component in an assembly, you might try &mbr.ptc_unit.pro_mp_mass or &mbr.ptc_unit_pro_mp_density. Although these selectors are formed correctly, they do not work. There's a trick to making them function correctly.

Units information for a parameter is not available unless you create a relation referencing those values first with the Units Sensitive option activated. Try this:

* Open a part, go to the Relations editor

* Under the Utilities tab, select Units Sensitive to turn it on (if it's not already)

* Create new relation(s) referencing the parameters from which you wish to capture units data

For example, I use these relations:
mass = PRO_MP_MASS
density = PRO_MP_DENSITY

Those two relations create two new parameters ("mass" and "density"). If you interrogate the values of these parameters, they will be identical to PRO_MP_MASS and PRO_MP_DENSITY so nothing is really gained there. However, you can now grab units data from the "mass" and "density" parameters using &mbr.ptc_unit.mass and &mbr.ptc_unit.density

You were not able to grab units data from PRO_MP_MASS or PRO_MP_DENSITY directly... but once you active Units Sensitive and create a new relation referencing those values, you can grab the units information from the new parameters created by the relation.

I know that's a bit hard to digest but it works. This will also work for PRO_MP_VOLUME if you set a relation like volume=PRO_MP_VOLUME and access the units by using the &mbr.ptc_unit.volume selector.

The only downside to this... is that those relations need to already exist in each component before you can grab the units information. If you have a large assembly with thousands of components, you need to populate those components with those relations. There are several ways you can perform this feat but that's a topic for another message.

If this doesn't make sense, please write back and I'll do my best to explain more fully.

Best regards,


Brian K. Martin
Sr. Mechanical/Application Engineer
SGT, Inc. under contract to
NASA Goddard Space Flight Center

301.286.0059 (NASA Office)
443.421.2532 (Cell)

Follow me on Twitter @CreoHelp<">>
Follow me on PTC Community<">>