<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Help modifying this Lisp. in AutoCAD Forum</title>
    <link>https://forums.autodesk.com/t5/autocad-forum/help-modifying-this-lisp/m-p/5689137#M331522</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;
&lt;P&gt;I have contours ranging from full meter intervals down to 1/8m intervals, but id like the labels to display as this to save space;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;68&lt;/P&gt;
&lt;P&gt;68.5&lt;/P&gt;
&lt;P&gt;68.25&lt;/P&gt;
&lt;P&gt;68.125&lt;/P&gt;
&lt;P&gt;....&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;(vl-string-right-trim ".0" "YourString")&lt;/P&gt;
&lt;P&gt;will take off all trailing zeros and decimals.&amp;nbsp; BUT if you use it on something like "60.0000", it will turn that into just "6".&amp;nbsp; So:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(if (= (rem (atof "YourString") 10.0) 0); it's a whole multiple of 10 [keep any zero(s) before the decimal]&lt;/P&gt;
&lt;P&gt;&amp;nbsp; (itoa (atoi "YourString")); then&lt;/P&gt;
&lt;P&gt;&amp;nbsp; (vl-string-right-trim ".0" "YourString"); else&lt;/P&gt;
&lt;P&gt;); if&lt;/P&gt;</description>
    <pubDate>Tue, 23 Jun 2015 12:12:41 GMT</pubDate>
    <dc:creator>Kent1Cooper</dc:creator>
    <dc:date>2015-06-23T12:12:41Z</dc:date>
  </channel>
</rss>

