Message 1 of 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all,
We have been using the following lsp to remove and replace page setups for our company. The lsp loads fine (via acaddoc.lsp) and works well in ACAD 2014. How ever the same is not working for ACAD 2016.
The plotname.lsp and other custom lisp's weren't loading via acaddoc.lsp in 2016 and I placed them under Enterprise CUIx to get them all working execpt the plotname.lsp
Is there anything obvious that's wrong in our setup of plotname.lsp? See Below. Also attaching acaddoc.lsp for reference. (see attachemtment).
Any help would be much appreciated.
Regards,
M
;;;Checks & replaces page setups (defun removeps () ;;;remove existing page setup names. (vl-load-com) (vlax-for item (vla-get-plotconfigurations (vla-get-activedocument (vlax-get-acad-object))) (vl-catch-all-apply 'vla-delete (list item))) );end removeps (defun plotname () ;;;create page setup name list. (setq pltr '( "1.0 A1 1 TO 1 PRINTING" "1.1 A1 1 TO 1 CAD TO PDF" "2.0 A3 1 TO 1 PRINTING" "2.0a A3 1 TO 1 PRINTING 50%" "2.1 A3 1 TO 1 CAD TO PDF" "2.2 A3 1 TO 2 PRINTING" "2.3 A3 1 TO 2 CAD TO PDF" "2.4 A3 1 TO 2 RiCOH" "2.5 A3 1 TO 1 RiCOH" "2.5a A3 1 TO 1 RiCOH 50%" "3.0 A4 1 TO 1 PRINTING" "3.1 A4 1 TO 1 RiCOH" "A4 MODEL SPACE PRINTING" "A3 MODEL SPACE PRINTING")) (if (not (= (substr (strcase (getvar "dwgname")) 1 6) "Y2 TEMPLATECURRENT")) (removeps) );endif (setvar "cmdecho" 0) ;;;insert page setup names from master dwg file. (mapcar '(lambda (p) (if (not (member (cons 3 p) (dictsearch (namedobjdict) "ACAD_PLOTSETTINGS"))) (command "psetupin" ;|(strcat|; "Y2 TEMPLATECURRENT" p) );endif );endl pltr );endmc (setq CurrenTab (getvar "CTAB")) );end plotname ;;; Run function (plotname) ;;; Message for completed operation. (prompt "*Loaded Y2 Page Setups*\n")
Solved! Go to Solution.