Ok, this is what I have now
;;
;;TITLE SHEET INSERTION ROUTINE
;;BY ANDY HUDSON
;;
;;ADAPTED FORM AN ORIGINAL LISP BY RONJOP
;;UPLOADED AT http://theswamp.org/phpBB2/viewtopic.php?p=48413#48413
;;
(defun C:rybka (/ cmd att clay p)
(if (tblsearch "layer" "TITLE")
(command "-layer" "thaw" "TITLE" "on" "TSHEET" ""))
;;
(setq cmd (getvar 'cmdecho)
att (getvar 'attdia)
clay (getvar 'clayer))
;;
(setvar 'tilemode 0)
(setvar 'cmdecho 0)
(setvar 'attdia 1)
(initget 0 "1 2 3 4 5")
(setq P
(cond
((getkword
"\nEnter Titleblock Size: (1)-A0 (2)-A1 (3)-A1B (4)-A3 (5)-A4 <<Hit Enter for A1>>: "
)
)
("2")
)
)
;;A0 SHEET
(if (= P "1")
(progn (command ".-layer" "m" "TITLE" "" ".-INSERT" "A0_SHEET.dwg" "0,0" "" "" "")))
;;A1 SHEET
(if (= P "2")
(progn(command ".-layer" "m" "TITLE" "" ".-INSERT" "A1_SHEET.dwg" "0,0" "" "" "")))
;;A1B_SHEET
(if (= P "3")
(progn (command ".-layer" "m" "TITLE" "" ".-INSERT" "A1-B_SHEET.dwg" "0,0" "" "" "")))
;;A3 SHEET
(if (= P "4")
(progn (command ".-layer" "m" "TITLE" "" ".-INSERT" "A3_SHEET.dwg" "0,0" "" "" "")))
;;;A4 SHEET
(if (= P "5")
(progn (command ".-layer" "m" "TITLE" "" ".-INSERT" "A4_SHEET.dwg" "0,0" "" "" "")))
;;;ZOOM EXTENTS
(command ".zoom" "extents")
;;;RESET USER VARIABLES
(setvar "cmdecho" cmd)
(setvar "attdia" att)
(setvar "clayer" clay)
;;;CLEAN EXIT
(princ)
)
next question
to alter the attribute information for each revision, I need to find out the block name of which ever sheet is installed and pass this information to the lisp routine to allow me to change the attributes.
Ideas?