Automatic PLOT settings LISP Routine Stopped working after 2026 Update

Automatic PLOT settings LISP Routine Stopped working after 2026 Update

Sean.Boseman
Participant Participant
248 Views
4 Replies
Message 1 of 5

Automatic PLOT settings LISP Routine Stopped working after 2026 Update

Sean.Boseman
Participant
Participant

Hello,

I have been using a LISP routine for years that automatically sets all the plot settings and asks whether or not you would like to Plot, if so how many quantities and if not it will save the plot settings. This routine has worked for me for years, but for some reason for 2026 I cannot get it to work no matter what I do. Can someone please point me in the right direction? I appreciate everyone's help. See routine below, I've also included the file. On another note, I have never been able to add the proper function to plot to PDF, if someone could help me figure that out too that would be great.

 

;;isg.lsp
;;(c) 2014 Sean Boseman
;;All rights reserved.

(defun c:isg (/ a k qty)
(load "acetutil")
(setq k (acet-ui-message "Do you really want to print a color copy to the ISG Printer?" "Print Confirmation:" 52))
(if (= k 6)
(progn
(setq qty nil)
(setq qty (getreal "\nEnter number of copies <1>:"))
(if (= qty nil) (setq qty 1))
(setvar "cmdecho" 0)
(setq a (getvar "tilemode"))
(while (/= qty 0)
(progn
(if (= a 0)
(command "-plot" "y" "" "\\\\print\\SALES_KM_C558" "11x17" "inches" "landscape" "no" "extents" "fit" "center" "no" "" "yes" "no" "no" "no" "no" "yes" "yes")
(command "-plot" "y" "" "\\\\print\\SALES_KM_C558" "11x17" "inches" "landscape" "no" "extents" "fit" "center" "no" "" "yes" "as" "no" "yes" "yes")
)
(command)
(setq qty (- qty 1))
)
)
)
(progn
(setvar "cmdecho" 0)
(setq a (getvar "tilemode"))
(if (= a 0)
(command "-plot" "y" "" "\\\\print\\SALES_KM_C558" "11x17" "inches" "landscape" "no" "extents" "fit" "center" "no" "" "yes" "no" "no" "no" "no" "yes" "no")
(command "-plot" "y" "" "\\\\print\\SALES_KM_C558" "11x17" "inches" "landscape" "no" "extents" "fit" "center" "no" "" "yes" "as" "no" "yes" "no")
)
(command)
)
)
(princ)
)

 

0 Likes
249 Views
4 Replies
Replies (4)
Message 2 of 5

paullimapa
Mentor
Mentor

First of all why don't you contact Sean Boseman who copyrighted (c) 2014 this lisp function?

 

As to why it's failing now, perhaps the name of your print server has changed:

"\\\\print\\SALES_KM_C558"

Or the paper sizes available on that print device has also changed:

"11x17"

 

On your own you can manually go through the plot sequence on the command line to check to see at what prompt the plot command sequence fails.

As for PDF again you can do this on your own by looking through the prompts and responses on the command sequence.

You may want to set FILEDIA to 0 before starting.

Also remember to set FILEDIA back to 1 afterwards otherwise you won't see any of the FILE Open/Save dialog window.

Here's the Plot sequence in your lisp for Paperspace which only saves changes to Page Settings but does NOT Plot:

(command "-plot" "y" "" "\\\\print\\SALES_KM_C558" "11x17" "inches" "landscape" "no" "extents" "fit" "center" "no" "" "yes" "no" "no" "no" "no" "yes" "no")

"" = a return accepting the current prompt without making any changes

Here's how the command sequence looks like for generating a PDF using Dwg To Pdf.pc3 on ANSI B (17.00 x 11.00 Inches) paper size which only saves changes to Page Settings but does NOT Plot::

