<?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: LISP/SCRIPT in copying multiple LAYOUT in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-script-in-copying-multiple-layout/m-p/7848053#M117155</link>
    <description>&lt;P&gt;Hi BeeKeeCZ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did tried running your LISP "CMLayout". But, there is an error;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"Error: bad argument value: positive 0bad argument type: VLA-OBJECT nil"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I correct this?&lt;/P&gt;</description>
    <pubDate>Tue, 13 Mar 2018 03:36:15 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-03-13T03:36:15Z</dc:date>
    <item>
      <title>LISP/SCRIPT in copying multiple LAYOUT</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-script-in-copying-multiple-layout/m-p/7257265#M117146</link>
      <description>&lt;P&gt;&lt;FONT size="4"&gt;Hi guys,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="4"&gt;I need help on creating a LISP or an SCRIPT that will copy multiple existing LAYOUT.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="4"&gt;Example:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="4"&gt;- Existing layout name " Sheet 1"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="4"&gt;- Execute a LISP/SCRIPT, let say "CMLayout"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="4"&gt;- Will ask for the existing layout name to be copied or NULL get default. Let say "Sheet 1"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="4"&gt;- Will ask for the number of times a layout to be copied. Let say "100"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="4"&gt;- The LISP or SCRIPT will then copy the existing layout in a sequence.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="4"&gt;Let say: Sheet 1, Sheet 2, Sheet 3, Sheet 4, Sheet 5, so on and so forth.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="4"&gt;Appreciate any help on this matter.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="4"&gt;Thank you,&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2017 02:29:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-script-in-copying-multiple-layout/m-p/7257265#M117146</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-07-27T02:29:26Z</dc:date>
    </item>
    <item>
      <title>Re: LISP/SCRIPT in copying multiple LAYOUT</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-script-in-copying-multiple-layout/m-p/7257534#M117147</link>
      <description>&lt;P&gt;Did you try google it? See the first one &lt;A href="https://www.google.cz/search?q=autocad+lisp+copy+layout&amp;amp;rlz=1C1GGRV_enCZ751CZ751&amp;amp;oq=autocad+lisp+copy+layout&amp;amp;aqs=chrome..69i57j69i64.5335j0j7&amp;amp;sourceid=chrome&amp;amp;ie=UTF-8" target="_self"&gt;HERE&lt;/A&gt;...&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2017 06:58:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-script-in-copying-multiple-layout/m-p/7257534#M117147</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2017-07-27T06:58:42Z</dc:date>
    </item>
    <item>
      <title>Re: LISP/SCRIPT in copying multiple LAYOUT</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-script-in-copying-multiple-layout/m-p/7257660#M117148</link>
      <description>&lt;P&gt;Actually, YES!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I did saw that and tried it. But, it does not create what I wanted and also it is not in sequence. So, I wanted to find other solutions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry but, I am not really into programming and do not know how to edit it.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2017 08:09:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-script-in-copying-multiple-layout/m-p/7257660#M117148</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-07-27T08:09:20Z</dc:date>
    </item>
    <item>
      <title>Re: LISP/SCRIPT in copying multiple LAYOUT</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-script-in-copying-multiple-layout/m-p/7257686#M117149</link>
      <description>Sorry, I must be missing something... Is the naming the issue?</description>
      <pubDate>Thu, 27 Jul 2017 08:23:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-script-in-copying-multiple-layout/m-p/7257686#M117149</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2017-07-27T08:23:25Z</dc:date>
    </item>
    <item>
      <title>Re: LISP/SCRIPT in copying multiple LAYOUT</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-script-in-copying-multiple-layout/m-p/7257753#M117150</link>
      <description>&lt;P&gt;That LISP or script, what it creates is example.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Layout 1, the next that will be created are "" Let say you want 100 copies"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Layout 1, Layout 1 (100), Layout 1 (99), Layout 1 (98) so on so forth...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What I was looking is&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Layout 1, Layout 2, Layout 3.....&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2017 08:55:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-script-in-copying-multiple-layout/m-p/7257753#M117150</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-07-27T08:55:13Z</dc:date>
    </item>
    <item>
      <title>Re: LISP/SCRIPT in copying multiple LAYOUT</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-script-in-copying-multiple-layout/m-p/7257810#M117151</link>
      <description>&lt;P&gt;Maybe you should stop fill up the sentences with "let say" so much... We are usually focus on the technical side of issue - create multiple copies.. so if your main issue is correct naming, you should point that out &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; But maybe is just me and my language lacks...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anyway, try this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(defun c:CMLayout ( / *error* oCMDECHO ctab name namer namei nname n i x )
  
  (defun *error* (errmsg)
    (if (not (wcmatch errmsg "Function cancelled,quit / exit abort,console break,end"))
      (princ (strcat "\nError: " errmsg)))
    (setvar 'CMDECHO oCMDECHO)
    (princ))
  
  (setq oCMDECHO (getvar 'CMDECHO))
  (setvar 'CMDECHO 0)

  ; --------------------------------------------------------------------------------------
  
  (setq ctab (getvar "ctab"))
  (setq name (getstring (strcat "\nLayout to duplicate &amp;lt;" ctab "&amp;gt;: ")))
  (if (= name "") (setq name ctab))
  (setq n (1+ (strlen name))
        namei "")
  
  (while (wcmatch (setq x (substr name (setq n (1- n)) 1)) "#")
    (setq namei (strcat x namei)))
  
  (setq namer (substr name 1 (- (strlen name) (strlen namei)))
        namei (atoi namei))
  
  (initget 6)
  (setq n (getint "\nHow many copies: ")
        i (+ 1 namei n))
  
  (repeat n
    (setq nname (strcat namer (itoa (setq i (1- i)))))
    (if (member nname (layoutlist))
      (princ (strcat "\nLayout '" nname " ' already exists."))
      (command "_.LAYOUT" "_Copy" name (strcat namer "a")
               "_.LAYOUT" "_Rename" (strcat namer "a") nname)))

  (setvar 'CMDECHO oCMDECHO)
  (princ)
)&lt;/PRE&gt;
&lt;P&gt;PS. You might want change the CMDECHO system variable back to 1, because that previous program changed that to 0.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2017 09:22:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-script-in-copying-multiple-layout/m-p/7257810#M117151</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2017-07-27T09:22:26Z</dc:date>
    </item>
    <item>
      <title>Re: LISP/SCRIPT in copying multiple LAYOUT</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-script-in-copying-multiple-layout/m-p/7258273#M117152</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hello Mr BeekeeCZ&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks, I appreciate your CMLayout routine !&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please what could be the Update if I would like something like:&lt;/P&gt;
&lt;P&gt;Layout001, Layout002, ... Layout100, Layout101, etc ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards, Patrice&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2017 13:05:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-script-in-copying-multiple-layout/m-p/7258273#M117152</guid>
      <dc:creator>braudpat</dc:creator>
      <dc:date>2017-07-27T13:05:45Z</dc:date>
    </item>
    <item>
      <title>Re: LISP/SCRIPT in copying multiple LAYOUT</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-script-in-copying-multiple-layout/m-p/7258328#M117153</link>
      <description>&lt;P&gt;Sure, Patrice. Glad you like it.&lt;/P&gt;
&lt;P&gt;Also added UNDO grouping.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(vl-load-com)

(defun c:CMLayout ( / *error* oCMDECHO adoc :AddLeadingZeros ctab name namer namei nname n i x )
  
  (defun *error* (errmsg)
    (if (not (wcmatch errmsg "Function cancelled,quit / exit abort,console break,end"))
      (princ (strcat "\nError: " errmsg)))
    (setvar 'CMDECHO oCMDECHO)
    (vla-endundomark adoc)
    (princ))

  (defun :AddLeadingZeros (a d / b) ;add zeros to 'd' many digits  ;a string
    (strcat (substr "000000000" 1 (if (&amp;gt;= d (setq b (strlen (itoa (fix (atof a)))))) (- d b) 0)) a))

  ; --------------------------------------------------------------------------------------
  
  (setq oCMDECHO (getvar 'CMDECHO))
  (setvar 'CMDECHO 0)

  (setq ctab (getvar "ctab"))
  (setq name (getstring (strcat "\nLayout to duplicate &amp;lt;" ctab "&amp;gt;: ")))
  (if (= name "") (setq name ctab))
  (setq n (1+ (strlen name))
        namei "")
  
  (while (wcmatch (setq x (substr name (setq n (1- n)) 1)) "#")
    (setq namei (strcat x namei)))
  
  (setq namer (substr name 1 (- (strlen name) (strlen namei)))
        namei (atoi namei))
  
  (initget 6)
  (setq n (getint "\nHow many copies: ")
        i (+ 1 namei n))

  (vla-endundomark (setq adoc (vla-get-activedocument (vlax-get-acad-object))))
  (vla-startundomark adoc)
  
  (repeat n
    (setq nname (strcat namer (:AddLeadingZeros (itoa (setq i (1- i))) 3)))
    (if (member nname (layoutlist))
      (princ (strcat "\nLayout '" nname " ' already exists."))
      (command "_.LAYOUT" "_Copy" name (strcat namer "a")
               "_.LAYOUT" "_Rename" (strcat namer "a") nname)))

  (*error* "end")
)&lt;/PRE&gt;</description>
      <pubDate>Thu, 27 Jul 2017 13:21:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-script-in-copying-multiple-layout/m-p/7258328#M117153</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2017-07-27T13:21:04Z</dc:date>
    </item>
    <item>
      <title>Re: LISP/SCRIPT in copying multiple LAYOUT</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-script-in-copying-multiple-layout/m-p/7260018#M117154</link>
      <description>&lt;P&gt;I'm sorry if that annoy's you. That is just how politely I talk/write and also to be easily understood.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anyway, I really do appreciate your time and effort exerted on my weakness. Kudos to you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jul 2017 00:35:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-script-in-copying-multiple-layout/m-p/7260018#M117154</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-07-28T00:35:34Z</dc:date>
    </item>
    <item>
      <title>Re: LISP/SCRIPT in copying multiple LAYOUT</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-script-in-copying-multiple-layout/m-p/7848053#M117155</link>
      <description>&lt;P&gt;Hi BeeKeeCZ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did tried running your LISP "CMLayout". But, there is an error;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"Error: bad argument value: positive 0bad argument type: VLA-OBJECT nil"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I correct this?&lt;/P&gt;</description>
      <pubDate>Tue, 13 Mar 2018 03:36:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-script-in-copying-multiple-layout/m-p/7848053#M117155</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-13T03:36:15Z</dc:date>
    </item>
    <item>
      <title>Re: LISP/SCRIPT in copying multiple LAYOUT</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-script-in-copying-multiple-layout/m-p/7848086#M117156</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;
&lt;P&gt;....&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"Error: bad argument value: positive 0bad argument type: VLA-OBJECT nil"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
....&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;That happens&amp;nbsp;if you start the command when in Model Space &lt;EM&gt;and&lt;/EM&gt;&amp;nbsp; accept "Model" as the offered default current tab to make copies of.&amp;nbsp; You can't make copies of Model Space.&amp;nbsp; Either be sure you're in a &lt;EM&gt;Paper&lt;/EM&gt;&amp;nbsp; Space Layout first, or if you're in Model Space, &lt;EM&gt;type in the name&lt;/EM&gt;&amp;nbsp; of a Paper Space Layout to make copies of.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Mar 2018 04:08:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-script-in-copying-multiple-layout/m-p/7848086#M117156</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2018-03-13T04:08:14Z</dc:date>
    </item>
    <item>
      <title>Re: LISP/SCRIPT in copying multiple LAYOUT</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-script-in-copying-multiple-layout/m-p/7848122#M117157</link>
      <description>&lt;P&gt;Hi Kent1Cooper,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="login-bold"&gt;I was in the paper space layout.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="login-bold"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Paper Space Layout.jpg" style="width: 705px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/474415i01022373925093D5/image-size/large?v=v2&amp;amp;px=999" role="button" title="Paper Space Layout.jpg" alt="Paper Space Layout.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Mar 2018 04:43:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-script-in-copying-multiple-layout/m-p/7848122#M117157</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-13T04:43:14Z</dc:date>
    </item>
    <item>
      <title>Re: LISP/SCRIPT in copying multiple LAYOUT</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-script-in-copying-multiple-layout/m-p/7848579#M117158</link>
      <description>&lt;P&gt;I see, the algorithm was not bulletproof and you've change the initial conditions - it's not 'Sheet 1' but just '1'... but the fix is quite easy.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(defun c:CMLayout ( / *error* oCMDECHO ctab name namer namei nname n i x )
  
  (defun *error* (errmsg)
    (if (not (wcmatch errmsg "Function cancelled,quit / exit abort,console break,end"))
      (princ (strcat "\nError: " errmsg)))
    (setvar 'CMDECHO oCMDECHO)
    (princ))
  
  (setq oCMDECHO (getvar 'CMDECHO))
  (setvar 'CMDECHO 0)

  ; --------------------------------------------------------------------------------------
  
  (setq ctab (getvar "ctab"))
  (setq name (getstring (strcat "\nLayout to duplicate &amp;lt;" ctab "&amp;gt;: ")))
  (if (= name "") (setq name ctab))
  (setq n (1+ (strlen name))
        namei "")
  
  (while (and (&amp;gt; n 1)
              (wcmatch (setq x (substr name (setq n (1- n)) 1)) "#"))
    (setq namei (strcat x namei)))
  
  (setq namer (substr name 1 (- (strlen name) (strlen namei)))
        namei (atoi namei))
  
  (initget 6)
  (setq n (getint "\nHow many copies: ")
        i (+ 1 namei n))
  
  (repeat n
    (setq nname (strcat namer (itoa (setq i (1- i)))))
    (if (member nname (layoutlist))
      (princ (strcat "\nLayout '" nname " ' already exists."))
      (command "_.LAYOUT" "_Copy" name (strcat namer "a")
               "_.LAYOUT" "_Rename" (strcat namer "a") nname)))

  (setvar 'CMDECHO oCMDECHO)
  (princ)
)&lt;/PRE&gt;</description>
      <pubDate>Tue, 13 Mar 2018 09:03:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-script-in-copying-multiple-layout/m-p/7848579#M117158</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2018-03-13T09:03:25Z</dc:date>
    </item>
    <item>
      <title>Re: LISP/SCRIPT in copying multiple LAYOUT</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-script-in-copying-multiple-layout/m-p/7851287#M117159</link>
      <description>&lt;P&gt;Hi BeeKeeCZ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate your expertise and quick assistance into this matter.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Mar 2018 00:11:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-script-in-copying-multiple-layout/m-p/7851287#M117159</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-14T00:11:56Z</dc:date>
    </item>
    <item>
      <title>Re: LISP/SCRIPT in copying multiple LAYOUT</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-script-in-copying-multiple-layout/m-p/8715239#M117160</link>
      <description>Would it be possible to have this copy a single layout, then on the new layout go into the viewport and -pan the view 72"  I have been trying to alter this to do a single but I have had no luck so far.
thank you,</description>
      <pubDate>Mon, 08 Apr 2019 16:43:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-script-in-copying-multiple-layout/m-p/8715239#M117160</guid>
      <dc:creator>gaexcalibur</dc:creator>
      <dc:date>2019-04-08T16:43:17Z</dc:date>
    </item>
    <item>
      <title>Re: LISP/SCRIPT in copying multiple LAYOUT</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-script-in-copying-multiple-layout/m-p/8715567#M117161</link>
      <description>&lt;P&gt;You're not saying a direction when to PAN.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Once you're in new layout just go to the model space&lt;/P&gt;
&lt;PRE&gt;(command "_.MSPACE")&lt;/PRE&gt;
&lt;P&gt;and pan from point '(0 0) to (polar '(0 0) angle 72")&lt;/P&gt;
&lt;PRE&gt;(command "_.PAN" "_non" '(0 0) "_non"&amp;nbsp;(polar '(0 0) 0. 0.72))&lt;/PRE&gt;
&lt;P&gt;...sorry I have no idea how to correctly set 72 inches... but I'm sure you will.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Apr 2019 18:31:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-script-in-copying-multiple-layout/m-p/8715567#M117161</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2019-04-08T18:31:08Z</dc:date>
    </item>
    <item>
      <title>Re: LISP/SCRIPT in copying multiple LAYOUT</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-script-in-copying-multiple-layout/m-p/8716035#M117162</link>
      <description>&lt;P&gt;thanks that may help a lot, i can figure that out but how do i get the lisp to do a single sheet copy rather than asking for multiple?&amp;nbsp; i have tried a lot of things this morning and get nothing good back.&amp;nbsp; Please that has me stumped.&lt;/P&gt;
&lt;P&gt;thank you again.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Apr 2019 21:31:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-script-in-copying-multiple-layout/m-p/8716035#M117162</guid>
      <dc:creator>gaexcalibur</dc:creator>
      <dc:date>2019-04-08T21:31:35Z</dc:date>
    </item>
    <item>
      <title>Re: LISP/SCRIPT in copying multiple LAYOUT</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-script-in-copying-multiple-layout/m-p/8716785#M117163</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6323453"&gt;@gaexcalibur&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;thanks that may help a lot, i can figure that out but how do i get the lisp to do a single sheet copy rather than asking for multiple? ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's asking for n by (getint). So if you just set n to 1, you should be good to go.&lt;/P&gt;
&lt;PRE&gt;(setq n (getint "\nHow many copies: ")
        i (+ 1 namei n))&lt;/PRE&gt;
&lt;P&gt;Replace with:&lt;/P&gt;
&lt;PRE&gt;(setq n 1
      i (+ 1 namei n))&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The solution looks too simple to get struggle&amp;nbsp;with that... so you might rather start over and tell us the whole story of&amp;nbsp;what your goal is...&lt;/P&gt;</description>
      <pubDate>Tue, 09 Apr 2019 08:14:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-script-in-copying-multiple-layout/m-p/8716785#M117163</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2019-04-09T08:14:18Z</dc:date>
    </item>
    <item>
      <title>Re: LISP/SCRIPT in copying multiple LAYOUT</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-script-in-copying-multiple-layout/m-p/8717846#M117164</link>
      <description>&lt;P&gt;honestly that was most of it, my goal is to copy a layout, move to that layout.&amp;nbsp; go into model space and pan over -72" from 0,0.&amp;nbsp; I did try to get exactly what you just posted but kept getting syntax error I tried different combinations but could not get it to work right.&amp;nbsp; now it will get the layout, copy the layout i just need to figure out how to change to the new layout and i am golden, the pan works perfectly just on the wrong layout, keeps doing it on the first layout rather than the second, i think it is order of command so i am working on fixing it this morning.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Apr 2019 15:15:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-script-in-copying-multiple-layout/m-p/8717846#M117164</guid>
      <dc:creator>gaexcalibur</dc:creator>
      <dc:date>2019-04-09T15:15:11Z</dc:date>
    </item>
    <item>
      <title>Re: LISP/SCRIPT in copying multiple LAYOUT</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-script-in-copying-multiple-layout/m-p/8719646#M117165</link>
      <description>&lt;P&gt;Try this. I guess that polar needs value in feet, so I converted it.&lt;/P&gt;
&lt;P&gt;Not sure whether you still need to prompt of what layout you're about to duplicate... I yes, change that as I was before.&lt;/P&gt;
&lt;P&gt;Changes in the code are blue in color.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(defun c:&lt;FONT color="#0000FF"&gt;LayoutCP&lt;/FONT&gt; ( / *error* oCMDECHO ctab name namer namei nname n i x ) ; &lt;FONT color="#0000FF"&gt;Layout Create and Pan&lt;/FONT&gt;
  
  (defun *error* (errmsg)
    (if (not (wcmatch errmsg "Function cancelled,quit / exit abort,console break,end"))
      (princ (strcat "\nError: " errmsg)))
    (setvar 'CMDECHO oCMDECHO)
    (princ))
  
  (setq oCMDECHO (getvar 'CMDECHO))
  (setvar 'CMDECHO 0)

  ; --------------------------------------------------------------------------------------
  
  (setq ctab (getvar "ctab"))
  (setq name
        &lt;FONT color="#0000FF"&gt; ctab)
         ;&lt;STRIKE&gt;(getstring (strcat "\nLayout to duplicate &amp;lt;" ctab "&amp;gt;: ")))&lt;/STRIKE&gt;&lt;/FONT&gt;
  (if (= name "") (setq name ctab))
  (setq n (1+ (strlen name))
        namei "")
  
  (while (and (&amp;gt; n 1)
              (wcmatch (setq x (substr name (setq n (1- n)) 1)) "#"))
    (setq namei (strcat x namei)))
  
  (setq namer (substr name 1 (- (strlen name) (strlen namei)))
        namei (atoi namei))
  
  (setq n &lt;FONT color="#0000FF"&gt;1&lt;/FONT&gt;
        i (+ 1 namei n))
  
  (repeat n
    (setq nname (strcat namer (itoa (setq i (1- i)))))
    (if (member nname (layoutlist))
      (princ (strcat "\nLayout '" nname " ' already exists."))
      (command "_.LAYOUT" "_Copy" name (strcat namer "a")
               "_.LAYOUT" "_Rename" (strcat namer "a") nname
       &lt;FONT color="#0000FF"&gt;        "_.MSPACE"
               "_.PAN" "_non" '(0 0) "_non" (polar '(0 0) 0. 6)&lt;/FONT&gt;
               )))

  (setvar 'CMDECHO oCMDECHO)
  (princ)
)&lt;/PRE&gt;</description>
      <pubDate>Wed, 10 Apr 2019 07:47:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-script-in-copying-multiple-layout/m-p/8719646#M117165</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2019-04-10T07:47:32Z</dc:date>
    </item>
  </channel>
</rss>

