how to force decimal places for strings

Discussion in 'AutoCAD' started by classix, Jun 29, 2009.

  1. classix

    classix 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
     
    classix, Jun 29, 2009
    #1
  2. classix

    P.C. Guest

    Has you tried Strcat the ".00 ", Rtos allready deliver a string.
     
    P.C., Jun 29, 2009
    #2
  3. classix

    classix Guest

    That would not work for strings with decimal places (e.g. 12.51)
     
    classix, Jun 29, 2009
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.