Command: FILEDIA
Enter new value for FILEDIA <1>: 0
Command: _.TILEMODE
Enter new value for TILEMODE <1>: 0
Command: _.-PLOT
Detailed plot configuration? [Yes/No] <No>: _Yes
Enter a layout name or [?] <Layout1>:
Enter an output device name or [?] <None>: Dwg To Pdf.pc3
Enter paper size or [?] <ANSI B (17.00 x 11.00 Inches)>: ANSI B (17.00 x 11.00 Inches)
Enter paper units [Inches/Millimeters] <Inches>: _Inches
Enter drawing orientation [Portrait/Landscape] <Portrait>: _Landscape
Plot upside down? [Yes/No] <No>: _No
Enter plot area [Display/Extents/Layout/View/Window] <Layout>: _Extents
Enter plot scale (Plotted Inches=Drawing Units) or [Fit] <1:1>: _Fit
Enter plot offset (x,y) or [Center] <0.00,0.00>: _Center
Plot with plot styles? [Yes/No] <Yes>: _No
Enter plot style table name or [?] (enter . for none) <>:
Plot with lineweights? [Yes/No] <Yes>: _Yes
Scale lineweights with plot scale? [Yes/No] <No>: _No
Plot paper space first? [Yes/No] <No>: _No
Hide paperspace objects? [Yes/No] <No>: _No
Enter file name <Drawing1-Layout1.pdf>:
Save changes to page setup [Yes/No]? <N> _Yes
Proceed with plot [Yes/No] <Y>: _No
Command: FILEDIA
Enter new value for FILEDIA <0>: 1

Here's your lisp code on the Plot sequence for Modelspace which only saves changes to Page Settings but does NOT Plot:

(command "-plot" "y" "" "\\\\print\\SALES_KM_C558" "11x17" "inches" "landscape" "no" "extents" "fit" "center" "no" "" "yes" "as" "no" "yes" "no")

 Here's how the command sequence looks like for generating a PDF using Dwg To Pdf.pc3 on ANSI B (17.00 x 11.00 Inches) paper size which only saves changes to Page Settings but does NOT Plot:

Command: _.FILEDIA
Enter new value for FILEDIA <1>: 0
Command: _.TILEMODE
Enter new value for TILEMODE <0>: 1
Command: _.-PLOT
Detailed plot configuration? [Yes/No] <No>: _Yes
Enter a layout name or [?] <Model>:
Enter an output device name or [?] <None>: Dwg To Pdf.pc3
Enter paper size or [?] <ANSI B (17.00 x 11.00 Inches)>: ANSI B (17.00 x 11.00 Inches)
Enter paper units [Inches/Millimeters] <Inches>: _Inches
Enter drawing orientation [Portrait/Landscape] <Portrait>: _Landscape
Plot upside down? [Yes/No] <No>: _No
Enter plot area [Display/Extents/Limits/View/Window] <Display>: _Extents
Enter plot scale (Plotted Inches=Drawing Units) or [Fit] <Fit>: _Fit
Enter plot offset (x,y) or [Center] <0.00,0.00>: _Center
Plot with plot styles? [Yes/No] <Yes>: _No
Enter plot style table name or [?] (enter . for none) <>:
Plot with lineweights? [Yes/No] <Yes>: _Yes
Enter shade plot setting [As displayed/legacy Wireframe/legacy Hidden/Visual styles/Rendered] <As displayed>: _As
Enter file name <Drawing1-Model.pdf>:
Save changes to page setup [Yes/No]? <N> _Yes
Proceed with plot [Yes/No] <Y>: _No
Command: _.FILEDIA
Enter new value for FILEDIA <0>: 1

 Notice that the only change you need to make to actually proceed with plotting is responding to the last prompt on Proceed with plot with a Yes instead of a No.


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 3 of 5

Sean.Boseman
Participant
Participant

Hi Paul,

 

Thank you for your insights. I am Sean Boseman and I can't figure it out 🤣. The strange thing is I did manually go through plot sequence; the print server is the same, however, I did find that the paper size did change. Even though I corrected the paper size, I continued to get an error and an unable determine where it is getting hung up. Which is why I was asking some more experienced lisp programmer than I. I will take a look at the PDF sequences and report back, I appreciate your help.

0 Likes
Message 4 of 5

paullimapa
Mentor
Mentor

At the Paper Size prompt, enter a question mark "?" and then copy & paste the paper size you want from the list to the command prompt and see if that works.


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 5 of 5

Sea-Haven
Mentor
Mentor

The paper size is very critical even down to the spaces and capitals in its name. Like you plotted to company network printer, yours looked ok. 

 

Another plot pdf sample,  this is metric and used for plotting multiple layouts hence the pdfname, which is a full path and pdf name.

    (COMMAND "-PLOT"  "Y"  "" "Plot 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 pdfname (strcat (getvar "dwgprefix") "pdf\\" dwgname "-" (getvar "ctab")))

 

0 Likes