<?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: plot lisp in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plot-lisp/m-p/9942189#M66480</link>
    <description>&lt;P&gt;I created this many years ago and I still use it today.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun c:iplot (/ psize)
   (initget 1 "11x17 24x36 PDF") ; [1 = no enter allowed]
   (setq psize (getkword (strcat "\nSelect Plot [11x17/24x36/PDF]:")))
   (cond
      ((= psize "11x17") (iplot_11x17))
      ((= psize "24x36") (iplot_24x36))
      ((= psize "PDF")  (iplot_PDF))
      )
	  )

(defun iplot_11x17 ()
    (command "-plot"
	     "yes"
	     ""
	     "default windows system printer.pc3" ;Printer Name
	     "11\" x 17\""  ;Paper Size
	     "Inches" ;Paper Units
	     "Landscape" ;Orientation
	     "No" ;Plot Upside Down?
	     "Extents" ;Plot Area
	     "Fit" ;Plot Scale
	     "Center" ;Plot Offset
	     "Yes" ;Use Plot Style?
	     "structural 11x17.ctb" ;Plot Style Name
	     "Yes" ;Plot Lineweights?
	     "No" ;Scale Lineweights?
	     "No" ;Paper Space First?
	     "No" ;Hide Paper Space?
	     "No" ;Plot to File?
	     "No" ;Save Page Setup?
	     "Yes" ;Continue to Plot?
	     )
  )

(defun iplot_24x36 ()
    (command "-plot"
	     "yes"
	     ""
	     "OPDHP5100.pc3" ;Printer Name
	     "Arch D (Landscape)"  ;Paper Size
	     "Inches" ;Paper Units
	     "Landscape" ;Orientation
	     "No" ;Plot Upside Down?
	     "Extents" ;Plot Area
	     "1:1" ;Plot Scale
	     "Center" ;Plot Offset
	     "Yes" ;Use Plot Style?
	     "Structural 11x17.ctb" ;Plot Style Name
	     "Yes" ;Plot Lineweights?
	     "No" ;Scale Lineweights?
	     "No" ;Paper Space First?
	     "No" ;Hide Paper Space?
	     "No" ;Plot to File?
	     "No" ;Save Page Setup?
	     "Yes" ;Continue to Plot?
	     )
  )

