;;;Visual Lisp example: (defun C:Delps ( / appAcad colPgSetups docCurrent objPgSetup) (vl-load-com) (setq appAcad (vlax-get-acad-object) ;get the ACAD application object docCurrent (vla-get-ActiveDocument appAcad) ;get the current drawing ;;get the ACAD_PLOTSETTINGS dictionary colPgSetups (vla-get-PlotConfigurations docCurrent) ) ;setq ;;get each page setup in the ACAD_PLOTSETTINGS dictionary (vlax-for objPgSetup colPgSetups (princ (strcat "\nDeleting " (vla-get-name objPgSetup) "...")) (vla-delete objPgSetup) ;delete the page setup from the dictionary (vlax-release-object objPgSetup) ;release the page setup );vlax-for (princ "\n\nDone.") ;;release objects from memory (vlax-release-object colPgSetups) (vlax-release-object docCurrent) (vlax-release-object appAcad) (princ) );End of defun DelPgSetups (prompt "Type 'delps' to delete ALL named page setups")