<?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 Betreff: Autocad total length by selecting multiple dimension in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-total-length-by-selecting-multiple-dimension/m-p/10871069#M118915</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous&amp;nbsp; schrieb:&lt;BR /&gt;&lt;P&gt;Hi Friends...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have multiple dimensions in separate location. I just want to know, is there anyway to find the total length by selecting together those dimension?. I wish I could have a LISP. Please help. Its really urgent&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Hi, I'm a bit late, but I found one LISP that we use on work.&lt;/P&gt;&lt;LI-CODE lang="general"&gt;;|

TLEN.LSP - Total LENgth of selected objects
(c) 1998 Tee Square Graphics

|;

(defun C:TLEN (/ ss tl n ent itm obj l)
  (setq ss (ssget)
        tl 0
        n (1- (sslength ss)))
  (while (&amp;gt;= n 0)
    (setq ent (entget (setq itm (ssname ss n)))
          obj (cdr (assoc 0 ent))
          l (cond
              ((= obj "LINE")
                (distance (cdr (assoc 10 ent))(cdr (assoc 11 ent))))
              ((= obj "ARC")
                (* (cdr (assoc 40 ent))
                   (if (minusp (setq l (- (cdr (assoc 51 ent))
                                          (cdr (assoc 50 ent)))))
                     (+ pi pi l) l)))
              ((or (= obj "CIRCLE")(= obj "SPLINE")(= obj "POLYLINE")
                   (= obj "LWPOLYLINE")(= obj "ELLIPSE"))
                (command "_.area" "_o" itm)
                (getvar "perimeter"))
              (T 0))
          tl (+ tl l)
          n (1- n)))
  (alert (strcat "Total length of selected objects is " (rtos tl)))
  (princ)
)
&lt;/LI-CODE&gt;</description>
    <pubDate>Tue, 11 Jan 2022 09:39:22 GMT</pubDate>
    <dc:creator>tarik.rock92</dc:creator>
    <dc:date>2022-01-11T09:39:22Z</dc:date>
    <item>
      <title>Autocad total length by selecting multiple dimension</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-total-length-by-selecting-multiple-dimension/m-p/7160910#M118906</link>
      <description>&lt;P&gt;Hi Friends...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have multiple dimensions in separate location. I just want to know, is there anyway to find the total length by selecting together those dimension?. I wish I could have a LISP. Please help. Its really urgent&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jun 2017 08:29:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-total-length-by-selecting-multiple-dimension/m-p/7160910#M118906</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-19T08:29:17Z</dc:date>
    </item>
    <item>
      <title>Re: Autocad total length by selecting multiple dimension</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-total-length-by-selecting-multiple-dimension/m-p/7161196#M118907</link>
      <description>&lt;P&gt;You can use the AddLen LISP utility to sum dimensions - see &lt;A href="http://www.cadstudio.cz/freeware" target="_blank"&gt;www.cadstudio.cz/freeware&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Vladimir Michl, &lt;A href="http://www.cadstudio.cz" target="_blank"&gt;www.cadstudio.cz&lt;/A&gt; &amp;nbsp;&lt;A href="http://www.cadforum.cz" target="_blank"&gt;www.cadforum.cz&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jun 2017 11:25:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-total-length-by-selecting-multiple-dimension/m-p/7161196#M118907</guid>
      <dc:creator>vladimir_michl</dc:creator>
      <dc:date>2017-06-19T11:25:38Z</dc:date>
    </item>
    <item>
      <title>Re: Autocad total length by selecting multiple dimension</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-total-length-by-selecting-multiple-dimension/m-p/7161293#M118908</link>
      <description>&lt;P&gt;You can also try &lt;A href="https://sites.google.com/site/cadkits/home/adddim" target="_self"&gt;ADDDIM&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jun 2017 12:12:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-total-length-by-selecting-multiple-dimension/m-p/7161293#M118908</guid>
      <dc:creator>3wood</dc:creator>
      <dc:date>2017-06-19T12:12:28Z</dc:date>
    </item>
    <item>
      <title>Re: Autocad total length by selecting multiple dimension</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-total-length-by-selecting-multiple-dimension/m-p/7161892#M118909</link>
      <description>&lt;P&gt;Dear Vladimir&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks lot for your advise. Its works great!!!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;However, Its shows the real value and always asking me to save a .sdf file. May I know why it is?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jun 2017 15:12:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-total-length-by-selecting-multiple-dimension/m-p/7161892#M118909</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-19T15:12:07Z</dc:date>
    </item>
    <item>
      <title>Re: Autocad total length by selecting multiple dimension</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-total-length-by-selecting-multiple-dimension/m-p/7162036#M118910</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;
