Skip to main content
17-Peridot
September 15, 2011
Question

Pro/E Model unit parameter

  • September 15, 2011
  • 4 replies
  • 28757 views

This there a way to extract the model units ( inches / mm ) directly from the model and add them to a parameter so they can be shown in the title block area?

I know we can have ModelCHECK can add the parameter to the model and then we can read that parameter, but we don't want to have to rely on ModelCHECK.

Lance

4 replies

24-Ruby III
September 16, 2011

Hello,

I expect that model units are set when you create new part (and will not change later). Therefore you can create the appropriate parameter in start part.

Martin Hanak

1-Visitor
September 16, 2011

Hi,

I agree with martin. Set the required units in the start part. While creating a new part use the start part.

Regards

Radheesh

13-Aquamarine
September 20, 2011

Hi Lance...

I've wanted to do this for some time. The quick answer is that you cannot simply grab a system parameter which contains this information. This is true in WF3 and WF5 (not sure about Creo 1.0 yet though). You can grab the information through J-LINK, Toolkit, and other programming sources but this is tedious and painful (especially if you have no experience with these packages).

HOWEVER, there is a way to get what you're looking for using a combination of relations and parameters. You can also display this information in a BOM using Pro/REPORT. Unfortunately, this technique is limited in that you must use new parameters for them to work.

(1) Open a model, run a mass properties report using Setup>Edit>Mass Props>Generate Report. In WF5, it's File>Properties>Mass Properties>Change>Generate Report. This step is required so default mass properties values are generated. The values themselves are irrelevant... so it doesn't matter if your density is wrong. We just need default values so we can pull UNIT information.

(2) Open the RELATIONS tool. Under the Utilities tab, make sure Units Sensitive is checked.

(3) Add one or more of the relations below. I've added all of them to my start parts so they're always available. I've also added them to my "Post Regeneration" relations so they're not usually visible and they run after the part has been regenerated. If you don't know what "Post Regeneration" relations are, don't worry- these work anywhere.

UnitsMass = PRO_MP_MASS
UnitsDensity = PRO_MP_DENSITY
UnitsLength = PRO_MP_COGX

My variables are "UnitsMass", etc but you can change the names. To experienced users, this step will seem redundant! The three system variables PRO_MP_MASS, PRO_MP_DENSITY, and PRO_MP_COGX always exist after you're run an initial Mass Properties report (Step #1). Why set 3 NEW variables that appear to do nothing?

With NEW variables and the Units Sensitive switch set, those 3 new variables will retain not only the value but also the UNIT information from the three system parameters. With existing parameters, this isn't possible. Without the Units sensitive switch, it isn't possible. You need both.

(4) Save the relations; Regenerate the model. If you get an error, you've either skipped step #1 or you've mistyped something.

(5) Open the PARAMETERS tool. Under UnitsMass you'll see the value of PRO_MP_MASS but also, in the units column, the mass units for that value. This goes the same for UnitsDensity and UnitsLength.

If it's possible in ModelCheck to examine these units, you're home free. I suspect it's not that easy.

To view the units information in Pro/REPORT (or on a BOM) use the report parameter &asm.mbr.ptc_unit.<variable_name> where <variable_name> is UnitsMass, UnitsDensity, or UnitsLength. (ie. &asm.mbr.ptc_unit.UnitsLength).

Summary:

I typically set those three relations in my start part and hide them away under the "Post Regeneration" tab. Typically I don't need them. However, occasionally we get requests for a top level breakdown of all mass properties (mass, CG, and units) for a large assembly. Using Pro/REPORT and a custom table, I can list every part and it's associated mass, CG, and units.

Pulling the units data using Toolkit or JLink (or possibly even Weblink) is more direct but much more cumbersome. Using this technique you can leverage the capabiltiy of new parameters to retain units information and use that data downstream.

Not sure if that gets you through ModelCheck... but it does give you the information you wanted.

Thanks!

-Brian

PS: Be aware some people may direct you to pull the units information directly from the Pro/E MATERIAL file. This is a dead end. While you can pull this information, the units in the material file are static. They do not update and will not change if you switch your model units between IPS and mmks.

1-Visitor
September 13, 2012

Hi Brian,

We are currently employing the same method to report mass properties of a model.

mass=pro_mp_mass. and it's on the post regeneration window. However I want to find out what might be the draw backs of calling up the properties directly from the system reported mass.

Couldn't we just use &asm.mbr.pro_mp_mass in the case of the Assembly BOM using Pro/REPORT and for our component drawings, we currently use &mass to display the mass, can't we just use &pro_mp_mass.

I can't think of a scenario where this would prove inconvenient. Do you know maybe of the shortcomings of doing it like this?

Thanks.

13-Aquamarine
October 7, 2012

Hi Tshepo..

There should be no drawback to simply using &asm.mbr.pro_mp_mass

Setting a relation mass = pro_mp_mass really doesn't do anything for you as far as the mass goes. It's not saving you anything. In fact, it's just adding an extra relation you don't need. So then why have it at all?

My long post above was showing you how to grab the UNITS of the mass value... not the mass value itself. If you just need the mass value, you can just use pro_mp_mass. If you want to know what units that mass value is being reported in, you have no way to get it.

By using the technique I gave in that really long email, you can grab those units. Sometimes people set the units incorrectly and this can negatively impact your final mass props calculations. The technique I outlined provides a method to grab those units. Now you can report both the mass value and the units. These values can be reported in a BOM or in the model tree so you can check them and verify they're correct.

Just to be crystal clear... you don't need to set that extra relation (mass=pro_mp_mass) unless you're interested in the units. Most people don't care about the units- until they hit a problem and then they want to report the units and can't get them. This technique (above) solves that problem.

Thanks!

-Brian

llie17-PeridotAuthor
17-Peridot
December 10, 2013

I noticed that in Brian's post above where he shows two images, the 2.500 only goes to 3 places.

Does anyone know how to take it to 6 places? PRO_MP_MASS report actually shows 6 places (1210.717622)

24-Ruby III
December 11, 2013

Hi,

you can edit note containing a parametr name and add [.6] behind it.

Martin Hanak

18-Opal
October 20, 2015

Hi Lance,

If one of the responses helped resolve your issue, would you please mark it as the Correct Answer?  That way other users visiting the discussion will know; as the correct answer gets copied right below the question.

Thanks,

Amit