Skip to main content
1-Visitor
July 13, 2018
Solved

Dimension Round Up fraction retrieve API in OTK / ToolKit

  • July 13, 2018
  • 2 replies
  • 3705 views

Drawing contains various dimensions with different rounded up display value set  by designers as below:

Dim   Rounded    Original

d1      154.32      154.3204

d2      150.450    150.45001

 

Dimension retrieve API is getting the Original value instead of display value which is rounded up.

Is there any API to retrieve rounded up value or round precision point location?

    Best answer by FV_01

    user guide quoteuser guide...

    2 replies

    1-Visitor
    July 17, 2018

    You can give it a try for below approach:

     

    • default_dec_places is the configuration option for decimals.
    • use API ProConfigoptGet() to figure out value of above option
    • Value will let you know dimension to be rounded off to how many decimals
    • Post this, use c++ functionality to round up dimensions

     

    You can check using API ProDimensionIsDisplayRoundedValue() whether dimension displayed as rounded value or not.

     

    - HIH

    Ketan

    July 17, 2018

    Hello all,

    One would need to use ProDimensionDisplayedValueGet(...) to get a displayed value. Comparing this value with return of ProDimensionValueGet(...) would tell you if a dimension is in 'rounded' state. 

    HIH.

    FV.

    7-Bedrock
    July 31, 2018

    functionality seems to be missing in OTK C++ API, is there any way to call ProToolKit method in C++ OTK Application?

    FV_0117-PeridotAnswer
    August 6, 2018

    user guide quoteuser guide...