&lt;P&gt;....&amp;nbsp;is there anyway to find the total length by selecting together those dimension?. ....&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;In simplest terms:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(defun C:DIMLINADD (/ ss n)
  (setq total 0)
  (if (setq ss (ssget '((0 . "DIMENSION"))))
    (repeat (setq n (sslength ss))
      (setq total (+ total (cdr (assoc 42 (entget (ssname ss (setq n (1- n))))))))
    )
  )
  total
)&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HOWEVER, that doesn't limit your selection to &lt;EM&gt;linear&lt;/EM&gt; kinds of Dimensions, so if you pick any &lt;EM&gt;angular&lt;/EM&gt; ones, it will include the angle of each [in radians] in the total, as if it's a "length."&amp;nbsp; It could be made to step through each Dimension and check &lt;EM&gt;what kind&lt;/EM&gt; it is before adding it into the total, if needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It leaves the total in the 'total' variable value [which is not localized, so it will remain], for you to use in something if you want more than just a &lt;EM&gt;report&lt;/EM&gt; of the total length.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jun 2017 15:44:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-total-length-by-selecting-multiple-dimension/m-p/7162036#M118910</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2017-06-19T15:44:48Z</dc:date>
    </item>
    <item>
      <title>Re: Autocad total length by selecting multiple dimension</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-total-length-by-selecting-multiple-dimension/m-p/7163550#M118911</link>
      <description>&lt;P&gt;Dear 3Wood,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your help and advise. While I'm trying this, its asking me to register. So is it vital?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jun 2017 04:12:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-total-length-by-selecting-multiple-dimension/m-p/7163550#M118911</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-20T04:12:15Z</dc:date>
    </item>
    <item>
      <title>Re: Autocad total length by selecting multiple dimension</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-total-length-by-selecting-multiple-dimension/m-p/7166729#M118912</link>
      <description>&lt;P&gt;You can just ESC the file-export prompt or suppress it completely by setting the LISP variable:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(setq AddLenNoFile T)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Vladimir Michl, &lt;A href="http://www.cadstudio.cz" target="_blank"&gt;www.cadstudio.cz&lt;/A&gt; &amp;nbsp;&lt;A href="http://www.cadforum.cz" target="_blank"&gt;www.cadforum.cz&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2017 05:46:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-total-length-by-selecting-multiple-dimension/m-p/7166729#M118912</guid>
      <dc:creator>vladimir_michl</dc:creator>
      <dc:date>2017-06-21T05:46:23Z</dc:date>
    </item>
    <item>
      <title>Re: Autocad total length by selecting multiple dimension</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-total-length-by-selecting-multiple-dimension/m-p/10869790#M118913</link>
      <description>&lt;P&gt;Is there a way to make this work for and give you the total Foot/Inches?&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jan 2022 19:07:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-total-length-by-selecting-multiple-dimension/m-p/10869790#M118913</guid>
      <dc:creator>sbussDVCLP</dc:creator>
      <dc:date>2022-01-10T19:07:24Z</dc:date>
    </item>
    <item>
      <title>Re: Autocad total length by selecting multiple dimension</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-total-length-by-selecting-multiple-dimension/m-p/10869954#M118914</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/11902997"&gt;@sbussDVCLP&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Is there a way to make this work for and give you the total Foot/Inches?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;If your Units are Architectural, you can replace the line in Message 5 that says simply&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier" color="#000000"&gt;&amp;nbsp; total&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;with this:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" color="#000000"&gt;&amp;nbsp; &lt;STRONG&gt;(rtos total)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It will report according to your current Units mode and precision settings.&amp;nbsp; If you want the result differently, you can specify the mode and precision [read about the&lt;FONT face="courier new,courier" color="#000000"&gt;&lt;STRONG&gt; (rtos)&lt;/STRONG&gt; &lt;/FONT&gt;function].&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jan 2022 20:25:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-total-length-by-selecting-multiple-dimension/m-p/10869954#M118914</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2022-01-10T20:25:38Z</dc:date>
    </item>
    <item>
      <title>Betreff: Autocad total length by selecting multiple dimension</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-total-length-by-selecting-multiple-dimension/m-p/10871069#M118915</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous&amp;nbsp; schrieb:&lt;BR /&gt;&lt;P&gt;Hi Friends...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have multiple dimensions in separate location. I just want to know, is there anyway to find the total length by selecting together those dimension?. I wish I could have a LISP. Please help. Its really urgent&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Hi, I'm a bit late, but I found one LISP that we use on work.&lt;/P&gt;&lt;LI-CODE lang="general"&gt;;|

TLEN.LSP - Total LENgth of selected objects
(c) 1998 Tee Square Graphics

|;

(defun C:TLEN (/ ss tl n ent itm obj l)
  (setq ss (ssget)
        tl 0
        n (1- (sslength ss)))
  (while (&amp;gt;= n 0)
    (setq ent (entget (setq itm (ssname ss n)))
          obj (cdr (assoc 0 ent))
          l (cond
              ((= obj "LINE")
                (distance (cdr (assoc 10 ent))(cdr (assoc 11 ent))))
              ((= obj "ARC")
                (* (cdr (assoc 40 ent))
                   (if (minusp (setq l (- (cdr (assoc 51 ent))
                                          (cdr (assoc 50 ent)))))
                     (+ pi pi l) l)))
              ((or (= obj "CIRCLE")(= obj "SPLINE")(= obj "POLYLINE")
                   (= obj "LWPOLYLINE")(= obj "ELLIPSE"))
                (command "_.area" "_o" itm)
                (getvar "perimeter"))
              (T 0))
          tl (+ tl l)
          n (1- n)))
  (alert (strcat "Total length of selected objects is " (rtos tl)))
  (princ)
)
&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 11 Jan 2022 09:39:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autocad-total-length-by-selecting-multiple-dimension/m-p/10871069#M118915</guid>
      <dc:creator>tarik.rock92</dc:creator>
      <dc:date>2022-01-11T09:39:22Z</dc:date>
    </item>
  </channel>
</rss>

