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

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

How to get correct units for an angular dimension

vinaym
1-Visitor

How to get correct units for an angular dimension

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.
2 REPLIES 2

In ProE we set format for angular dimensiondisplay, currently we have option to set it in Degrees only.So when we see dimension it will be displayed as degrees only but when we retreive its unit using Pro/Toolkit it will return its value according to the unit system set.

vinaym
1-Visitor
(To:vinaym)

Problem is ProDimensionValueGet returns the value in degrees, and there is
no way to get the units info.
If we get the units of the model they are always radians.

Regards,

Vinay


Announcements
NEW Creo+ Topics: Real-time Collaboration


Top Tags