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

ProUnitConversionGet

pwilliams-3
10-Marble

ProUnitConversionGet

All,

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?



Patrick Williams

Application Engineer

Steelcase Inc.




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.
1 REPLY 1

--- "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


Announcements
Attention: Creo 7.0 Customers
Please consider upgrading
End of Life announcement here.

NEW Creo+ Topics:
PTC Control Center
Creo+ Portal
Real-time Collaboration