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

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

Grab part units for repeat region?

davehaigh
11-Garnet

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.

There is PRO_MP_MASS, PRO_MP_VOLUME, & PRO_MP_DENSITY

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


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
1 REPLY 1

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

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<">https://twitter.com/CreoHelp>
Follow me on PTC Community<">http://communities.ptc.com/index.jspa>
Top Tags