Message 1 of 5

Not applicable
09-15-2019
11:00 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to put a bearing and distance on every line in a drawing with 3 decimal places on the distance.
I have got the routine to save the needed values but when I write them to text the distance has a bunch of trailing zeros. I need to limit the decimal places to 3.
(setq Dist (getpropertyvalue line "length")) ;line is set to an entity from a defined selection set
(Dist+ (atof (rtos dist 2 3))) ;This should round the value to 3 decimal places
(command "_.text" "s" "micro" "j" "m" Dpoint TxtHt AngDMS Dist+) ;Dpoint, TxtHt, AngDMS are all defined parameters
The printed text is rounded to 3 decimal places but still prints the trailing zeros.
How can I limit the zeros?
Solved! Go to Solution.