<?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: Macro Script through a load screen. in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/macro-script-through-a-load-screen/m-p/10236299#M62063</link>
    <description>&lt;P&gt;Thanks for the response, but I'm trying to create a macro for the action as opposed to going through mouse clicks. My main goal is to make an alias for the operation in order to greatly speed things up and also to understand a bit more of how AutoCAD handles this sort of thing in order to make more similar tools down the line.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 14 Apr 2021 03:26:42 GMT</pubDate>
    <dc:creator>evan.8585</dc:creator>
    <dc:date>2021-04-14T03:26:42Z</dc:date>
    <item>
      <title>Macro Script through a load screen.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/macro-script-through-a-load-screen/m-p/10195829#M62059</link>
      <description>&lt;P&gt;Hey there!&lt;/P&gt;&lt;P&gt;I wanted to know if there was any way to setup an action script to load a file, and in my case, specifically a new layout from template. I'm trying to setup a recording that loads a new layout from template, chooses a specific template, then continues doing a few more actions afterward. I tried setting up a macro script for this action and autocad ignored the specific file chosen in the load screen and just created a new default layout instead.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Mar 2021 13:18:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/macro-script-through-a-load-screen/m-p/10195829#M62059</guid>
      <dc:creator>evan.8585</dc:creator>
      <dc:date>2021-03-29T13:18:05Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Script through a load screen.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/macro-script-through-a-load-screen/m-p/10196375#M62060</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/10612787"&gt;@evan.8585&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;here is the command IMLAY to start with. it uses LAYOUT command to import a layout from a dwt/dwg.&amp;nbsp;&lt;/P&gt;&lt;P&gt;replace &amp;lt;file name.dwt/dwg&amp;gt; with your template name.&lt;/P&gt;&lt;P&gt;replace &amp;lt;layout&amp;gt; with your layout.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note:-&lt;/P&gt;&lt;P&gt;the template should be on the AutoCAD support file search path otherwise you need to specify a full path.&lt;/P&gt;&lt;P&gt;if the layout name is not exist, the command will return an error an probably will break.&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;LI-CODE lang="general"&gt;; import layout
