Message 1 of 10

Not applicable
08-07-2019
12:01 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Can anyone see it?? I'v been over and over it and it all looks fine to me?
The weird thing is it works perfectly fine on one drawing which is virtually the same, but then error on the other!
(defun c:PAGE_CONFIG () (vl-load-com) (vlax-for y (vla-get-plotconfigurations (vla-get-activedocument (vlax-get-acad-object))) (if (/= "Model" (vla-get-name y)) (vla-delete y) ) ) (setq Block_Col (vla-get-blocks (vla-get-ActiveDocument (vlax-get-acad-object)))) (setq BN nil) (while (setq B (tblnext "block" (null B))) (setq BN (cons (cdr (assoc 2 B)) BN)) ) (foreach Name BN (setq blk (vl-catch-all-apply 'vla-Item (list Block_Col (strcat Name)))) ;looking through all xrefs/blocks for size (setq blk_name (vla-get-name blk)) (setq ps (cond ((wcmatch blk_name "*GRP-A0-*") "A0") ((wcmatch blk_name "*GRP-A1-*") "A1") ((wcmatch blk_name "*GRP-A2-*") "A2") ((wcmatch blk_name "*GRP-A3-*") "A3") ((wcmatch blk_name "*GRP-B1-*") "B1") ) ) ) (if (wcmatch (strcase (getvar "dwgname")) "*-CO-*") (setq psetup (strcat ps " - Colour - Full Size")) (setq psetup (strcat ps " - Mono - Full Size")) ) (command "_.psetupin" "C:/Apps/_Cad/2017_BU/BU/Templates/_CDD_MEP_PageSetUps.dwt" psetup) (foreach layout (layoutlist) (setvar "ctab" layout) (COMMAND "-PLOT" "" "" psetup "" "NO" "YES" "NO") (C:ZE) ) (princ) )
Solved! Go to Solution.