<?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: layout name to excel or csv in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/layout-name-to-excel-or-csv/m-p/11206523#M83657</link>
    <description>&lt;P&gt;CSV Comma Seperated Values is not a csv file where a Tab is used as seperator in the true sense, understand why you did it that way.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SeaHaven_0-1654050013765.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1074469i252B2FC665083BE2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SeaHaven_0-1654050013765.png" alt="SeaHaven_0-1654050013765.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Its easy to do (write-line (strcat dwgname "," layoutname) handle) then no confusion. Also "," = (chr 44)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just me "handle" is a valid Autocad reserved name so would not use it as a variable name.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 01 Jun 2022 02:22:07 GMT</pubDate>
    <dc:creator>Sea-Haven</dc:creator>
    <dc:date>2022-06-01T02:22:07Z</dc:date>
    <item>
      <title>layout name to excel or csv</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/layout-name-to-excel-or-csv/m-p/9056058#M83646</link>
      <description>&lt;P&gt;hi all I have many layout but I want to send to Excel or csv&lt;/P&gt;&lt;P&gt;who can help me write some lisp&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Untitled.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/682572iCFCF8C6D9C0406E5/image-size/large?v=v2&amp;amp;px=999" role="button" title="Untitled.png" alt="Untitled.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2019 03:53:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/layout-name-to-excel-or-csv/m-p/9056058#M83646</guid>
      <dc:creator>chan230984</dc:creator>
      <dc:date>2019-09-30T03:53:38Z</dc:date>
    </item>
    <item>
      <title>Re: layout name to excel or csv</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/layout-name-to-excel-or-csv/m-p/9056104#M83647</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3851937"&gt;@chan230984&lt;/a&gt;&amp;nbsp; hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;check this on&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;enjoy&lt;/P&gt;&lt;P&gt;moshe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;; Layout To Excel CSV

(defun c:lay2Csv (/ fname f)
 (setq fname (strcat (getvar "dwgprefix") (vl-filename-base (getvar "dwgname")) ".csv"))
 (if (setq f (open fname "w"))
  (progn
   (foreach lay (layoutlist)
    (write-line lay f)
   ); foreach

   (setq f (close f))
   (prompt (strcat "\nCreating " fname " file."))
  ); progn
 ); if

 (princ)	
)  &lt;/PRE&gt;</description>
      <pubDate>Mon, 30 Sep 2019 05:15:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/layout-name-to-excel-or-csv/m-p/9056104#M83647</guid>
      <dc:creator>Moshe-A</dc:creator>
      <dc:date>2019-09-30T05:15:02Z</dc:date>
    </item>
    <item>
      <title>Re: layout name to excel or csv</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/layout-name-to-excel-or-csv/m-p/11203693#M83648</link>
      <description>&lt;P&gt;This works great, Is there a way to include dwg name on first column of excel?. Thank you in advance.&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 04:06:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/layout-name-to-excel-or-csv/m-p/11203693#M83648</guid>
      <dc:creator>lavarias.jayson.v</dc:creator>
      <dc:date>2022-05-31T04:06:43Z</dc:date>
    </item>
    <item>
      <title>Re: layout name to excel or csv</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/layout-name-to-excel-or-csv/m-p/11203828#M83649</link>
      <description>&lt;LI-CODE lang="lisp"&gt;(vl-load-com)

(defun c:lay2csv (/ file handle layouts dwgname)
  (setq dwgname (strcat (getvar "dwgprefix") (getvar "dwgname"))
        file    (strcat (getvar "dwgprefix") (vl-filename-base (getvar "dwgname")) ".csv")
  ) ;_ end of setq
  (if (setq handle (open file "w"))
    (progn
      (setq layouts (vla-get-layouts (vla-get-activedocument (vlax-get-acad-object))))
      (write-line "File\tLayout name\tCount" handle)
      (foreach item (layoutlist)
        (write-line
          (strcat dwgname "\t" item "\t" (itoa (vla-get-count (vla-get-block (vla-item layouts item)))))
          handle
        ) ;_ end of write-line
      ) ;_ end of foreach
      (close handle)
      (princ (strcat "\nAll data saved to " file))
    ) ;_ end of progn
  ) ;_ end of if
  (princ)
) ;_ end of defun
&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 31 May 2022 05:47:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/layout-name-to-excel-or-csv/m-p/11203828#M83649</guid>
      <dc:creator>kpblc2000</dc:creator>
      <dc:date>2022-05-31T05:47:49Z</dc:date>
    </item>
    <item>
      <title>Re: layout name to excel or csv</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/layout-name-to-excel-or-csv/m-p/11204131#M83650</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/252430"&gt;@kpblc2000&lt;/a&gt;&amp;nbsp; for your urgent response.&lt;/P&gt;&lt;P&gt;What I need is to reflect the dwg names on the first column and the layout names on the second column.&lt;/P&gt;&lt;P&gt;Will this be possible? Thank you.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lavariasjaysonv_0-1653986482538.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1073939i50B8F4646181911E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lavariasjaysonv_0-1653986482538.png" alt="lavariasjaysonv_0-1653986482538.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 08:42:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/layout-name-to-excel-or-csv/m-p/11204131#M83650</guid>
      <dc:creator>lavarias.jayson.v</dc:creator>
      <dc:date>2022-05-31T08:42:42Z</dc:date>
    </item>
    <item>
      <title>Re: layout name to excel or csv</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/layout-name-to-excel-or-csv/m-p/11204154#M83651</link>
      <description>&lt;P&gt;You see I tried to add "entities range at layout" because empty layouts will contain 0 entities. And you can filter empty layouts. If you don't need it, try this one:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="lisp"&gt;(vl-load-com)

