Try:
Code:
(defun c:T-profile ( / osmode pt1 CL SH T1 T2 pt2 pt3 pt4 pt5 pt6 pt7 pt8)
(command "._layer" "_M" "SECTION" "")
(setq osmode (getvar "osmode" ))
(setvar "osmode" 0)
(Setq pt1 (getpoint "\nEnter the point: ") ;Starting point;
CL (getdist "\nEnter the Cap length: ")
SH (getdist "\nEnter the Stem Height: ")
T1 (getdist "\nEnter the Stem Thickness: T1 ")
T2 (getdist "\nEnter the Cap Thickness: T2 ")
pt2 (polar pt1 0 t1)
pt3 (polar pt2 (/ pi 2.0) (- SH T2))
pt4 (polar pt3 0 (+(/ CL 2) (-(/ T1 2))))
pt5 (polar pt4 (/ pi 2.0) T2)
pt6 (polar pt5 pi CL)
pt7 (polar pt6 (/(* pi 3)2) t2)
pt8 (polar pt7 0 (- (/ CL 2) (/ T1 2)))
)
(command "pline" pt1 pt2 pt3 pt4 pt5 pt6 pt7 pt8 pt1 "")
(setvar "osmode" osmode)
(princ)
)