Main Page | Report this Page
Computers Forum Index  »  Computer - Autocad  »  how to force decimal places for strings...
Page 1 of 1    

how to force decimal places for strings...

Author Message
classix...
Posted: Mon Jun 29, 2009 7:24 am
Guest
Hi
I wrote a lisp routine to get the area of a polyline in autocad placed
into an attribute. I use rtos to get decimal places rounded to 1,2,3
or 4 decimals. Everything works fine exept for strings ending with
zero.
Is it possible to force a string to decimal places? e.g 4.00 instead
of 4
Any suggestions welcome.
Marcus
 
P.C....
Posted: Mon Jun 29, 2009 8:36 pm
Guest
On 29 Jun., 09:24, classix <marcus.kr... at (no spam) einherzfuerpixel.de> wrote:
Quote:
Hi
I wrote a lisp routine to get the area of a polyline in autocad placed
into an attribute. I use rtos to get decimal places rounded to 1,2,3
or 4 decimals. Everything works fine exept for strings ending with
zero.
Is it possible to force a string to decimal places? e.g 4.00 instead
of 4
Any suggestions welcome.
Marcus

Has you tried Strcat the ".00 ", Rtos allready deliver a string.
 
classix...
Posted: Mon Jun 29, 2009 9:38 pm
Guest
On 29 Jun., 22:36, "P.C." <per.cor... at (no spam) privat.dk> wrote:
Quote:
On 29 Jun., 09:24, classix <marcus.kr... at (no spam) einherzfuerpixel.de> wrote:

Hi
I wrote a lisp routine to get the area of a polyline in autocad placed
into an attribute. I use rtos to get decimal places rounded to 1,2,3
or 4 decimals. Everything works fine exept for strings ending with
zero.
Is it possible to force a string to decimal places? e.g 4.00 instead
of 4
Any suggestions welcome.
Marcus

Has you tried Strcat the ".00 ", Rtos allready deliver a string.

That would not work for strings with decimal places (e.g. 12.51)
 
 
Page 1 of 1    
All times are GMT
The time now is Wed Dec 02, 2009 5:11 am