I could not find any ProDimension* function to get the units of a dimension
from the sketch.
What I find is that all the dimensions are in the units of the model which
we can get using ProMdlPrincipalunitsystemGet()
For the angle dimensions though I can see in the sketch that the dimensions
are in degrees, but ProUnitExpressionGet always returns "rad" for angles.
Here is the code snippet for the dimension visit function.
ProDimensionTypeGet(dim, &dim_type);
ifail = ProMdlPrincipalunitsystemGet(dim->owner, &principal_system);
if (dim_type == PRODIMTYPE_ANGLE)
{
ifail = ProUnitsystemUnitGet(&principal_system, PRO_UNITTYPE_ANGLE,
&unititem);
/* dimUnit is always "rad" */
ifail = ProUnitExpressionGet(&unititem, dimUnit);
}
Please let me know if there is another way to get the units of dimensions
in the sketch.
Regards,
Vinay
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.