<?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 to Detect PC3 Differences with extra Plot sequence prompt in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-detect-pc3-differences-with-extra-plot-sequence-prompt/m-p/11302835#M43272</link>
    <description>&lt;P&gt;Thanks for your reply and the very nicely designed dialog.&lt;/P&gt;&lt;P&gt;Unfortunately, the write to file or not prompt is built-in to the print driver.&lt;/P&gt;&lt;P&gt;As I mentioned in my original post, there are drivers that &lt;STRONG&gt;Autodesk&lt;/STRONG&gt; provides with &lt;STRONG&gt;AutoCAD&lt;/STRONG&gt; that &lt;STRONG&gt;don't have&lt;/STRONG&gt; that prompt during the plot sequence. But there are also drivers &lt;STRONG&gt;Autodesk&lt;/STRONG&gt; provides with &lt;STRONG&gt;AutoCAD&lt;/STRONG&gt; that &lt;STRONG&gt;do have&lt;/STRONG&gt; that prompt. So the code whether written in script form or lisp would have to accommodate for this assuming there's a way the driver can be analyzed to determine one vs the other.&lt;/P&gt;</description>
    <pubDate>Mon, 18 Jul 2022 00:47:00 GMT</pubDate>
    <dc:creator>paullimapa</dc:creator>
    <dc:date>2022-07-18T00:47:00Z</dc:date>
    <item>
      <title>Lisp to Detect PC3 Differences with extra Plot sequence prompt</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-detect-pc3-differences-with-extra-plot-sequence-prompt/m-p/11301352#M43267</link>
      <description>&lt;P&gt;I noticed that with the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;AutoCAD&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;pre-configured shipped printers like&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;DWG to PDF.pc3&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;or&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;STRONG&gt;DWF6 ePlot.pc3&lt;/STRONG&gt;&amp;nbsp;(including&amp;nbsp;the built-in&amp;nbsp;&lt;STRONG&gt;PDF&lt;/STRONG&gt;,&amp;nbsp;&lt;STRONG&gt;DWF&lt;/STRONG&gt;,&amp;nbsp;&lt;STRONG&gt;DXB&lt;/STRONG&gt;&amp;nbsp;or&amp;nbsp;&lt;STRONG&gt;Raster File Format&lt;/STRONG&gt;&amp;nbsp;drivers)&amp;nbsp;&lt;/SPAN&gt;all are missing an additional prompt request during the plot sequence. For example with&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;DWG to PDF.pc3&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;this is the sequence:&lt;/P&gt;&lt;P&gt;-PLOT&lt;BR /&gt;Detailed plot configuration? [Yes/No] &amp;lt;No&amp;gt;:&amp;nbsp;&lt;BR /&gt;Enter a layout name or [?] &amp;lt;Model&amp;gt;:&amp;nbsp;&lt;/P&gt;&lt;P&gt;Enter a Page Setup &amp;lt;&amp;gt;:&amp;nbsp;&lt;BR /&gt;Enter an output device name or [?] &amp;lt;DWG To PDF.pc3&amp;gt;:&lt;/P&gt;&lt;P&gt;Enter File name&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;But with any other plotter device I add using even an AutoCAD provided drivers (&lt;STRONG&gt;Adobe&lt;/STRONG&gt;&lt;SPAN&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;CalComp&lt;/STRONG&gt;&lt;SPAN&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Hewlett-Packard&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&amp;amp;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Xerox&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;drivers all listed under&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Manufacturers&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;on the&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Add-A-Plotter Wizard)&lt;/STRONG&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;, there's an extra prompt "&lt;SPAN&gt;&lt;STRONG&gt;Write the plot to a file [Yes/No] &amp;lt;Y&amp;gt;&lt;/STRONG&gt;:"&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;regardless if I've already preset the port to File or not. For example, I added print driver I call&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;AdobePS2.pc3&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;using&lt;STRONG&gt; AutoCAD's Postscript Level II&lt;/STRONG&gt; built-in driver. Now that additional prompt appears:&lt;/P&gt;&lt;P&gt;-PLOT&lt;BR /&gt;Detailed plot configuration? [Yes/No] &amp;lt;No&amp;gt;:&amp;nbsp;&lt;BR /&gt;Enter a layout name or [?] &amp;lt;Model&amp;gt;:&amp;nbsp;&lt;/P&gt;&lt;P&gt;Enter a Page Setup &amp;lt;&amp;gt;:&amp;nbsp;&lt;BR /&gt;Enter an output device name or [?] &amp;lt;AdobePS2.pc3&amp;gt;:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Write the plot to a file [Yes/No] &amp;lt;Y&amp;gt;:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Enter File name&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This really throws off my Plot Script files. Is there a way to detect when this prompt will occur?&lt;/P&gt;</description>
      <pubDate>Sat, 16 Jul 2022 17:19:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-detect-pc3-differences-with-extra-plot-sequence-prompt/m-p/11301352#M43267</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2022-07-16T17:19:58Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to Detect PC3 Differences with extra Plot sequence prompt</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-detect-pc3-differences-with-extra-plot-sequence-prompt/m-p/11301775#M43268</link>
      <description>&lt;P&gt;PDF &lt;STRONG&gt;only has write to file&lt;/STRONG&gt; hence no option. Just add what device your plotting to with a &lt;STRONG&gt;IF&lt;/STRONG&gt; so pdf jpg etc dont have extra line in your plot routine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just a comment we had multi plot options using menu's so hard coded to correct pc3. Also checking user name so would plot to printer near them in a multi story office.&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="SeaHaven_0-1658021556173.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1092437i1F70330B83CEBA3C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SeaHaven_0-1658021556173.png" alt="SeaHaven_0-1658021556173.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Jul 2022 01:32:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-detect-pc3-differences-with-extra-plot-sequence-prompt/m-p/11301775#M43268</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2022-07-17T01:32:39Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to Detect PC3 Differences with extra Plot sequence prompt</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-detect-pc3-differences-with-extra-plot-sequence-prompt/m-p/11301918#M43269</link>
      <description>&lt;P&gt;Thanks for your reply. In a very controlled environment where users cannot &lt;STRONG&gt;add&lt;/STRONG&gt; their own printers or &lt;STRONG&gt;rename&lt;/STRONG&gt; existing ones then this may not be an issue. But I'm actually trying to accommodate for a bit of flexibility. Unfortunately, even within the printer driver sets &lt;STRONG&gt;AutoCAD&lt;/STRONG&gt; provides like &lt;STRONG&gt;Adobe&lt;/STRONG&gt; which creates &lt;STRONG&gt;Postscript&lt;/STRONG&gt; files, there's that extra prompt. I guess that's because back in the old days, those Postscript files would be sent directly to the printer instead of to file.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Jul 2022 05:34:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-detect-pc3-differences-with-extra-plot-sequence-prompt/m-p/11301918#M43269</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2022-07-17T05:34:32Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to Detect PC3 Differences with extra Plot sequence prompt</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-detect-pc3-differences-with-extra-plot-sequence-prompt/m-p/11302086#M43270</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found a trick for the "command" version., not elegant, and require running the command twice.&lt;/P&gt;&lt;P&gt;At the first run, assume it ask to plot on a file or not, answer "Yes" then complete the command with "No".&lt;/P&gt;&lt;P&gt;Then check cmdactive sysvar. It should be 0 or &amp;gt;0. Then you would know what prompt is required.&lt;/P&gt;&lt;P&gt;Something like this:&lt;/P&gt;&lt;LI-CODE lang="lisp"&gt;(defun c:test ( / filename)
  (setq filename "D:\\Test")
  (command
    "-plot"
    "No" ;detailed config
    ""   ;layout
    ""   ;page setup
    ""   ;output device
    "Yes";Plot to file? OR filename
    "No" ;filename OR Save
    "No" ;Save OR Proceed
  )
  (if
    (&amp;gt; (getvar 'cmdactive) 0)
    (command
      "no" ;end previous Plot Command
      "-plot"
      "No" ;detailed config
      ""   ;layout
      ""   ;page setup
      ""   ;output device
      "No" ;Plot to file
      "No" ;Save
      "Yes";Proceed
    )
    (command
      "-plot"
      "No" ;detailed config
      ""   ;layout
      ""   ;page setup
      ""   ;output device
      filename
      "No" ;Save
      "Yes";Proceed
    )
  )
  (princ)
)
      
      
Command:
Command: *Cancel*

Command: TEST -plot Detailed plot configuration? [Yes/No] &amp;lt;No&amp;gt;: No
Enter a layout name or [?] &amp;lt;Model&amp;gt;:
Enter a page setup name &amp;lt;&amp;gt;:
Enter an output device name or [?] &amp;lt;DWG To PDF.pc3&amp;gt;:
Enter file name &amp;lt;Drawing1.pdf&amp;gt;: Yes
Save changes to page setup [Yes/No]? &amp;lt;N&amp;gt; No
Proceed with plot [Yes/No] &amp;lt;Y&amp;gt;: No
Command: -plot Detailed plot configuration? [Yes/No] &amp;lt;No&amp;gt;: No
Enter a layout name or [?] &amp;lt;Model&amp;gt;:
Enter a page setup name &amp;lt;&amp;gt;:
Enter an output device name or [?] &amp;lt;DWG To PDF.pc3&amp;gt;:
Enter file name &amp;lt;Drawing1.pdf&amp;gt;: D:\Test
Save changes to page setup [Yes/No]? &amp;lt;N&amp;gt;
No Proceed with plot [Yes/No] &amp;lt;Y&amp;gt;: Yes
Effective plotting area:  5.94 wide by 11.00 high

Plotting viewport 2.

Command:
Command:
Command:
Command: _plot
Command: TEST -plot Detailed plot configuration? [Yes/No] &amp;lt;No&amp;gt;: No
Enter a layout name or [?] &amp;lt;Model&amp;gt;:
Enter a page setup name &amp;lt;&amp;gt;:
Enter an output device name or [?] &amp;lt;HP LaserJet Pro M428-M429 PCL-6 (V4) (Network)&amp;gt;:
Write the plot to a file [Yes/No] &amp;lt;N&amp;gt;: Yes
Enter file name &amp;lt;Drawing1.plt&amp;gt;: No
Save changes to page setup [Yes/No]? &amp;lt;N&amp;gt; No
Proceed with plot [Yes/No] &amp;lt;Y&amp;gt;: no
Command: -plot Detailed plot configuration? [Yes/No] &amp;lt;No&amp;gt;: No
Enter a layout name or [?] &amp;lt;Model&amp;gt;:
Enter a page setup name &amp;lt;&amp;gt;:
Enter an output device name or [?] &amp;lt;HP LaserJet Pro M428-M429 PCL-6 (V4) (Network)&amp;gt;:
Write the plot to a file [Yes/No] &amp;lt;N&amp;gt;: No
Save changes to page setup [Yes/No]? &amp;lt;N&amp;gt; No
Proceed with plot [Yes/No] &amp;lt;Y&amp;gt;: Yes
Effective plotting area:  5.76 wide by 10.67 high

Plotting viewport 2.

Command:&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Jul 2022 10:23:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-detect-pc3-differences-with-extra-plot-sequence-prompt/m-p/11302086#M43270</guid>
      <dc:creator>phanaem</dc:creator>
      <dc:date>2022-07-17T10:23:55Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to Detect PC3 Differences with extra Plot sequence prompt</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-detect-pc3-differences-with-extra-plot-sequence-prompt/m-p/11302830#M43271</link>
      <description>&lt;P&gt;I dont understand why your pushing write to file ? Do you not have access to a printer and say are going elsewhere to plot at another office maybe ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Again you could make choices in 1 lisp I have Multi radio buttons 2col as per image so write the output to suit, we had like 10 printers/plotters yes all hard coded names.&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="SeaHaven_0-1658104189471.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1092601i1C9FB9B6C433D587/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SeaHaven_0-1658104189471.png" alt="SeaHaven_0-1658104189471.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;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(if (not ah:buttscol)(load "Multi Radio buttons 2col.lsp"))
(if (= ah:but nil)(setq ah:but 1))
(if (= ah:but2 nil)(setq ah:but2 1))
(setq lst1 (list "Select printer" "Printer " "printer 2" "Printer 3" "printer 4" "Printer 5" "Printer 6"))
(setq lst2 (list "Select output" "File" "To printer"))
(ah:buttscol ah:but ah:but2 "Select printer" lst1 lst2)

(setq ans1 (nth ah:2col lst1))
(setq ans2 (nth ah:2col2 lst2))&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;Just put IF's in your plot code so respond "To file" etc (if (= ans2 "File")(command "Y") (command "N")) a cond for printer name, all my plot routines have this and same for filename no user input.&lt;/P&gt;&lt;LI-CODE lang="lisp"&gt;Enter an output device name or [?] &amp;lt;HP LaserJet Pro M428-M429 PCL-6 (V4) (Network)&amp;gt;:

Enter an output device name or [?] printername&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can save the previous answer into ah:but &amp;amp; ah:but2 for repeat plotting use button number look at ah:col ah:col2&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jul 2022 00:44:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-detect-pc3-differences-with-extra-plot-sequence-prompt/m-p/11302830#M43271</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2022-07-18T00:44:57Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to Detect PC3 Differences with extra Plot sequence prompt</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-detect-pc3-differences-with-extra-plot-sequence-prompt/m-p/11302835#M43272</link>
      <description>&lt;P&gt;Thanks for your reply and the very nicely designed dialog.&lt;/P&gt;&lt;P&gt;Unfortunately, the write to file or not prompt is built-in to the print driver.&lt;/P&gt;&lt;P&gt;As I mentioned in my original post, there are drivers that &lt;STRONG&gt;Autodesk&lt;/STRONG&gt; provides with &lt;STRONG&gt;AutoCAD&lt;/STRONG&gt; that &lt;STRONG&gt;don't have&lt;/STRONG&gt; that prompt during the plot sequence. But there are also drivers &lt;STRONG&gt;Autodesk&lt;/STRONG&gt; provides with &lt;STRONG&gt;AutoCAD&lt;/STRONG&gt; that &lt;STRONG&gt;do have&lt;/STRONG&gt; that prompt. So the code whether written in script form or lisp would have to accommodate for this assuming there's a way the driver can be analyzed to determine one vs the other.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jul 2022 00:47:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-detect-pc3-differences-with-extra-plot-sequence-prompt/m-p/11302835#M43272</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2022-07-18T00:47:00Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to Detect PC3 Differences with extra Plot sequence prompt</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-detect-pc3-differences-with-extra-plot-sequence-prompt/m-p/11302870#M43273</link>
      <description>&lt;P&gt;Yours is an excellent solution. I've modified the code to just give me an alert instead of following through with the print.&amp;nbsp; Thanks for this very smart way of resolving the problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;; by Stefan Muntean modified by Paul Li
; https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-detect-pc3-differences-with-extra-plot-sequence-prompt/m-p/11302830/highlight/false#M433841
; pc3tst checks to see if output device has the additional built-in print to file prompt
; Argument: 
; outputdev-arg = name of output device

(defun pc3tst (outputdev-arg / cmdecho menuecho)
  (setq cmdecho(getvar"cmdecho") menuecho(getvar"menuecho"))
  (setvar"cmdecho"0)(setvar"menuecho"0)
  (command
    "-plot"
    "No" ;detailed config
    ""   ;layout
    ""   ;page setup
    outputdev-arg   ;output device
    "Yes";Plot to file? OR filename
    "No" ;filename OR Save
    "No" ;Save OR Proceed
  )
  (if
    (&amp;gt; (getvar 'cmdactive) 0)
    (progn
     (command "_No") ;end previous Plot Command
     (alert(strcat "[" outputdev-arg "]\nDoes have Print To File Prompt."))
    )
    (alert(strcat "[" outputdev-arg "]\nDoes NOT have Print To File Prompt."))
  )
  (setvar"menuecho"menuecho)(setvar"cmdecho"cmdecho)(princ)
) ; defun pc3tst&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jul 2022 01:23:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-detect-pc3-differences-with-extra-plot-sequence-prompt/m-p/11302870#M43273</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2022-07-18T01:23:22Z</dc:date>
    </item>
  </channel>
</rss>

