;;;Special auto Wblock for Camp Lejeune, HP area drawings. ;;; ;;;> Author: Henry C. Francis ;;;> 425 N. Ashe St. ;;;> Southern Pines, NC 28387 ;;;> http://paracadd.com ;;;> All rights reserved. ;;; ;;;> COPYRIGHT: 4-15-94 ;;;> EDITED: 08-18-1999 ;;; (defun c:hpwb ( / ) (setq fnam (getvar"dwgname")) (setq fpfx (getvar"dwgprefix")) (setq fdir1 (substr fnam 4 6)) (setq fdir2 (substr fpfx 4 6)) (setq fnpf1 (substr fnam 11 5)) (setq fnpf2 (substr fnam 1 5)) (if (and (or(eq fdir1 "CL9406") (eq fdir2 "CL9406")) (or(eq fnpf1 "CSVPL")(eq fnpf1 "CSTPL") (eq fnpf2 "CSVPL")(eq fnpf2 "CSTPL")) );and (progn (setq flen (strlen fnam)) (setq wbnam (strcat "xr" (substr fnam (- flen 2) 3))) (setq wbss (ssget "X" '((-4 . "") (-4 . "NOT>") ) );ssget );setq (if (findfile (strcat wbnam ".dwg")) (command ".wblock" wbnam "y" "" "0,0" wbss "") (command ".wblock" wbnam "" "0,0" wbss "") );if (if wbss (command ".oops" "") );if );progn );if );defun