;;;Camp Lejeune 40x28 (ANSI F Size Sheet) Title Block Xref attachment function. ;;;Attach at 0,0; scale=1:1; angle=0°. ;;; ;;;> Author: Henry C. Francis ;;;> 425 N. Ashe St. ;;;> Southern Pines, NC 28387 ;;;> http://paracadd.com ;;;> All rights reserved. ;;; ;;;> COPYRIGHT: 6-30-99 ;;;> EDITED: 09-29-2005 ;;; (DEFUN cl_F_sheet (/ found_hua_sheet found_hua_fill) (SETQ OLD_ATTREQ (GETVAR "ATTREQ")) (SETVAR "ATTREQ" 0) (SETQ hua_sheet_name "gcltbx01") (SETQ hua_fill_name "cljttbat") (IF (SSGET "x" (LIST (CONS 2 hua_sheet_name))) (ALERT (STRCAT "\n Sheet Border \"" hua_sheet_name "\" already exists! ")) (IF (IF (FINDFILE (STRCAT hua_sheet_name ".dwg")) (SETQ found_hua_sheet (FINDFILE (STRCAT hua_sheet_name ".dwg"))) (IF (FINDFILE (STRCAT "..\\" hua_sheet_name ".dwg")) (SETQ found_hua_sheet (FINDFILE (STRCAT "..\\" hua_sheet_name ".dwg"))) (IF DOS_COPY ;this function is part of McNeel & Associates free DOSLIB utility v6.1 (PROGN (DOS_DRIVE "H:") (DOS_CHDIR (GETVAR "dwgprefix")) (SETQ prj810dir (GETVAR "dwgprefix")) (WHILE (WCMATCH prj810dir "*\\800*\\810*\\*\\*") (SETQ prj810dir (DOS_CHDIR "..\\"))) (IF (AND (DOS_COPY "N:/STANDARDS/800 Drawings/810 Design Drawings/GCLTBX01.dwg" prj810dir) (DOS_COPY "N:/STANDARDS/800 Drawings/810 Design Drawings/cljttbat.dwg" prj810dir) ) ;_ end of AND (PROGN (SETQ found_hua_sheet (DOS_RELATIVEPATH (GETVAR "dwgprefix") (STRCAT prj810dir "GCLTBX01.dwg"))) (SETQ found_hua_fill (DOS_RELATIVEPATH (GETVAR "dwgprefix") (STRCAT prj810dir "cljttbat.dwg"))) ) ;_ end of PROGN ) ;_ end of IF ) ;_ end of PROGN ) ;_ end of if ) ;_ end of IF ) ;_ end of IF (PROGN (IF DOS_RELATIVEPATH ;this function is part of McNeel & Associates free DOSLIB utility v6.1 (PROGN ;If this function is available the relative path will be used where possible (SETQ relblkname (DOS_RELATIVEPATH (GETVAR "dwgprefix") found_hua_sheet)) (IF relblkname (SETQ found_hua_sheet relblkname) ) ;_ end of if ) ;_ end of PROGN ) ;_ end of if (IF (EQ (GETVAR "tilemode") 1) (SETVAR "tilemode" 0) ) ;_ end of if (COMMAND "-layer" "m" hua_sheet_name "") (COMMAND "-xref" "o" hua_sheet_name "0,0" 1 1 0) ) ;_ end of progn (ALERT (STRCAT "\n Drawing file \"" hua_sheet_name "\" not found! Check the project drawing folder. ") ) ;_ end of ALERT ) ;_ end of IF ) ;_ end of if (IF (SSGET "x" (LIST (CONS 2 hua_fill_name))) (ALERT (STRCAT "\n Sheet Title Block fill-in \"" hua_fill_name "\" already exists! ")) (IF (IF (AND (OR found_hua_fill (FINDFILE (STRCAT hua_fill_name ".dwg"))) found_hua_sheet) (IF found_hua_fill T (SETQ found_hua_fill (FINDFILE (STRCAT hua_fill_name ".dwg"))) ) ;_ end of IF (SETQ found_hua_fill (FINDFILE (STRCAT "..\\" hua_fill_name ".dwg"))) ) ;_ end of IF (IF (AND found_hua_fill found_hua_sheet) (PROGN (IF (EQ (GETVAR "tilemode") 1) (SETVAR "tilemode" 0) ) ;_ end of if (COMMAND "-layer" "m" hua_fill_name "") (COMMAND ".zoom" "w" "0,0" "40,28") (COMMAND ".limits" "0,0" "40,28") (COMMAND "-insert" found_hua_fill "0,0" 1 1 0) (COMMAND ".ddatte" "l") ) ;_ end of progn ) ;_ end of IF ) ;_ end of IF ) ;_ end of if (SETVAR "ATTREQ" OLD_ATTREQ) (COND ((AND found_hua_sheet found_hua_fill) (PRINC)) (found_hua_fill (ALERT (STRCAT "\nSheet Border Drawing file\n\"" (STRCASE hua_sheet_name) ".DWG\" not found!\nAutoCAD support file search path should include \"H:\\Util\\\". " ) ;_ end of STRCAT ) ;_ end of ALERT ) (found_hua_sheet (ALERT (STRCAT "\nSheet Title Fill-in Drawing file\n\"" (STRCASE hua_fill_name) ".DWG\" not found!\nAutoCAD support file search path should include \"H:\\Util\\\". " ) ;_ end of STRCAT ) ;_ end of ALERT ) (T (ALERT (STRCAT "\nSheet Border and Title Fill-in Drawing files\n\"" (STRCASE hua_sheet_name) ".DWG, and " (STRCASE hua_fill_name) ".DWG\" not found!\nAutoCAD support file search path should include \"H:\\Util\\\". " ) ;_ end of STRCAT ) ;_ end of ALERT ) ) ;_ end of COND (SETQ hua_sheet_name nil) (SETQ hua_fill_name nil) (PRINC) ) ;_ end of defun ;|«Visual LISP© Format Options» (120 2 15 2 T "end of " 100 9 2 0 nil nil nil T T) ;*** DO NOT add text below the comment! ***|;