<?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: Dialog box in LISP as when using native commands in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dialog-box-in-lisp-as-when-using-native-commands/m-p/13019971#M9079</link>
    <description>&lt;P&gt;This combo works.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(setvar 'filedia 0)&lt;/P&gt;
&lt;P&gt;(initcommandversion)&lt;/P&gt;
&lt;P&gt;(command "layout" ...)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Edit:&amp;nbsp; Not sure what's your ultimate goal, but I would prefer to use the built-in dialog over the getfile.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(defun c:LayoutTemplate ( / *error* o)
  
  (defun *error* (errmsg)
    (if (not (wcmatch errmsg "Function cancelled,quit / exit abort,console break,end"))
      (princ (strcat "\nError: " errmsg)))
    (if o (setenv "TemplatePath" o))
    (princ))
  
  (setq o (getenv "TemplatePath"))
  (setenv "TemplatePath" "c:/FilePath/Template/")
  (initdia)
  (command-s "_.layout" "_t")
  (setenv "TemplatePath" o)
  (princ)
  )
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 14 Sep 2024 11:36:17 GMT</pubDate>
    <dc:creator>ВeekeeCZ</dc:creator>
    <dc:date>2024-09-14T11:36:17Z</dc:date>
    <item>
      <title>Dialog box in LISP as when using native commands</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dialog-box-in-lisp-as-when-using-native-commands/m-p/13019438#M9075</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm using the native layout command in a LISP to control the folder destination. I have managed this somewhat via:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;command "_.layout" "Template" selected-file&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The first layout command gives me a pop-up window in the correct folder, but i get a textbox instead of a dialog box for layout choices. In other words. I would like the same effect as when using the button in the layout ribbon, not -layout "t".&lt;/P&gt;</description>
      <pubDate>Fri, 13 Sep 2024 15:10:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dialog-box-in-lisp-as-when-using-native-commands/m-p/13019438#M9075</guid>
      <dc:creator>jw9VSWM</dc:creator>
      <dc:date>2024-09-13T15:10:16Z</dc:date>
    </item>
    <item>
      <title>Re: Dialog box in LISP as when using native commands</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dialog-box-in-lisp-as-when-using-native-commands/m-p/13019467#M9076</link>
      <description>&lt;P&gt;If I understand correctly:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" color="#0000FF"&gt;&lt;STRONG&gt;(initdia)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;(command "_.layout" "_template")&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Sep 2024 15:20:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dialog-box-in-lisp-as-when-using-native-commands/m-p/13019467#M9076</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2024-09-13T15:20:37Z</dc:date>
    </item>
    <item>
      <title>Re: Dialog box in LISP as when using native commands</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dialog-box-in-lisp-as-when-using-native-commands/m-p/13019866#M9077</link>
      <description>&lt;P&gt;It did not help with the (initdia) unfortunately.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;EM&gt;(defun c:LayoutTemplate ()&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;EM&gt;(command "filedia" "1")&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;(setq folder "C:/Program Files/company name ACAD/") ;define folder location&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;(setq selected-file (getfiled "Select a Template File" folder "dwt" 16)) ;select .dwt template&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;EM&gt;(if selected-file&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; (progn&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (princ (strcat "\nSelected file: " selected-file))&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (initdia)&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (command "._layout" "_Template" selected-file "")&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (princ "\nLayout import complete."))&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;(princ "\nNo file selected."))&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to get the dialog box for "insert Layouts" (image attached) that you get when using the layout from template button in the ribbon.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this possible through lisp?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jw9VSWM_1-1726252881895.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1409114i30065DD8D4221E63/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jw9VSWM_1-1726252881895.png" alt="jw9VSWM_1-1726252881895.png" /&gt;&lt;/span&gt;&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="jw9VSWM_0-1726252865602.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1409113iC84D59E765F333CC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jw9VSWM_0-1726252865602.png" alt="jw9VSWM_0-1726252865602.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Sep 2024 18:43:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dialog-box-in-lisp-as-when-using-native-commands/m-p/13019866#M9077</guid>
      <dc:creator>jw9VSWM</dc:creator>
      <dc:date>2024-09-13T18:43:18Z</dc:date>
    </item>
    <item>
      <title>Re: Dialog box in LISP as when using native commands</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dialog-box-in-lisp-as-when-using-native-commands/m-p/13019913#M9078</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" color="#0000FF"&gt;&lt;STRONG&gt;(initcommandversion)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;(command "._layout" "_Template" selected-file)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or maybe:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" color="#0000FF"&gt;&lt;STRONG&gt;(initcommandversion)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;(command&lt;FONT size="4" color="#FF0000"&gt;-s&lt;/FONT&gt; "._layout" "_Template" selected-file)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Sep 2024 19:21:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dialog-box-in-lisp-as-when-using-native-commands/m-p/13019913#M9078</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2024-09-13T19:21:06Z</dc:date>
    </item>
    <item>
      <title>Re: Dialog box in LISP as when using native commands</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dialog-box-in-lisp-as-when-using-native-commands/m-p/13019971#M9079</link>
      <description>&lt;P&gt;This combo works.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(setvar 'filedia 0)&lt;/P&gt;
&lt;P&gt;(initcommandversion)&lt;/P&gt;
&lt;P&gt;(command "layout" ...)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Edit:&amp;nbsp; Not sure what's your ultimate goal, but I would prefer to use the built-in dialog over the getfile.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(defun c:LayoutTemplate ( / *error* o)
  
  (defun *error* (errmsg)
    (if (not (wcmatch errmsg "Function cancelled,quit / exit abort,console break,end"))
      (princ (strcat "\nError: " errmsg)))
    (if o (setenv "TemplatePath" o))
    (princ))
  
  (setq o (getenv "TemplatePath"))
  (setenv "TemplatePath" "c:/FilePath/Template/")
  (initdia)
  (command-s "_.layout" "_t")
  (setenv "TemplatePath" o)
  (princ)
  )
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 14 Sep 2024 11:36:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dialog-box-in-lisp-as-when-using-native-commands/m-p/13019971#M9079</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2024-09-14T11:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: Dialog box in LISP as when using native commands</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dialog-box-in-lisp-as-when-using-native-commands/m-p/13020341#M9080</link>
      <description>&lt;P&gt;If you know the name of the layouts inside the template dwt, then it can be done very easy.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you have different DWT and hence different layout names then just use a cond to set the correct list of layout names.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SeaHaven_0-1726279284765.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1409183i038C6F967DB08C72/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SeaHaven_0-1726279284765.png" alt="SeaHaven_0-1726279284765.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;&lt;LI-CODE lang="general"&gt;(if (not AH:Butts)(load "Multi radio buttons.lsp"))
(setq lst (list "please select " "A0_Landscape" "A1_Landscape" "A1_Portrait" "A2_Landscape" "A2_Portrait" "A3_Landscape"))
(setq layname (ah:butts 2 "V"  lst))

(command "layout" "T" masterlayouts  layname)
(setvar 'ctab  layname)
(command "pspace")&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;&lt;/P&gt;</description>
      <pubDate>Sat, 14 Sep 2024 02:01:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dialog-box-in-lisp-as-when-using-native-commands/m-p/13020341#M9080</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2024-09-14T02:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: Dialog box in LISP as when using native commands</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dialog-box-in-lisp-as-when-using-native-commands/m-p/13021215#M9081</link>
      <description>&lt;P&gt;another way to bring up file selection window is by using the symbol: ~&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(command-s "_.layout" "_t" "~")&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 14 Sep 2024 20:26:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dialog-box-in-lisp-as-when-using-native-commands/m-p/13021215#M9081</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2024-09-14T20:26:10Z</dc:date>
    </item>
    <item>
      <title>Re: Dialog box in LISP as when using native commands</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dialog-box-in-lisp-as-when-using-native-commands/m-p/13021932#M9082</link>
      <description>Worked like a charm.&lt;BR /&gt;&lt;BR /&gt;(initcommandversion)&lt;BR /&gt;(command "._layout" "_Template" selected-file)</description>
      <pubDate>Sun, 15 Sep 2024 13:39:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/dialog-box-in-lisp-as-when-using-native-commands/m-p/13021932#M9082</guid>
      <dc:creator>jw9VSWM</dc:creator>
      <dc:date>2024-09-15T13:39:01Z</dc:date>
    </item>
  </channel>
</rss>

