Remove decimal point?

Honored Contributor
Honored Contributor

Is there formatting to remove a decimal point from an annotation display.

 

For example, I have a variable with the value 17.875. For part numbering and digit limitation purposes I want to display 1788. Is there a way to get that done? This is using the annotation callout function. I know how to add a switch to limit the charactors, but I dont know how to control the rounding remove the decimal display. I believe the existing rounding rules only applies to dimensions.

3 REPLIES

Re: Remove decimal point?

Honored Contributor
Honored Contributor

I found that the rounding happens automatically as the number of digits are controlled. The list of switches does not include decimal formatting other than comma vs decimal. I don't believe this can be done. A work around would have been to display the two caractors left of the decimal followed by the two charators right of the decimal if I could only display the two charactors right of the decimal place.

 

Is there a way to "truncate" the number so I could subtract the truncated number from the full number....then display the result to gain the last two decimal places?

Re: Remove decimal point?

Esteemed Contributor
Esteemed Contributor

Can you create another variable were the number is multiplied by 100, and then don't show any decimal places?


Thanks,
Ken

Production: ST9 MP10
Testing: ST10 MP3

Re: Remove decimal point?

Honored Contributor
Honored Contributor

Great solution Grundey.