I attempted to search for answer and could not find an answer so now I am asking for help. I am just learning lisp and DCL and I have just jumped into the deep end. I have a popup box that has been filled in with the Printer list with System printers turned on. I also have a popup box that has the paper size list. What I am wanting is the paper size list to update based on the printer that is selected in printer list popup box. Essentially if I pick a printer that can not print 11x17 or even a larger size, I dont want to be presented those options. I see that it should be possible as the plot dialog box that is included in AutoCAD has this ability to be responsive. I can get both popup lists to fill in individually just not responsive. Below are some snippets of the Lisp and DCL in question. The lisp is not completed as of yet so if I post fully what I have it may be even more confusing.
: row {
: popup_list {
key = "printerlist";
label = "Printer/Plotter";
width = 20;
fixed_width_font = false;
value = 0;
}
: row {
: popup_list {
key = "papersizelist";
label = "Paper Size";
width = 20;
fixed_width_font = false;
value = 0;
}
}
(setq AcadDoc (vla-get-activedocument (vlax-get-acad-object)))
(setq ModelLayout (vla-item (vla-get-layouts AcadDoc) "Model"))
(setq NamedViews (vla-get-views AcadDoc))
(setq RefreshList (vla-RefreshPlotDeviceInfo ModelLayout))
(setq PrinterList
(vl-remove-if '(lambda (x) (wcmatch x "None"))
(vlax-safearray->list
(vlax-variant-value
(vla-getplotdevicenames ModelLayout)
)
)
)
)
(setq PaperSizeList
(vl-remove-if '(lambda (x) (wcmatch x "None"))
(vlax-safearray->list
(vlax-variant-value
(vla-GetCanonicalMediaNames ModelLayout)
)
)
)
)
(start_list "printerlist")
(mapcar 'add_list PrinterList)
(end_list)
(start_list "papersizelist")
(mapcar 'add_list PaperSizeList)
(end_list)
Thanks,