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.
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
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.
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 -
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.
Patrick Williams | Engineering Systems | Sr. Applications Engineer | Steelcase Inc. | 616.698.4078