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

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Dimension Round Up fraction retrieve API in OTK / ToolKit

bdhamdhere
4-Participant

Dimension Round Up fraction retrieve API in OTK / ToolKit

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?

1 ACCEPTED SOLUTION

Accepted Solutions
FV
17-Peridot
17-Peridot
(To:ptc-6737818)

4 REPLIES 4

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

FV
17-Peridot
17-Peridot
(To:bdhamdhere)

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.

ptc-6737818
9-Granite
(To:FV)

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

FV
17-Peridot
17-Peridot
(To:ptc-6737818)

user guide quoteuser guide...

Top Tags