This is untested code to show an example.
(defun c:pltalot (/ ss bbox name x minpt maxpt)
(if (setq ss
(ssget "_x"
'((0 . "INSERT") (2 . "LCC_BRD_LANDSCAPE_*") (410 . "Model"))
)
)
(progn
(setq lst (mapcar 'vlax-ename->vla-object
(vl-remove-if 'listp (mapcar 'cadr (ssnamex ss)))
)
)
(foreach tb lst
(setq bname (cdr (assoc 2 (entget tb))))
(setq bbox (vla-getboundingbox x 'minpt 'maxpt)
bbox (mapcar 'vlax-safearray->list (list minpt maxpt))
)
(cond
((wcmatch bname "*8?11")(goplot "DELL1710_0811_L" bbox)
((wcmatch bname "*11?17") (goplot "HP5000_1117_L" bbox))
)
)
)
)
(princ)
)
(defun goplot (pname box)
(cond
((= pname "DELL1710_0811_L")
;; AUTOPLOT_"Model"_DELL1710_0811_L.scr
(command "-plot"
;Detailed plot configuration? [Yes/No]
"Yes"
;Enter a layout name or [?]
"Model"
;Enter an output device name or [?]
"Dell Laser Printer 1710"
;Enter paper size or [?]
"Letter 8 ½ x 11 in"
;Enter paper units ["Inches"/Millimeters]
"Inches"
;Enter drawing orientation [Portrait/Landscape]
"landscape"
;Plot upside down? [Yes/No]
"No"
;Enter plot area [Display/"Extents"/Limits/View/Window]
"window"
(car box)
(cadr box)
;Enter plot scale (Plotted "Inches"=Drawing Units) or ["Fit"]
"Fit"
;Enter plot offset (x,y) or ["Center"]
"Center"
;Plot with plot styles? [Yes/No]
"Yes"
;Enter plot style table name or [?]
"monochrome.ctb"
;Plot with lineweights? [Yes/No]
"Yes"
;Enter shade plot setting ["As" displayed/Wireframe/Hidden/Rendered]
"As"
;Write the plot to a file [Yes/No]
"No"
;Save changes to page setup [Yes/No]
"Yes"
;Proceed with plot [Yes/No]
"Yes"
)
)
((= pname "HP5000_1117_L")
;; AUTOPLOT_PAPER_HP5000_1117_L.scr
(command "-plot"
;Detailed plot configuration? [Yes/No]
"Yes"
;Enter a layout name or [?]
""
;Enter an output device name or [?]
"HP LaserJet 5000 Series PCL 6"
;Enter paper size or [?]
"11 x 17"
;Enter paper units ["Inches"/Millimeters]
"Inches"
;Enter drawing orientation [Portrait/Landscape]
"landscape"
;Plot upside down? [Yes/No]
"No"
;Enter plot area [Display/"Extents"/Limits/View/Window]
"window"
(car box)
(cadr box)
;Enter plot scale (Plotted "Inches"=Drawing Units) or ["Fit"]
"Fit"
;Enter plot offset (x,y) or ["Center"]
"Center"
;Plot with plot styles? [Yes/No]
"Yes"
;Enter plot style table name or [?]
"monochrome.ctb"
;Plot with lineweights? [Yes/No]
"Yes"
;Scale lineweights with plot scale? [Yes/No]
"No"
;Plot paper space first? [Yes/No]
"Yes"
;Hide paperspace objects? [Yes/No]
"No"
;Write the plot to a file [Yes/No]
"No"
;Save changes to page setup [Yes/No]
"Yes"
;Proceed with plot [Yes/No]
"Yes"
)
)
((= pname "PAPER_PDF_1117_L")
;; AUTOPLOT_PAPER_PDF_1117_L.scr
(command "-plot"
;Detailed plot configuration? [Yes/No]
"Yes"
;Enter a layout name or [?]
""
;Enter an output device name or [?]
"Adobe PDF"
;Enter paper size or [?]
"Tabloid"
;Enter paper units ["Inches"/Millimeters]
"Inches"
;Enter drawing orientation [Portrait/Landscape]
"landscape"
;Plot upside down? [Yes/No]
"No"
;Enter plot area [Display/"Extents"/Limits/View/Window]
"window"
(car box)
(cadr box)
;Enter plot scale (Plotted "Inches"=Drawing Units) or ["Fit"]
"Fit"
;Enter plot offset (x,y) or ["Center"]
"Center"
;Plot with plot styles? [Yes/No]
"Yes"
;Enter plot style table name or [?]
"monochrome.ctb"
;Plot with lineweights? [Yes/No]
"Yes"
;Scale lineweights with plot scale? [Yes/No]
"No"
;Plot paper space first? [Yes/No]
"Yes"
;Hide paperspace objects? [Yes/No]
"No"
;Write the plot to a file [Yes/No]
"No"
;Save changes to page setup [Yes/No]
"Yes"
;Proceed with plot [Yes/No]
"Yes"
)
)
)
)