--- "Williams, Patrick S." <-> wrote:
>
> I would like to determine the unit system that a model is using for
> length and always convert it to MM for some internal calculations. I
> found the function ProUnitConversionGet but I'm not sure how to use it
> properly and the documentation isn't very clear. Has anyone used this
> successfully to do the aforementioned?
I've not used it yet, but it seems improperly documented. The include
file ProMdlUnits.h has a better calling signature:
ProError ProUnitConversionGet (
ProUnititem *unit, /* Input */
ProUnitConversion *conversion, /* Output */
ProUnititem *ref_unit /* Output */
);
Seems strange that you would give it a unit and it would figure out
what the reference unit is and the conversion factor. Possibly, one
of the output parameters above is really an input parameter, but more
likely that the ref_unit is the default (i.e. inches if length unit)
or (most likely) the current units of the model.
Marc