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