<?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: Using expression to add amount to a linear dimension? in AutoCAD Forum</title>
    <link>https://forums.autodesk.com/t5/autocad-forum/using-expression-to-add-amount-to-a-linear-dimension/m-p/5603491#M332074</link>
    <description>&lt;BLOCKQUOTE&gt;....&amp;nbsp; Another advantage of that approach is that if you need to change the sizes of things [column spacings, etc.], and you do that by Stretching, the text content of these Dimensions will update accordingly, which it will &lt;EM&gt;not&lt;/EM&gt; if overridden with something like the Plus50 routine.&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Apropos of the issue of actual vs. overage size, if there's room within your Dimensions for longer text content, try this approach:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(defun C:Plus50 (/ dimss n dimobj)&lt;BR /&gt;&amp;nbsp; ; = override linear Dimension content with measured length Plus 50 drawing units&lt;BR /&gt;&amp;nbsp; (if (setq dimss (ssget ":L" '((0 . "DIMENSION"))))&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (repeat (setq n (sslength dimss))&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (setq dimobj (vlax-ename-&amp;gt;vla-object (ssname dimss (setq n (1- n)))))&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (if (wcmatch (substr (vla-get-ObjectName dimobj) 5 5) "Align,Rotat")&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; linear types [not Angular, Ordinate, Radius, Diameter, etc.]&amp;lt;--- allow some of those?&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (vla-put-TextOverride&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dimobj&lt;BR /&gt;&lt;FONT color="#ff0000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (strcat ; new text override&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#ff0000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "&amp;lt;&amp;gt; [+ trim allowance = "&lt;FONT color="#3366ff"&gt; ; &amp;lt;&amp;gt; = actual measurement&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#ff0000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (rtos (+ (vla-get-Measurement dimobj) 50))&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#ff0000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "]"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#ff0000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ); strcat&lt;/FONT&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ); vla-put-...&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ); if&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ); repeat&lt;BR /&gt;&amp;nbsp; ); if&lt;BR /&gt;); defun&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That would at least update the "real" Dimension if Stretched, though to also update the trim-allowance dimension you'd still need to run the routine again.&lt;/P&gt;</description>
    <pubDate>Wed, 22 Apr 2015 17:28:08 GMT</pubDate>
    <dc:creator>Kent1Cooper</dc:creator>
    <dc:date>2015-04-22T17:28:08Z</dc:date>
  </channel>
</rss>