(defun c:imlay ()
 (command "._layout" "_template" &amp;lt;file name.dwt/dwg&amp;gt; &amp;lt;layout&amp;gt;)
 ; continues doing a few more actions afterward
 ; ...
 (princ) 
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Mar 2021 16:03:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/macro-script-through-a-load-screen/m-p/10196375#M62060</guid>
      <dc:creator>Moshe-A</dc:creator>
      <dc:date>2021-03-29T16:03:42Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Script through a load screen.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/macro-script-through-a-load-screen/m-p/10234237#M62061</link>
      <description>Hey Moshe,&lt;BR /&gt;&lt;BR /&gt;I've been trying to figure out how to use your script for weeks and just&lt;BR /&gt;cannot figure it out. Anyway you can give me a step by step of the process?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;</description>
      <pubDate>Tue, 13 Apr 2021 12:38:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/macro-script-through-a-load-screen/m-p/10234237#M62061</guid>
      <dc:creator>evan.8585</dc:creator>
      <dc:date>2021-04-13T12:38:47Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Script through a load screen.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/macro-script-through-a-load-screen/m-p/10236294#M62062</link>
      <description>&lt;P&gt;I know Moshe-A will respond we had something similar 20 layout titles all different as these were required for Land plot requirements. So used a menu to pick the correct one and import. I dont have access to the slide images at moment. But should get the idea of choose a layout.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="screenshot374.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/906056iB00ECAD2ACA300A7/image-size/large?v=v2&amp;amp;px=999" role="button" title="screenshot374.png" alt="screenshot374.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Apr 2021 03:21:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/macro-script-through-a-load-screen/m-p/10236294#M62062</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-04-14T03:21:33Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Script through a load screen.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/macro-script-through-a-load-screen/m-p/10236299#M62063</link>
      <description>&lt;P&gt;Thanks for the response, but I'm trying to create a macro for the action as opposed to going through mouse clicks. My main goal is to make an alias for the operation in order to greatly speed things up and also to understand a bit more of how AutoCAD handles this sort of thing in order to make more similar tools down the line.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Apr 2021 03:26:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/macro-script-through-a-load-screen/m-p/10236299#M62063</guid>
      <dc:creator>evan.8585</dc:creator>
      <dc:date>2021-04-14T03:26:42Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Script through a load screen.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/macro-script-through-a-load-screen/m-p/10236324#M62064</link>
      <description>&lt;P&gt;The idea is you get a visual of the layout you want you can pick the image or the text value then it will load the macro with the correct name of dwg and layout as per moshe-A is 1 menu pick then 1 mouse click to much ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The menu image has been around since Autocad 1st existed if you can use notepad you can make it work, it is just so easy.&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="screenshot375.png" style="width: 620px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/906067iC2BF720324268634/image-size/large?v=v2&amp;amp;px=999" role="button" title="screenshot375.png" alt="screenshot375.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Apr 2021 03:44:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/macro-script-through-a-load-screen/m-p/10236324#M62064</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-04-14T03:44:04Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Script through a load screen.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/macro-script-through-a-load-screen/m-p/10236332#M62065</link>
      <description>&lt;P&gt;I'm sure that'd work just fine for most situations, but I'd like to load a Layout template from a file. It needs to go to the specific file path and I'd love for it to choose the layout state as well (i.e. Landscape or Portrait) to avoid user error.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Apr 2021 03:48:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/macro-script-through-a-load-screen/m-p/10236332#M62065</guid>
      <dc:creator>evan.8585</dc:creator>
      <dc:date>2021-04-14T03:48:37Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Script through a load screen.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/macro-script-through-a-load-screen/m-p/10236384#M62066</link>
      <description>&lt;P&gt;I dont think you understand I have been doing this for like 40 years it does what you want, behind the menu is a macro telling Autocad what to do. So for above its sets say the layout name and dwt name then runs a lisp that makes it happen. In this example there was only one dwt and that is hardcoded into newsurvlayout.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Look at what Moshe-A posted and look at what I a have shown in the mnu file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(command "._layout" "_template" &amp;lt;file name.dwt/dwg&amp;gt; &amp;lt;layout&amp;gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;**SURVEY
[SURVEY]
[A0,A0]^C^C^P(SETQ FNAME "A0")(LOAD "NEWSURVLAYOUT")
[A1,A1]^C^C^P(SETQ FNAME "A1")(LOAD "NEWSURVLAYOUT")
[A3 Srv 1,A3 Srv 1]^C^C^P(SETQ FNAME "A3 Survey Sheet 1")(LOAD "NEWSURVLAYOUT")
[A3 Srv 2,A3 Srv 2]^C^C^P(SETQ FNAME "A3 Survey Sheet 2")(LOAD "NEWSURVLAYOUT")
[A3 ex 1,A3 ex 1]^C^C^P(SETQ FNAME "A3 Survey Sheet ex 1)(LOAD "NEWSURVLAYOUT")
[A3 ex 2,A3 ex 2]^C^C^P(SETQ FNAME "A3 Survey Sheet ex 2)(LOAD "NEWSURVLAYOUT")
[A3 New 1-2,A3 Srv Sheet New 1-2]^C^C^P(SETQ FNAME "A3 Survey Sheet New 1-2")(LOAD "NEWSURVLAYOUT")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;; newsurvlayout.lsp

(COMMAND "-LAYOUT" "N" FNAME)
(COMMAND "-LAYOUT" "S" FNAME)
(SETQ SS (SSGET "X" (LIST (CONS 0 "VIEWPORT"))))
(COMMAND "ERASE" SS "")
(SETQ SS NIL)
(COMMAND "INSERT" (STRCAT "p:\\AUTODESK\\C3D TEMPLATES\\SURVEY\\" FNAME) (LIST 0 0) 1 1 0)
(COMMAND "ZOOM" "E")
(SETQ FNAME NIL)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can just have a menu if you want just pick from menu, I just used the **image part, or even a toolbar with icons. or go a dcl list and pick from that.&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="screenshot376.png" style="width: 221px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/906086iD1CF00A186D100DA/image-size/large?v=v2&amp;amp;px=999" role="button" title="screenshot376.png" alt="screenshot376.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Apr 2021 04:43:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/macro-script-through-a-load-screen/m-p/10236384#M62066</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-04-14T04:43:17Z</dc:date>
    </item>
  </channel>
</rss>

