<?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: Default folder -plot macro in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/default-folder-plot-macro/m-p/12143476#M26115</link>
    <description>&lt;P&gt;Hello Pendean,&lt;BR /&gt;&lt;BR /&gt;Thank you for your reply frist.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I found a lisp, from &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/75977"&gt;@hmsilva&lt;/a&gt;&amp;nbsp;, from this post "&lt;A href="https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-pdf-export/m-p/3807607#M309823" target="_blank"&gt;https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-pdf-export/m-p/3807607#M309823&lt;/A&gt;".&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;With the help of this lisp I can print all layouts in one go to PDF. They also get the name of only the layouts themselves, which is what I want, and not "drawing-name"-"layout-name".pdf, but then they will all be printed with the same paper sizes and placed on my desktop.&lt;BR /&gt;A location that I want to change to the same location as my "default location for plot to file operations".&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;If I change this lisp (with my barely lisp knowledge), so that it only prints 1 layout instead of all layouts, my active layout jumps shortly to another layout first, prints it, and jumps back to my active layout.&lt;BR /&gt;&lt;BR /&gt;For example, the drawing where I test this 1 layout plot lisp has 6 layouts. If layout2 is active then layout5 will be printed.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;What is the reason why it jumps to a different layout for a short time.&lt;BR /&gt;And how do I change the read only "dwgprefix" location to my "plot to file" folder.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun C:printall (/ layouts num)
  (setq layouts (layoutlist)); list all paperspace layouts in the drawing
  (setq num 0); zero counter
  (repeat (length layouts); Repeats the plot command on all layouts
    (command ".-PLOT"
	     "Y" ;; Detailed plot configuration? [Yes/No] &amp;lt;No&amp;gt;: y
	     (nth num layouts) ;;Enter a layout name or [?] &amp;lt;Test_001&amp;gt;:
	     "DWG To PDF.pc3" ;;Enter an output device name or [?] &amp;lt;DWG To PDF.pc3&amp;gt;:
	     "iso a1 (594.00 x 841.00 mm)" ;;Enter paper size or [?] &amp;lt;iso a1 (594.00 x 841.00 mm)&amp;gt;:
	     "Millimeters" ;;Enter paper units [Inches/Millimeters] &amp;lt;Millimeters&amp;gt;:
	     "Landscape" ;;Enter drawing orientation [Portrait/Landscape] &amp;lt;Landscape&amp;gt;:
	     "No" ;;Plot upside down? [Yes/No] &amp;lt;No&amp;gt;:
	     "Layout" ;;Enter plot area [Display/Extents/Layout/View/Window] &amp;lt;Layout&amp;gt;:
	     "1:1" ;;Enter plot scale (Plotted Millimeters=Drawing Units) or [Fit] &amp;lt;1:1&amp;gt;:
	     "0.00,0.0" ;;Enter plot offset (x,y) &amp;lt;0.00,0.00&amp;gt;:
	     "Yes" ;;Plot with plot styles? [Yes/No] &amp;lt;Yes&amp;gt;:
	     "kleur.ctb" ;;Enter plot style table name or [?] (enter . for none) &amp;lt;kleur.ctb&amp;gt;:
	     "Yes" ;;Plot with lineweights? [Yes/No] &amp;lt;Yes&amp;gt;:
	     "Yes" ;;Scale lineweights with plot scale? [Yes/No] &amp;lt;No&amp;gt;: y
	     "Yes" ;;Plot paper space first? [Yes/No] &amp;lt;No&amp;gt;:
	     "No" ;;Hide paperspace objects? [Yes/No] &amp;lt;No&amp;gt;:
	     (strcat (getvar "DWGPREFIX") (getvar "CTAB") ".pdf") ;; the pdf file with the layout name
	     "No" ;;Save changes to page setup [Yes/No]? &amp;lt;N&amp;gt;
	     "Yes" ;;Proceed with plot [Yes/No] &amp;lt;Y&amp;gt;:
    );; end .-plot
    (setq num (1+ num)); Increment counter
  ); end repeat
); end function

