Professional Documents
Culture Documents
Defun Putpagesetup
Defun Putpagesetup
(defun C:IMP_PAGESETUP ( / LAYS LAYOUTLIST1 CURTAB PCFGS) (vl-load-com) (setq LAYS (vlax-get-property (vlax-get-property (vlax-Get-Acad-object) 'ActiveDocument) 'Layouts)) (setq LAYOUTLIST1 '()) (vlax-for LAY LAYS (setq LAYOUTLIST1 (append LAYOUTLIST1 (list (vla-get-name LAY))))) (if (member "model" LAYOUTLIST1) (progn (setq CURTAB (getvar "ctab")) (setvar "ctab" "Model") (command "-psetupin" "acadp.dwt" "hp 4050 portrait monochrome") (setq document (vla-get-activedocument (vlax-get-acad-object))) (setq PCFGS (vla-get-plotconfigurations document))
(putpagesetup document "Model" "hp 4050 portrait monochrome") (setvar "ctab" CURTAB);<-- Remove if you want to leave it on Layout1 );end progn (princ "\nModel not found!") );end if );end defun