(defun c:lay2csv (/ file handle layouts dwgname)
  (setq file (strcat (getvar "dwgprefix") (setq dwgname (vl-filename-base (getvar "dwgname"))) ".csv")
  ) ;_ end of setq
  (if (setq handle (open file "w"))
    (progn
      (write-line "File\tLayout name" handle) ; comment (place semicolon at the start of line) this line if you don't need table header
      (foreach item (layoutlist)
        (write-line (strcat dwgname "\t" item) handle)
      ) ;_ end of foreach
      (close handle)
      (princ (strcat "\nAll data saved to " file))
    ) ;_ end of progn
  ) ;_ end of if
  (princ)
) ;_ end of defun&lt;/LI-CODE&gt;
&lt;P&gt;P.S. I didn't check it&lt;/P&gt;
&lt;P&gt;P.P.S. Sorry for my English&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 08:51:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/layout-name-to-excel-or-csv/m-p/11204154#M83651</guid>
      <dc:creator>kpblc2000</dc:creator>
      <dc:date>2022-05-31T08:51:46Z</dc:date>
    </item>
    <item>
      <title>Re: layout name to excel or csv</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/layout-name-to-excel-or-csv/m-p/11204319#M83652</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/252430"&gt;@kpblc2000&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's the result of the program.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lavariasjaysonv_0-1653990443815.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1074014iD187B5217FE0CF2B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lavariasjaysonv_0-1653990443815.png" alt="lavariasjaysonv_0-1653990443815.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Filename and layout name shared the same column. It is possible to have the Filename on Column A and layout name on column B?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 09:48:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/layout-name-to-excel-or-csv/m-p/11204319#M83652</guid>
      <dc:creator>lavarias.jayson.v</dc:creator>
      <dc:date>2022-05-31T09:48:47Z</dc:date>
    </item>
    <item>
      <title>Re: layout name to excel or csv</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/layout-name-to-excel-or-csv/m-p/11204441#M83653</link>
      <description>&lt;P&gt;During import data to Excel try to select "Tab symbol" as a delimiter.&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 10:48:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/layout-name-to-excel-or-csv/m-p/11204441#M83653</guid>
      <dc:creator>kpblc2000</dc:creator>
      <dc:date>2022-05-31T10:48:50Z</dc:date>
    </item>
    <item>
      <title>Re: layout name to excel or csv</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/layout-name-to-excel-or-csv/m-p/11204460#M83654</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/252430"&gt;@kpblc2000&lt;/a&gt;&amp;nbsp; Thanks.&lt;/P&gt;&lt;P&gt;where should I place the tab symbol on the program? pardon, I totally new with lisp program. Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 10:56:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/layout-name-to-excel-or-csv/m-p/11204460#M83654</guid>
      <dc:creator>lavarias.jayson.v</dc:creator>
      <dc:date>2022-05-31T10:56:49Z</dc:date>
    </item>
    <item>
      <title>Re: layout name to excel or csv</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/layout-name-to-excel-or-csv/m-p/11204785#M83655</link>
      <description>&lt;P&gt;Not at program. During importing.&lt;/P&gt;
&lt;P&gt;You can replace&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;\t&lt;/LI-CODE&gt;
&lt;P&gt;symbol to any you want &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 12:46:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/layout-name-to-excel-or-csv/m-p/11204785#M83655</guid>
      <dc:creator>kpblc2000</dc:creator>
      <dc:date>2022-05-31T12:46:42Z</dc:date>
    </item>
    <item>
      <title>Re: layout name to excel or csv</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/layout-name-to-excel-or-csv/m-p/11204871#M83656</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/252430"&gt;@kpblc2000&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot. Got It now&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 13:09:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/layout-name-to-excel-or-csv/m-p/11204871#M83656</guid>
      <dc:creator>lavarias.jayson.v</dc:creator>
      <dc:date>2022-05-31T13:09:54Z</dc:date>
    </item>
    <item>
      <title>Re: layout name to excel or csv</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/layout-name-to-excel-or-csv/m-p/11206523#M83657</link>
      <description>&lt;P&gt;CSV Comma Seperated Values is not a csv file where a Tab is used as seperator in the true sense, understand why you did it that way.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SeaHaven_0-1654050013765.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1074469i252B2FC665083BE2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SeaHaven_0-1654050013765.png" alt="SeaHaven_0-1654050013765.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Its easy to do (write-line (strcat dwgname "," layoutname) handle) then no confusion. Also "," = (chr 44)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just me "handle" is a valid Autocad reserved name so would not use it as a variable name.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2022 02:22:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/layout-name-to-excel-or-csv/m-p/11206523#M83657</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2022-06-01T02:22:07Z</dc:date>
    </item>
    <item>
      <title>Re: layout name to excel or csv</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/layout-name-to-excel-or-csv/m-p/11206907#M83658</link>
      <description>&lt;P&gt;File name can contain commas so using comma as delimiter (i think) can't guarantee result.&lt;/P&gt;
&lt;P&gt;About ""handle" is a valid Autocad reserved name" - never heard about it. Up to ACAD20221 this code work correctly.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2022 07:11:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/layout-name-to-excel-or-csv/m-p/11206907#M83658</guid>
      <dc:creator>kpblc2000</dc:creator>
      <dc:date>2022-06-01T07:11:19Z</dc:date>
    </item>
  </channel>
</rss>