****************************************************************
(defun C:printA1 (/ layouts num)
  (setq layouts (layoutlist)); list all paperspace layouts in the drawing
  (setq num 0); zero counter
    (command ".-PLOT"
	     "Y" ;; Detailed plot configuration? [Yes/No] &amp;lt;No&amp;gt;: y
	     (nth num layouts) ;;Enter a layout name or [?] &amp;lt;Test_001&amp;gt;:
	     "DWG To PDF.pc3" ;;Enter an output device name or [?] &amp;lt;DWG To PDF.pc3&amp;gt;:
	     "iso a1 (594.00 x 841.00 mm)" ;;Enter paper size or [?] &amp;lt;iso a1 (594.00 x 841.00 mm)&amp;gt;:
	     "Millimeters" ;;Enter paper units [Inches/Millimeters] &amp;lt;Millimeters&amp;gt;:
	     "Landscape" ;;Enter drawing orientation [Portrait/Landscape] &amp;lt;Landscape&amp;gt;:
	     "No" ;;Plot upside down? [Yes/No] &amp;lt;No&amp;gt;:
	     "Layout" ;;Enter plot area [Display/Extents/Layout/View/Window] &amp;lt;Layout&amp;gt;:
	     "1:1" ;;Enter plot scale (Plotted Millimeters=Drawing Units) or [Fit] &amp;lt;1:1&amp;gt;:
	     "0.00,0.0" ;;Enter plot offset (x,y) &amp;lt;0.00,0.00&amp;gt;:
	     "Yes" ;;Plot with plot styles? [Yes/No] &amp;lt;Yes&amp;gt;:
	     "kleur.ctb" ;;Enter plot style table name or [?] (enter . for none) &amp;lt;kleur.ctb&amp;gt;:
	     "Yes" ;;Plot with lineweights? [Yes/No] &amp;lt;Yes&amp;gt;:
	     "Yes" ;;Scale lineweights with plot scale? [Yes/No] &amp;lt;No&amp;gt;: y
	     "Yes" ;;Plot paper space first? [Yes/No] &amp;lt;No&amp;gt;:
	     "No" ;;Hide paperspace objects? [Yes/No] &amp;lt;No&amp;gt;:
	     (strcat (getvar "DWGPREFIX") (getvar "CTAB") ".pdf") ;; the pdf file with the layout name
	     "No" ;;Save changes to page setup [Yes/No]? &amp;lt;N&amp;gt;
	     "Yes" ;;Proceed with plot [Yes/No] &amp;lt;Y&amp;gt;:
    );; end .-plot
    (setq num (1+ num)); Increment counter
); end function&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 02 Aug 2023 08:51:49 GMT</pubDate>
    <dc:creator>sander.van.pelt</dc:creator>
    <dc:date>2023-08-02T08:51:49Z</dc:date>
    <item>
      <title>Default folder -plot macro</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/default-folder-plot-macro/m-p/12140548#M26112</link>
      <description>&lt;P&gt;Hello everybody,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For quick printing of layouts I want to create a ribbon panel with different buttons with macros for printing an active layout with a certain page setup (pdf).&lt;BR /&gt;These multiple page setups are loaded automatically.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;By default, when I run the -plot command, I get the "create plot file" window where I can select in which folder I want to save the pdf.&lt;/P&gt;&lt;P&gt;How can I select a default folder in which to save this pdf and not see this window again when I use the -plot command, via my panel.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;For example, that "C:\user\desktop\pdf" is the default folder where my pdf drawings that I print this way are stored.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thank you for your support&lt;/P&gt;</description>
      <pubDate>Tue, 01 Aug 2023 08:07:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/default-folder-plot-macro/m-p/12140548#M26112</guid>
      <dc:creator>sander.van.pelt</dc:creator>
      <dc:date>2023-08-01T08:07:22Z</dc:date>
    </item>
    <item>
      <title>Re: Default folder -plot macro</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/default-folder-plot-macro/m-p/12141053#M26113</link>
      <description>Have you had a chance to explore what's already been created yet?&lt;BR /&gt;&lt;A href="https://www.google.com/search?q=autocad+lisp+tip%3A+plot+pdf+to+a+specific+folder" target="_blank"&gt;https://www.google.com/search?q=autocad+lisp+tip%3A+plot+pdf+to+a+specific+folder&lt;/A&gt; &lt;BR /&gt;</description>
      <pubDate>Tue, 01 Aug 2023 12:21:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/default-folder-plot-macro/m-p/12141053#M26113</guid>
      <dc:creator>pendean</dc:creator>
      <dc:date>2023-08-01T12:21:26Z</dc:date>
    </item>
    <item>
      <title>Re: Default folder -plot macro</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/default-folder-plot-macro/m-p/12142750#M26114</link>
      <description>&lt;P&gt;This makes a pdf directory under the dwg directory&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;; check that pdf directory exists
