(defun c:TT ()(Setvar "cmdecho" 0);1=arch 2=Eng 4=MM 6=Meters
;(if (=(getvar "userr3")0)(progn(Alert "\nYou Need to run DDS\n")(exit)))
(if (=(getvar "userr3")0)(progn (load "DH-dds2") (c:dds2) ))
(if (= (getvar "tilemode") 1) ;if your in Model Space
(progn
(cond
;((and (= (getvar "USERR3") 0))(progn (command "userr3" "1")))
((and (= (getvar "USERI1") 0)) ; imperial
(progn
(command "ltscale" "1")
(command "setvar" "psltscale" "1")
(command "textsize" ddsth)
(command "DIMSCALE" "1")
(command "DimAssoc" "1")
(if (=(getvar "userr5")1)(progn (command "insunits" "1")))
(if (=(getvar "userr5")2)(progn (command "insunits" "1")))
(if (=(getvar "userr5")4)(progn (command "insunits" "4")))
(if (=(getvar "userr5")6)(progn (command "insunits" "4"))); Added for 2006 insertion blocks
))
((and (= (getvar "USERI1") 2)) ; metric Milli
(progn
(command "ltscale" "25.4")
(command "setvar" "psltscale" "1")
(command "textsize" "3")
(command "DimAssoc" "1")
(command "dimscale" "1")))
);end first cond
(command "tilemode" "0" "DimAssoc" "1" )(setvar "ucsfollow" 1) ; Switch to Paper Space
);end first progn
(progn
(cond
((/= (getvar "USERR2") 0)(command "textsize"(getvar "USERR2") "dimscale"(getvar "USERR4")))
((and (= (getvar "USERR1") 0))(progn (command "userr1" "1"))))
(command "ltscale" (getvar "USERR1")"dimlfac" "1" "tilemode" "1" "DimAssoc" "1")(setvar "ucsfollow" 1)
(if (=(getvar "userr5")2)(progn (command "insunits" "1")))
(if (=(getvar "userr5")4)(progn (command "insunits" "4")))
(if (=(getvar "userr5")6)(progn (command "insunits" "4"))); Switch to Model Space
);end second cond
)(Setvar "cmdecho" 1)(princ))