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

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Alternate and Reported Mass Properties

bokir
1-Newbie

Alternate and Reported Mass Properties

Hello,
Does any know if there is a way to access the parameters in Alternate
and Reported Mass Properties? These are the PRO_MP_* parameters.

I need to designate/undesignate some of these programmatically.

Thanks,
Bojan Resnik
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.
11 REPLIES 11

Bojan,
Can you please be more specific about the Alternate and Reported Mass Properties? What/where exactly do these parameters live in terms of the standard Pro/E UI?

Are the PRO_MP_* parameters defined by your start parts? If so then they can easily be accessed by calling ProParameterInit().

Patrick Williams|Sr. Applications Engineer | Engineering Systems| Steelcase Inc. | 616.698.4078 | My Site


bokir
1-Newbie
(To:bokir)

2009/8/7 Williams, Patrick S. <->:
> Bojan,
> Can you please be more specific about the Alternate and Reported Mass Properties? What/where exactly do these parameters live in terms of the standard Pro/E UI?
>
> Are the PRO_MP_* parameters defined by your start parts? If so then they can easily be accessed by calling ProParameterInit().

Yes, I meant the PRO_MP_* parameters. I can access them with
ProParameterInit(), but I was thinking of a more generic solution that
would allow me to enumerate the existing parameters without knowing
their names in advance.

--
Bojan Resnik

Oh, that's easy use ProParameterVisit(). You should be able to look up this function in the API Wizard.

Patrick Williams|Sr. Applications Engineer | Engineering Systems| Steelcase Inc. | 616.698.4078 | My Site



bokir
1-Newbie
(To:bokir)

2009/8/7 Williams, Patrick S. <->:
> Oh, that's easy use ProParameterVisit(). You should be able to look up this function in the API Wizard.

I tried that - for some reason that function visits only the actual
parameters (the Main section in Pro/ENGINEER UI). It never returns any
of the PRO_MP_* or PRO_MP_ALT_* parameters.

--
Bojan Resnik

Ok, so then back to my original question. Where do those parameters live? Basically you need to acquire a handle to a ProModelitem of the owner object. The owner object can be a model, feature, surface, or edge.



The function ProParameterInit() initializes a ProParameter object by defining its name and owner. The owner is expressed in terms of a ProModelitem object, and can be a Pro/ENGINEER model, feature, surface, or edge.



If the owner is a model, use ProMdlToModelitem() to create the ProModelitem object; in other cases, use ProModelitemInit().



Patrick Williams | Sr. Applications Engineer | Engineering Systems | Steelcase Inc. | 616.698.4078 | My Site








bokir
1-Newbie
(To:bokir)

2009/8/7 Williams, Patrick S. <->:
> Ok, so then back to my original question. Where do those parameters live?
> Basically you need to acquire a handle to a ProModelitem of the owner
> object. The owner object can be a model, feature, surface, or edge.

The owner is the model. These parameters appear in the UI when you
edit model parameters using Tools/Parameters option. In this dialog,
in the lower-right corner you can choose between "Main", "Alternative
Mass Properties" and "Reported Mass Properties".

> The function ProParameterInit() initializes a ProParameter object by
> defining its name and owner. The owner is expressed in terms of a
> ProModelitem object, and can be a Pro/ENGINEER model, feature, surface, or
> edge.
>
> If the owner is a model, use ProMdlToModelitem() to create the ProModelitem
> object; in other cases, use ProModelitemInit().

This work fine - when accessing the parameters by name with the
model as the owner, I get the ProParameter objects. However, when
visiting model parameters with ProParameterVisit(), these parameters
are not visited. Instead, ProParameterVisit() encounters only the
parameters listed in the "Main" section in the UI.

So far, the only way I found to get all these parameters is to
hard-code their names and retrieve each of them using
ProParameterInit(). However, this covers only the parameters I can see
in some particular model and a particular version of Pro/ENGINEER. I
would like to make this a bit more generic by enumerating all existing
parameters in these sections, if possible.

--
Bojan Resnik
kwsauter
1-Newbie
(To:bokir)

They show up under Tools>Parameters. Click on the arrow at the bottom
right of the parameters window where it says "Main", and you can have it
show alternate mass properties or reported mass properties.


Ken Sauter
DRS Reconnaissance Surveillance and Target Acquisition
Infrared Technologies Division
PO Box 740188
Dallas, TX 75374
972-560-6000 X2525
-

Ah, now I understand. This is a great question. I have logged a call to PTC. I will let you know what I find out.

Patrick Williams|Sr. Applications Engineer | Engineering Systems| Steelcase Inc. | 616.698.4078 | My Site



While creating the call I came across this TPI 129194.

Description
bokir
1-Newbie
(To:bokir)

2009/8/7 Williams, Patrick S. <->:
> While creating the call I came across this TPI 129194.
>
> Description

Here is the response from PTC so far...

Hi Patrick,

Personally I think ProParameterVisit() should return *all* of the parameters in a model, whether they're listed in Main, Reported Mass Properties, or Alternate mass properties. I'm seeing the results you reported, where only the parameters listed in "main" are returned by ProParameterVisit(), so I will question development.

I'm not very excited about a response that will give you what you're looking for however. I found this from a previous call:

The function ProSolidMassPropertyGet() calculates the mass properties based on geometry only. Assigned mass properties can be retrieved from the model alternate mass property parameters. Suggested setting the config.pro option "mass_property_calculate" to "automatic" and the parameter "PRO_MP_SOURCE" to "PARAMETERS". This will instruct Pro/ENGINEER to calculate the mass properties after each regeneration with the assigned mass property parameters. The mass properties can then be read from the model parameters (PRO_MP_MASS, PRO_MP_VOLUME, PRO_MP_DENSITY, PRO_MP_AREA, etc

This suggests to me that Pro/E is working as intended. At the least it's a workaround.

Best regards,

Patrick Williams | Engineering Systems | Sr. Applications Engineer | Steelcase Inc. | 616.698.4078



Top Tags