(setq dwgpre (strcat (getvar "dwgprefix") "\pdf"))
(if (= (vl-file-directory-p dwgpre) nil)
(vl-mkdir dwgpre)
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So can use (strcat dwgpre filename) for pdf name.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(setq pdfname (strcat dwgpre "\\" dwgname "-" (getvar "ctab") ".pdf" ))&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 02 Aug 2023 01:08:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/default-folder-plot-macro/m-p/12142750#M26114</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2023-08-02T01:08:20Z</dc:date>
    </item>
    <item>
      <title>Re: Default folder -plot macro</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/default-folder-plot-macro/m-p/12143476#M26115</link>
      <description>&lt;P&gt;Hello Pendean,&lt;BR /&gt;&lt;BR /&gt;Thank you for your reply frist.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I found a lisp, from &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/75977"&gt;@hmsilva&lt;/a&gt;&amp;nbsp;, from this post "&lt;A href="https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-pdf-export/m-p/3807607#M309823" target="_blank"&gt;https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-pdf-export/m-p/3807607#M309823&lt;/A&gt;".&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;With the help of this lisp I can print all layouts in one go to PDF. They also get the name of only the layouts themselves, which is what I want, and not "drawing-name"-"layout-name".pdf, but then they will all be printed with the same paper sizes and placed on my desktop.&lt;BR /&gt;A location that I want to change to the same location as my "default location for plot to file operations".&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;If I change this lisp (with my barely lisp knowledge), so that it only prints 1 layout instead of all layouts, my active layout jumps shortly to another layout first, prints it, and jumps back to my active layout.&lt;BR /&gt;&lt;BR /&gt;For example, the drawing where I test this 1 layout plot lisp has 6 layouts. If layout2 is active then layout5 will be printed.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;What is the reason why it jumps to a different layout for a short time.&lt;BR /&gt;And how do I change the read only "dwgprefix" location to my "plot to file" folder.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun C:printall (/ layouts num)
  (setq layouts (layoutlist)); list all paperspace layouts in the drawing
  (setq num 0); zero counter
  (repeat (length layouts); Repeats the plot command on all layouts
    (command ".-PLOT"
	     "Y" ;; Detailed plot configuration? [Yes/No] &amp;lt;No&amp;gt;: y
	     (nth num layouts) ;;Enter a layout name or [?] &amp;lt;Test_001&amp;gt;:
	     "DWG To PDF.pc3" ;;Enter an output device name or [?] &amp;lt;DWG To PDF.pc3&amp;gt;:
	     "iso a1 (594.00 x 841.00 mm)" ;;Enter paper size or [?] &amp;lt;iso a1 (594.00 x 841.00 mm)&amp;gt;:
	     "Millimeters" ;;Enter paper units [Inches/Millimeters] &amp;lt;Millimeters&amp;gt;:
	     "Landscape" ;;Enter drawing orientation [Portrait/Landscape] &amp;lt;Landscape&amp;gt;:
	     "No" ;;Plot upside down? [Yes/No] &amp;lt;No&amp;gt;:
	     "Layout" ;;Enter plot area [Display/Extents/Layout/View/Window] &amp;lt;Layout&amp;gt;:
	     "1:1" ;;Enter plot scale (Plotted Millimeters=Drawing Units) or [Fit] &amp;lt;1:1&amp;gt;:
	     "0.00,0.0" ;;Enter plot offset (x,y) &amp;lt;0.00,0.00&amp;gt;:
	     "Yes" ;;Plot with plot styles? [Yes/No] &amp;lt;Yes&amp;gt;:
	     "kleur.ctb" ;;Enter plot style table name or [?] (enter . for none) &amp;lt;kleur.ctb&amp;gt;:
	     "Yes" ;;Plot with lineweights? [Yes/No] &amp;lt;Yes&amp;gt;:
	     "Yes" ;;Scale lineweights with plot scale? [Yes/No] &amp;lt;No&amp;gt;: y
	     "Yes" ;;Plot paper space first? [Yes/No] &amp;lt;No&amp;gt;:
	     "No" ;;Hide paperspace objects? [Yes/No] &amp;lt;No&amp;gt;:
	     (strcat (getvar "DWGPREFIX") (getvar "CTAB") ".pdf") ;; the pdf file with the layout name
	     "No" ;;Save changes to page setup [Yes/No]? &amp;lt;N&amp;gt;
	     "Yes" ;;Proceed with plot [Yes/No] &amp;lt;Y&amp;gt;:
    );; end .-plot
    (setq num (1+ num)); Increment counter
  ); end repeat
); end function