(defun iplot_PDF (/ fnm)
  (if (setq fnm (getfiled "Specify Save Location" "" "pdf" 1))
    (progn
    (command "-plot"
	     "yes"
	     ""
	     "Dwg To PDF.pc3" ;Printer Name
	     "ARCH D (36.00 x 24.00 Inches)"  ;Paper Size
	     "Inches" ;Paper Units
	     "Landscape" ;Orientation
	     "No" ;Plot Upside Down?
	     "Extents" ;Plot Area
	     "Fit" ;Plot Scale
	     "Center" ;Plot Offset
	     "Yes" ;Use Plot Style?
	     "Structural 11x17.ctb" ;Plot Style Name
	     "Yes" ;Plot Lineweights?
	     "No" ;Scale Lineweights?
	     "No" ;Paper Space First?
	     "No" ;Hide Paper Space?
	     fnm
	     "No" ;Plot to File?
	     "Yes" ;Continue to Plot?
	     )
    )
    )
  (princ)
  )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 15 Dec 2020 19:37:58 GMT</pubDate>
    <dc:creator>Jonathan3891</dc:creator>
    <dc:date>2020-12-15T19:37:58Z</dc:date>
    <item>
      <title>plot lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plot-lisp/m-p/9933400#M66475</link>
      <description>&lt;P&gt;I have this code that I that some else developed (Thank to who ever made this)it works great to plot all the tabs. I'm tryng to figure out a way to plot them to a specified folder. I'm rusty with coding use to be much better but I just don't use cad Autocad as much as I use too.&lt;/P&gt;&lt;P&gt;Seem like I need to add something like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;change C:test ( / cmd) to C:test ( / cmd pathn)&lt;/P&gt;&lt;P&gt;and this&amp;nbsp;&lt;/P&gt;&lt;P&gt;"(if (setq pathn (getfiled "C:\CADD\#####"))"&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That as far as I got not sure how to add this to the lisp below. I think it's the correct idea.&lt;/P&gt;&lt;P&gt;I have tried it a few different way and keep breaking the original that works.&lt;/P&gt;&lt;P&gt;;___________________________________________________________________________&lt;/P&gt;&lt;P&gt;(defun C:test ( / cmd)&lt;BR /&gt;(setq cmd (getvar 'cmdecho)) (setvar 'cmdecho 0)&lt;BR /&gt;(foreach Layout (layoutlist)&lt;BR /&gt;(command "_.-PLOT"&lt;BR /&gt;"No" ; Detailed plot configuration? [Yes/No] &amp;lt;No&amp;gt;: No&lt;BR /&gt;Layout ; Enter a layout name or [?] &amp;lt;Layout1&amp;gt;:&lt;BR /&gt;"" ; Enter a page setup name&lt;BR /&gt;"DWG To PDF.pc3" ; Enter an output device name or [?] &amp;lt;DWG To PDF.pc3&amp;gt;:&lt;BR /&gt;(strcat (getvar "DWGPREFIX") Layout ".pdf") ; Directory to save (strcat (getvar "DWGPREFIX") Layout ".pdf")&lt;BR /&gt;"No" ; save changes to page setup?&lt;BR /&gt;"Yes" ; proceed with plot?&lt;BR /&gt;); command&lt;BR /&gt;); foreach&lt;BR /&gt;(setvar 'cmdecho cmd)&lt;BR /&gt;(princ)&lt;BR /&gt;); defun C:test&lt;/P&gt;</description>
      <pubDate>Fri, 11 Dec 2020 18:36:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plot-lisp/m-p/9933400#M66475</guid>
      <dc:creator>lisaj98052</dc:creator>
      <dc:date>2020-12-11T18:36:46Z</dc:date>
    </item>
    <item>
      <title>Re: plot lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plot-lisp/m-p/9934470#M66476</link>
      <description>&lt;P&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;Maybe you can use a ready-made printing method?&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;Convenient and intuitive interface?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 12 Dec 2020 08:03:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plot-lisp/m-p/9934470#M66476</guid>
      <dc:creator>maratovich</dc:creator>
      <dc:date>2020-12-12T08:03:54Z</dc:date>
    </item>
    <item>
      <title>Re: plot lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plot-lisp/m-p/9939219#M66477</link>
      <description>&lt;P&gt;if you are referring to sheet set, it is slow and combersome. you have to select each sheet individually to edit the data unless you export to excel and use a third party software to edit and reimport. I have started to use Autocad Core to do my plotting hands down faster. does not open each sheet. The only down side is it print to the dwg folder.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the response.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2020 17:42:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plot-lisp/m-p/9939219#M66477</guid>
      <dc:creator>lisaj98052</dc:creator>
      <dc:date>2020-12-14T17:42:39Z</dc:date>
    </item>
    <item>
      <title>Re: plot lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plot-lisp/m-p/9939236#M66478</link>
      <description>&lt;P&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;No, this is not a sheet set.&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;This is a ready-made program for printing.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2020 17:49:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plot-lisp/m-p/9939236#M66478</guid>
      <dc:creator>maratovich</dc:creator>
      <dc:date>2020-12-14T17:49:37Z</dc:date>
    </item>
    <item>
      <title>Re: plot lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plot-lisp/m-p/9939975#M66479</link>
      <description>&lt;P&gt;Maratovich plotting routine is very extensive and better than this simple save somewhere.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;; check that pdf directory exists
(setq dwgpre (strcat (getvar "dwgprefix") "\pdf"))
(if (= (vl-file-directory-p dwgpre) nil)
(vl-mkdir dwgpre)
)

(setq pdfname (strcat dwgpre "\\" dwgname "-" (getvar "ctab") ".pdf" ))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2020 23:16:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plot-lisp/m-p/9939975#M66479</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2020-12-14T23:16:24Z</dc:date>
    </item>
    <item>
      <title>Re: plot lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plot-lisp/m-p/9942189#M66480</link>
      <description>&lt;P&gt;I created this many years ago and I still use it today.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun c:iplot (/ psize)
   (initget 1 "11x17 24x36 PDF") ; [1 = no enter allowed]
   (setq psize (getkword (strcat "\nSelect Plot [11x17/24x36/PDF]:")))
   (cond
      ((= psize "11x17") (iplot_11x17))
      ((= psize "24x36") (iplot_24x36))
      ((= psize "PDF")  (iplot_PDF))
      )
	  )

(defun iplot_11x17 ()
    (command "-plot"
	     "yes"
	     ""
	     "default windows system printer.pc3" ;Printer Name
	     "11\" x 17\""  ;Paper Size
	     "Inches" ;Paper Units
	     "Landscape" ;Orientation
	     "No" ;Plot Upside Down?
	     "Extents" ;Plot Area
	     "Fit" ;Plot Scale
	     "Center" ;Plot Offset
	     "Yes" ;Use Plot Style?
	     "structural 11x17.ctb" ;Plot Style Name
	     "Yes" ;Plot Lineweights?
	     "No" ;Scale Lineweights?
	     "No" ;Paper Space First?
	     "No" ;Hide Paper Space?
	     "No" ;Plot to File?
	     "No" ;Save Page Setup?
	     "Yes" ;Continue to Plot?
	     )
  )

(defun iplot_24x36 ()
    (command "-plot"
	     "yes"
	     ""
	     "OPDHP5100.pc3" ;Printer Name
	     "Arch D (Landscape)"  ;Paper Size
	     "Inches" ;Paper Units
	     "Landscape" ;Orientation
	     "No" ;Plot Upside Down?
	     "Extents" ;Plot Area
	     "1:1" ;Plot Scale
	     "Center" ;Plot Offset
	     "Yes" ;Use Plot Style?
	     "Structural 11x17.ctb" ;Plot Style Name
	     "Yes" ;Plot Lineweights?
	     "No" ;Scale Lineweights?
	     "No" ;Paper Space First?
	     "No" ;Hide Paper Space?
	     "No" ;Plot to File?
	     "No" ;Save Page Setup?
	     "Yes" ;Continue to Plot?
	     )
  )

(defun iplot_PDF (/ fnm)
  (if (setq fnm (getfiled "Specify Save Location" "" "pdf" 1))
    (progn
    (command "-plot"
	     "yes"
	     ""
	     "Dwg To PDF.pc3" ;Printer Name
	     "ARCH D (36.00 x 24.00 Inches)"  ;Paper Size
	     "Inches" ;Paper Units
	     "Landscape" ;Orientation
	     "No" ;Plot Upside Down?
	     "Extents" ;Plot Area
	     "Fit" ;Plot Scale
	     "Center" ;Plot Offset
	     "Yes" ;Use Plot Style?
	     "Structural 11x17.ctb" ;Plot Style Name
	     "Yes" ;Plot Lineweights?
	     "No" ;Scale Lineweights?
	     "No" ;Paper Space First?
	     "No" ;Hide Paper Space?
	     fnm
	     "No" ;Plot to File?
	     "Yes" ;Continue to Plot?
	     )
    )
    )
  (princ)
  )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2020 19:37:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plot-lisp/m-p/9942189#M66480</guid>
      <dc:creator>Jonathan3891</dc:creator>
      <dc:date>2020-12-15T19:37:58Z</dc:date>
    </item>
    <item>
      <title>Re: plot lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plot-lisp/m-p/9942295#M66481</link>
      <description>&lt;P&gt;This should do what you were going for in your original post.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun c:test (/)
  (foreach layout (layoutlist)
    (setvar 'CTab layout)
    (command "-plot"
	     "Y" ;Detailed Plot Configuration?
	     ""
	     "DWG To PDF.pc3" ;Printer Name
	     "ANSI B (11.00 x 17.00 Inches)" ;Paper Size
	     "Inches" ;Paper Units
	     "Landscape" ;Orientation
	     "No" ;Plot Upside Down?
	     "Extents" ;Plot Area
	     "Fit" ;Plot Scale
	     "Center" ;Plot Offset
	     "Yes" ;Plot With Plotstyle?
	     "monochrome.ctb" ;Plot Style Name
	     "yes" ;Plot Lineweights?
	     "No" ;Scale Lineweights?
	     "No" ;Hide Paper Space?
	     "No" ;Plot to File?
	     "" ;Name of File
	     "No" ;Save Page Setup?
	     "Yes" ;Continue to PLot?
	     )
    );foreach
  );defun&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 15 Dec 2020 20:21:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plot-lisp/m-p/9942295#M66481</guid>
      <dc:creator>Jonathan3891</dc:creator>
      <dc:date>2020-12-15T20:21:08Z</dc:date>
    </item>
    <item>
      <title>Re: plot lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plot-lisp/m-p/9948260#M66482</link>
      <description>&lt;P&gt;Thanks Johnathan I have multiple plot options all based on the -Plot command including pdf, tiff, png&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Plot range of layouts, plot individual pdfs but at same time make 1 pdf with all (hint Ghostscript)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Even have a multi story building plot depending on who you are "username" will plot to correct plotter/printer on your floor so for all floors only have 1 program on server.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Enter like 99 and does all&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="screenshot306.png" style="width: 231px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/857701iD4FDDE8483BB7705/image-size/large?v=v2&amp;amp;px=999" role="button" title="screenshot306.png" alt="screenshot306.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Dec 2020 06:20:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plot-lisp/m-p/9948260#M66482</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2020-12-18T06:20:45Z</dc:date>
    </item>
    <item>
      <title>Re: plot lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plot-lisp/m-p/12205335#M66483</link>
      <description>&lt;P&gt;Jonathan; Your iplot LISP routine works great. I primarily only make pdf plots so I parced down your code to what is shown below (and attached). Instead on needing to select a folder directory to save the pdf too, I'd like to have the folder path already determined. How can I add in a specific folder directory for the save location of the pdf file?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;;=================================================&lt;BR /&gt;;Partial code taken from iplot.lsp created by Jonathan Norton.&lt;BR /&gt;;This routine creates a pdf plot using the settings specified.&lt;BR /&gt;;This is an alternate to using the GUI of a page setup.&lt;BR /&gt;;=================================================&lt;/P&gt;&lt;P&gt;(defun C:plotpdf (/ fnm)&lt;BR /&gt;(if (setq fnm (getfiled "Specify Save Location" "" "pdf" 1))&lt;BR /&gt;(progn&lt;BR /&gt;(command "-plot"&lt;BR /&gt;"yes"&lt;BR /&gt;""&lt;BR /&gt;"Dwg To PDF.pc3" ;Printer Name&lt;BR /&gt;"ANSI D (34.00 x 22.00 Inches)" ;Paper Size&lt;BR /&gt;"Inches" ;Paper Units&lt;BR /&gt;"Landscape" ;Orientation&lt;BR /&gt;"No" ;Plot Upside Down?&lt;BR /&gt;"Window" ;Plot Area&lt;BR /&gt;"0.000000,0.000000" ;Lower left corner of window&lt;BR /&gt;"34.000000,22.000000" ;Upper right corner of window&lt;BR /&gt;"1:1" ;Plot Scale&lt;BR /&gt;"Center" ;Plot Offset&lt;BR /&gt;"Yes" ;Use Plot Style?&lt;BR /&gt;"BA_Standard.ctb" ;Plot Style Name&lt;BR /&gt;"Yes" ;Plot Lineweights?&lt;BR /&gt;"No" ;Scale Lineweights?&lt;BR /&gt;"No" ;Paper Space First?&lt;BR /&gt;"No" ;Hide Paper Space?&lt;BR /&gt;fnm&lt;BR /&gt;"No" ;Plot to File?&lt;BR /&gt;"Yes" ;Continue to Plot?&lt;BR /&gt;)&lt;BR /&gt;"\n:: Type "plotpdf" to run"&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;(princ)&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2023 21:22:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plot-lisp/m-p/12205335#M66483</guid>
      <dc:creator>Mike_Ishman</dc:creator>
      <dc:date>2023-08-29T21:22:58Z</dc:date>
    </item>
    <item>
      <title>Re: plot lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plot-lisp/m-p/12205341#M66484</link>
      <description>&lt;P&gt;Wow, this is a blast from the past! Let me edit the code and I'll get back to you!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2023 21:26:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plot-lisp/m-p/12205341#M66484</guid>
      <dc:creator>Jonathan3891</dc:creator>
      <dc:date>2023-08-29T21:26:11Z</dc:date>
    </item>
    <item>
      <title>Re: plot lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plot-lisp/m-p/12205388#M66485</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/14393810"&gt;@Mike_Ishman&lt;/a&gt;&amp;nbsp;give this a try.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You will need to update the path and reset the plot style name.&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;(defun C:plotpdf (/ fnm)

  (setq fnm (strcat "C:\\TEST\\" (vl-filename-base (getvar 'dwgname)) ".pdf")) ;Set Path &amp;amp; File Name

  ;Start Plotting
  (command "-plot"
	   "yes"
	   ""
	   "Dwg To PDF.pc3" ;Printer Name
	   "ANSI D (34.00 x 22.00 Inches)" ;Paper Size
	   "Inches" ;Paper Units
	   "Landscape" ;Orientation
	   "No" ;Plot Upside Down?
	   "Window" ;Plot Area
	   "0.000000,0.000000" ;Lower left corner of window
	   "34.000000,22.000000" ;Upper right corner of window
	   "1:1" ;Plot Scale
	   "Center" ;Plot Offset
	   "Yes" ;Use Plot Style?
	   "monochrome.ctb" ;Plot Style Name
	   "Yes" ;Plot Lineweights?
	   "No" ;Scale Lineweights?
	   "No" ;Paper Space First?
	   "No" ;Hide Paper Space?
	   fnm
	   "No" ;Plot to File?
	   "Yes" ;Continue to Plot?
	   )
  "\n:: Type "plotpdf" to run"
  (princ)
);defun&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>Tue, 29 Aug 2023 21:53:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plot-lisp/m-p/12205388#M66485</guid>
      <dc:creator>Jonathan3891</dc:creator>
      <dc:date>2023-08-29T21:53:53Z</dc:date>
    </item>
    <item>
      <title>Re: plot lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plot-lisp/m-p/12208506#M66486</link>
      <description>&lt;P&gt;Another makes a pdf directory under the dwg location.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;;Plots layouts by range
; By Alan H Feb 2014

(defun AH:pltlays ( / val1 val2 dwgname lendwg pdfname lay numlay numend dwgpre)
(SETVAR "PDMODE" 0)
(setvar "plottransparencyoverride" 2)
(setvar "fillmode" 1)
(setvar "textfill" 1)
(setq plotnames '())

; check that pdf directory exists
(setq dwgpre (strcat (getvar "dwgprefix") "\pdf"))
(if (= (vl-file-directory-p dwgpre) nil)
(vl-mkdir dwgpre)
)
(SETQ LAYOUTS (vla-get-Layouts (vla-get-activedocument (vlax-get-acad-object))))
(SETQ COUNT (- (VLA-GET-COUNT LAYOUTS) 1))

(if (not AH:getvalsm)(load "Multi Getvals.lsp"))
(setq vals (AH:getvalsm  (list "Enter plot range" "Enter start tab number" 6 4 "1" "Enter end tab number" 6 4 (RTOS COUNT 2 0))))

(setq numlay (atoi (nth 0 vals)))
(setq numend (atoi (nth 1 vals)))

(setq len (+ (- numend numlay) 1))

(setq dwgname (GETVAR "dwgname"))
(setq lendwg (strlen dwgname))
(setq dwgname (substr dwgname 1 (- lendwg 4)))

(repeat len
(vlax-for lay LAYOUTS
(if (= numlay (vla-get-taborder lay))
  (setvar "ctab" (vla-get-name lay))
) ; if

(setq pdfname (strcat dwgpre "\\" dwgname "-" (getvar "ctab") ".pdf" ))
) ; for

(setvar "textfill" 1)
(setvar "fillmode" 1)
(setvar "PLOTTRANSPARENCYOVERRIDE" 2)
    (COMMAND "-PLOT"  "Y"  "" "dwg to Pdf"
	       "Iso full bleed A3 (420.00 x 297.00 MM)" "m" "LANDSCAPE"  "N"   "W"  "-6,-6" "807,560" "1=2"  "C"
	       "y" "Acad.ctb" "Y"	"n" "n" "n" pdfName "N" "y"
    )
    
(setq numlay (+ numlay 1))

) ; end repeat

) ; defun

(AH:pltlays)


(princ)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2023 03:54:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plot-lisp/m-p/12208506#M66486</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2023-08-31T03:54:21Z</dc:date>
    </item>
    <item>
      <title>Re: plot lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plot-lisp/m-p/12209436#M66487</link>
      <description>&lt;P&gt;Worked perfect, thank you.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2023 12:41:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plot-lisp/m-p/12209436#M66487</guid>
      <dc:creator>Mike_Ishman</dc:creator>
      <dc:date>2023-08-31T12:41:25Z</dc:date>
    </item>
    <item>
      <title>Re: plot lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plot-lisp/m-p/13083878#M66488</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/756506"&gt;@Jonathan3891&lt;/a&gt;&amp;nbsp;If you don't mind....I'm working through one of these, what part of your lisp tells the routine to ignore overwriting an existing pdf?&amp;nbsp; I have a simple routine the plots only specific named layouts but hangs when there is an existing file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(defun C:RRR ( / cmd)&lt;BR /&gt;(setq cmd (getvar 'cmdecho)) (setvar 'cmdecho 0)&lt;BR /&gt;(foreach Layout (List "Cover Page" "Demo")&lt;BR /&gt;(command "_.-PLOT"&lt;BR /&gt;"No" ; Detailed plot configuration? [Yes/No] &amp;lt;No&amp;gt;: No&lt;BR /&gt;Layout ; Enter a layout name or [?] &amp;lt;Layout1&amp;gt;:&lt;BR /&gt;"" ; Enter a page setup name&lt;BR /&gt;"DWG To PDF.pc3" ; Enter an output device name or [?] &amp;lt;DWG To PDF.pc3&amp;gt;:&lt;BR /&gt;(strcat (getvar "DWGPREFIX") Layout ".pdf") ; Directory to save (strcat (getvar "DWGPREFIX") Layout ".pdf")&lt;BR /&gt;"No" ; save changes to page setup?&lt;BR /&gt;"Yes" ; proceed with plot?&lt;BR /&gt;); command&lt;BR /&gt;); foreach&lt;BR /&gt;(setvar 'cmdecho cmd)&lt;BR /&gt;(princ)&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2024 18:44:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plot-lisp/m-p/13083878#M66488</guid>
      <dc:creator>kthmarks</dc:creator>
      <dc:date>2024-10-14T18:44:40Z</dc:date>
    </item>
    <item>
      <title>Re: plot lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plot-lisp/m-p/13084035#M66489</link>
      <description>&lt;P&gt;review the plot sequence of commands very carefully and you're see where your error is:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="paullimapa_0-1728936019596.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1421404i50188F1EA3B0EEB1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="paullimapa_0-1728936019596.png" alt="paullimapa_0-1728936019596.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2024 20:00:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plot-lisp/m-p/13084035#M66489</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2024-10-14T20:00:23Z</dc:date>
    </item>
    <item>
      <title>Re: plot lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plot-lisp/m-p/13084073#M66490</link>
      <description>&lt;P&gt;If it is stopping because the .dxf file exists, you need to either 'delete' the .dxf, or check if it exists.&lt;/P&gt;&lt;P&gt;Here's a sample route to check if it exists. It's up to you to 'delete' it if you are updating it.&lt;/P&gt;&lt;P&gt;You could use (vl-delete fname) if updating.&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;(defun C:RRR ( / cmd)
 (setq cmd (getvar 'cmdecho))
 (setvar 'cmdecho 0)
 (foreach Layout (List "Cover Page" "Demo")
  (setq fname (strcat (getvar "DWGPREFIX") Layout ".pdf"))
  (if (not (findfile fname))
   (progn
    (command "_.-PLOT"
       "No" ; Detailed plot configuration? [Yes/No] &amp;lt;No&amp;gt;: No
       Layout ; Enter a layout name or [?] &amp;lt;Layout1&amp;gt;:
        "" ; Enter a page setup name
        "DWG To PDF" ; Enter an output device name or [?] &amp;lt;DWG To PDF.pc3&amp;gt;:
        (strcat (getvar "DWGPREFIX") Layout ".pdf") ; Directory to save (strcat (getvar "DWGPREFIX") Layout ".pdf")
        "No" ; save changes to page setup?
        "Yes" ; proceed with plot?
     ); command
    ); progn
   ); if
); foreach
 (setvar 'cmdecho cmd)
 (princ)
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ECCAD&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2024 20:22:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plot-lisp/m-p/13084073#M66490</guid>
      <dc:creator>ec-cad</dc:creator>
      <dc:date>2024-10-14T20:22:24Z</dc:date>
    </item>
    <item>
      <title>Re: plot lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plot-lisp/m-p/13085554#M66491</link>
      <description>&lt;P&gt;wow.&amp;nbsp; Thanks guys for the responses.&amp;nbsp; I got two completely different directions here.&amp;nbsp;&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1137264"&gt;@paullimapa&lt;/a&gt;&amp;nbsp;the routine works with the correct file/layout names.&amp;nbsp; It just errors when the file exists so I'm not sure to look for my mistake.&lt;/P&gt;&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/15306255"&gt;@ec-cad&lt;/a&gt;&amp;nbsp;I loaded your routine and if the file does exist, if just does nothing, Maybe a message that says file exists, do you want to overwrite?&amp;nbsp; I have no clue how to do that.&amp;nbsp; I was hoping it would just be a Y/N in the command string somewhere.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Oct 2024 13:33:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plot-lisp/m-p/13085554#M66491</guid>
      <dc:creator>kthmarks</dc:creator>
      <dc:date>2024-10-15T13:33:42Z</dc:date>
    </item>
    <item>
      <title>Re: plot lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plot-lisp/m-p/13085838#M66492</link>
      <description>&lt;P&gt;Curious as to what version of &lt;STRONG&gt;AutoCAD&lt;/STRONG&gt; you're using. In older versions I've notice the &lt;STRONG&gt;PLOT&lt;/STRONG&gt; sequence may not work if the output file exists. I would have to code in a sequence to check and delete the existing output file name.&lt;/P&gt;&lt;P&gt;I've tested in &lt;STRONG&gt;2020&lt;/STRONG&gt; through &lt;STRONG&gt;2025&lt;/STRONG&gt; and now the plot sequence actually automatically overwrites existing matching output file names. Your existing &lt;STRONG&gt;C:RRR&lt;/STRONG&gt;&amp;nbsp;code works flawlessly as long as you do have layout names matching "&lt;STRONG&gt;Cover Page&lt;/STRONG&gt;" and "&lt;STRONG&gt;Demo&lt;/STRONG&gt;".&lt;/P&gt;&lt;P&gt;So I'm not sure if your problem relates to current versions of &lt;STRONG&gt;AutoCAD&lt;/STRONG&gt;. But I've included the sections of code that would do the check and delete the matching output file in your system. Hopefully you have permissions to delete and make sure the PDF file is &lt;STRONG&gt;NOT&lt;/STRONG&gt; currently opened by any viewer:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;; RRR plot list of layouts 
; OP:
; https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plot-lisp/m-p/13085554#M473012
(defun C:RRR ( / cmd)
(vl-load-com) ; load vl functions
(setq cmd (getvar 'cmdecho)) (setvar 'cmdecho 0)
(foreach Layout (List "Cover Page" "Demo")
(if (findfile (strcat (getvar "DWGPREFIX") Layout ".pdf")) ; check if file exists
 (progn ; then delete it
  (princ (strcat "\nFile Exists will Delete: " (strcat (getvar "DWGPREFIX") Layout ".pdf"))) ; print message
  (vl-file-delete (strcat (getvar "DWGPREFIX") Layout ".pdf")) ; delete file
 )
)
(command "_.-PLOT"
"No" ; Detailed plot configuration? [Yes/No] &amp;lt;No&amp;gt;: No
Layout ; Enter a layout name or [?] &amp;lt;Layout1&amp;gt;:
"" ; Enter a page setup name
"DWG To PDF.pc3" ; Enter an output device name or [?] &amp;lt;DWG To PDF.pc3&amp;gt;:
(strcat (getvar "DWGPREFIX") Layout ".pdf") ; Directory to save (strcat (getvar "DWGPREFIX") Layout ".pdf")
"No" ; save changes to page setup?
"Yes" ; proceed with plot?
); command
); foreach
(setvar 'cmdecho cmd)
(princ)
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Oct 2024 15:32:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plot-lisp/m-p/13085838#M66492</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2024-10-15T15:32:45Z</dc:date>
    </item>
    <item>
      <title>Re: plot lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plot-lisp/m-p/13085995#M66493</link>
      <description>&lt;P&gt;Paulli,&lt;/P&gt;&lt;P&gt;Your solution doesn't 'ask' if OP wants to delete the file.&lt;/P&gt;&lt;P&gt;Perhaps this method will work, if OP needs that feature.&lt;/P&gt;&lt;P&gt;Untested.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun C:RRR ( / cmd)
 (setq cmd (getvar 'cmdecho))
 (setvar 'cmdecho 0)
 (foreach Layout (List "Cover Page" "Demo")
  (setq fname (strcat (getvar "DWGPREFIX") Layout ".pdf"))
   (if (findfile fname) ; check if file exists
    (progn
     (setq ans (strcase (getstring (strcat "\nFile " fname " exists, do you want to over-write it ? Y or N &amp;lt;Y&amp;gt;:"))))
      (if (or (= ans "")(= ans nil)(= ans "Y")); then delete it
        (progn
          (princ (strcat "\nDeleted File: " fname)) ; print message
          (vl-file-delete fname); delete file
        ); progn
       ); if
      (if (= ans "N")
       (princ (strcat "\nSkipping Existing File: " fname)) ; print message
      ); if
     ); progn
    ); if

;; Continue with Plot if .pdf file does not exist..
  (if (not (findfile fname))
   (progn
    (command "_.-PLOT"
       "No" ; Detailed plot configuration? [Yes/No] &amp;lt;No&amp;gt;: No
       Layout ; Enter a layout name or [?] &amp;lt;Layout1&amp;gt;:
        "" ; Enter a page setup name
        "DWG To PDF" ; Enter an output device name or [?] &amp;lt;DWG To PDF.pc3&amp;gt;:
        (strcat (getvar "DWGPREFIX") Layout ".pdf") ; Directory to save (strcat (getvar "DWGPREFIX") Layout ".pdf")
        "No" ; save changes to page setup?
        "Yes" ; proceed with plot?
     ); command
    ); progn
   ); if
); foreach
 (setvar 'cmdecho cmd)
 (princ)
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ECCAD&lt;/P&gt;</description>
      <pubDate>Tue, 15 Oct 2024 16:46:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plot-lisp/m-p/13085995#M66493</guid>
      <dc:creator>ec-cad</dc:creator>
      <dc:date>2024-10-15T16:46:06Z</dc:date>
    </item>
    <item>
      <title>Re: plot lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plot-lisp/m-p/13086005#M66494</link>
      <description>&lt;P&gt;As OP stated&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;“what part of your lisp tells the routine to ignore overwriting an existing pdf?”&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I interpret “ignore overwriting” to mean delete without prompting&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Oct 2024 16:51:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plot-lisp/m-p/13086005#M66494</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2024-10-15T16:51:15Z</dc:date>
    </item>
  </channel>
</rss>