****************************************************************
(defun C:printA1 (/ layouts num)
  (setq layouts (layoutlist)); list all paperspace layouts in the drawing
  (setq num 0); zero counter
    (command ".-PLOT"
	     "Y" ;; Detailed plot configuration? [Yes/No] &amp;lt;No&amp;gt;: y
	     (nth num layouts) ;;Enter a layout name or [?] &amp;lt;Test_001&amp;gt;:
	     "DWG To PDF.pc3" ;;Enter an output device name or [?] &amp;lt;DWG To PDF.pc3&amp;gt;:
	     "iso a1 (594.00 x 841.00 mm)" ;;Enter paper size or [?] &amp;lt;iso a1 (594.00 x 841.00 mm)&amp;gt;:
	     "Millimeters" ;;Enter paper units [Inches/Millimeters] &amp;lt;Millimeters&amp;gt;:
	     "Landscape" ;;Enter drawing orientation [Portrait/Landscape] &amp;lt;Landscape&amp;gt;:
	     "No" ;;Plot upside down? [Yes/No] &amp;lt;No&amp;gt;:
	     "Layout" ;;Enter plot area [Display/Extents/Layout/View/Window] &amp;lt;Layout&amp;gt;:
	     "1:1" ;;Enter plot scale (Plotted Millimeters=Drawing Units) or [Fit] &amp;lt;1:1&amp;gt;:
	     "0.00,0.0" ;;Enter plot offset (x,y) &amp;lt;0.00,0.00&amp;gt;:
	     "Yes" ;;Plot with plot styles? [Yes/No] &amp;lt;Yes&amp;gt;:
	     "kleur.ctb" ;;Enter plot style table name or [?] (enter . for none) &amp;lt;kleur.ctb&amp;gt;:
	     "Yes" ;;Plot with lineweights? [Yes/No] &amp;lt;Yes&amp;gt;:
	     "Yes" ;;Scale lineweights with plot scale? [Yes/No] &amp;lt;No&amp;gt;: y
	     "Yes" ;;Plot paper space first? [Yes/No] &amp;lt;No&amp;gt;:
	     "No" ;;Hide paperspace objects? [Yes/No] &amp;lt;No&amp;gt;:
	     (strcat (getvar "DWGPREFIX") (getvar "CTAB") ".pdf") ;; the pdf file with the layout name
	     "No" ;;Save changes to page setup [Yes/No]? &amp;lt;N&amp;gt;
	     "Yes" ;;Proceed with plot [Yes/No] &amp;lt;Y&amp;gt;:
    );; end .-plot
    (setq num (1+ num)); Increment counter
); end function&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Aug 2023 08:51:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/default-folder-plot-macro/m-p/12143476#M26115</guid>
      <dc:creator>sander.van.pelt</dc:creator>
      <dc:date>2023-08-02T08:51:49Z</dc:date>
    </item>
    <item>
      <title>Re: Default folder -plot macro</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/default-folder-plot-macro/m-p/12145468#M26116</link>
      <description>&lt;P&gt;For all layouts you can use (layoutlist) to get a list of layouts then use (foreach and (setvar 'ctab layoutname) to go to each layout and plot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This example allows plot range of layouts 1, 3-5, all etc. You will need to edit to suit your dwg title block and destination.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SeaHaven_0-1691022186654.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1248536i9D68C5DEB4CD81B3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SeaHaven_0-1691022186654.png" alt="SeaHaven_0-1691022186654.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>Thu, 03 Aug 2023 00:23:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/default-folder-plot-macro/m-p/12145468#M26116</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2023-08-03T00:23:38Z</dc:date>
    </item>
  </channel>
</rss>

