(defun c:BLTIN ()
(COMMAND "SETVAR" "CMDECHO" 0)
(SETQ NY (GETVAR "CLAYER"))
(setq BLSET (findfile "c:/acad/ACAD/SUPPORT/BL.SET"))
(IF (= BLSET NIL)
    (PROGN
       (SETQ TEST 1)
       (PROMPT "\nPLEASE SETTING LAYER SKT-BLT :" )
       (SETQ FC (OPEN "c:/acad/ACAD/SUPPORT/BL.SET" "w"))
       (setq BLCNT (GETSTRING T"\nSETTING SKT-BLT LAYER OF CONTNIUE LINE/<DRAW>:"))
       (IF (= BLCNT "")
              (WRITE-LINE "DRAW" FC)
              (WRITE-LINE BLCNT FC)
       )
       (setq BLCEN (GETSTRING T"\nSETTING SKT-BLT LAYER OF CENTER LINE/<CENTER>:"))
       (IF (= BLCEN "")
              (WRITE-LINE "CENTER" FC)
              (WRITE-LINE BLCEN FC)
       )
       (setq BLHID (GETSTRING T"\nSETTING SKT-BLT LAYER OF HIDDEN LINE/<HIDDEN>:"))
       (IF (= BLHID "")
              (WRITE-LINE "HIDDEN" FC)
              (WRITE-LINE BLHID FC)
       )
       (setq BLDIM (GETSTRING T"\nSETTING SKT-BLT LAYER OF DIMESION /<TEXT>:"))
       (IF (= BLDIM "")
              (WRITE-LINE "TEXT" FC)
              (WRITE-LINE BLDIM FC)
       )
       (setq BLTXT (GETSTRING T"\nSETTING SKT-BLT LAYER OF TEXT /<TEXT>:"))
       (IF (= BLTXT "")
              (WRITE-LINE "TEXT" FC)
              (WRITE-LINE BLTXT FC)
       )
       (CLOSE FC)
    )
)

(IF (/= BLSET NIL)
    (PROGN
       (SETQ FC (OPEN "c:/acad/ACAD/SUPPORT/BL.SET" "r"))
       (SETQ BLCNT (READ-LINE FC))
       (SETQ BLCEN (READ-LINE FC))
       (SETQ BLHID (READ-LINE FC))
       (SETQ BLDIM (READ-LINE FC))
       (SETQ BLTXT (READ-LINE FC))
       (IF (OR (= BLCNT "") (= BLCEN "") (= BLHID "") (= BLDIM "") (= BLTXT "")
               (= BLCNT NIL) (= BLCEN NIL) (= BLHID NIL) (= BLDIM NIL) (= BLTXT NIL))
           (CLOSE FC)
       )
       (IF (OR (= BLCNT "") (= BLCEN "") (= BLHID "") (= BLDIM "") (= BLTXT "")
               (= BLCNT NIL) (= BLCEN NIL) (= BLHID NIL) (= BLDIM NIL) (= BLTXT NIL))
           (PROGN
              (PROMPT "\nPLEASE SETTING LAYER RETURN PIN :" )
              (SETQ FC (OPEN "c:/acad/ACAD/SUPPORT/BL.SET" "w"))
              (setq BLCNT (GETSTRING T"\nSETTING SKT-BLT LAYER OF CONTNIUE LINE/<DRAW>:"))
              (IF (= BLCNT "")
                  (WRITE-LINE "DRAW" FC)
                  (WRITE-LINE BLCNT FC)
              )
              (setq BLCEN (GETSTRING T"\nSETTING SKT-BLT LAYER OF CENTER LINE/<CENTER>:"))
              (IF (= BLCEN "")
                  (WRITE-LINE "CENTER" FC)
                  (WRITE-LINE BLCEN FC)
              )
              (setq BLHID (GETSTRING T"\nSETTING SKT-BLT LAYER OF HIDDEN LINE/<HIDDEN>:"))
              (IF (= BLHID "")
                  (WRITE-LINE "HIDDEN" FC)
                  (WRITE-LINE BLHID FC)
              )
              (setq BLDIM (GETSTRING T"\nSETTING SKT-BLT LAYER OF DIMESION/<TEXT>:"))
              (IF (= BLDIM "")
                  (WRITE-LINE "TEXT" FC)
                  (WRITE-LINE BLDIM FC)
              )
              (setq BLTXT (GETSTRING T"\nSETTING SKT-BLT LAYER OF TEXT /<TEXT>:"))
              (IF (= BLTXT "")
                  (WRITE-LINE "TEXT" FC)
                  (WRITE-LINE BLTXT FC)
              )
           (CLOSE FC)
           )
       )
       (SETQ FC (OPEN "c:/acad/ACAD/SUPPORT/BL.SET" "r"))
       (SETQ BLCNT (READ-LINE FC))
       (SETQ BLCEN (READ-LINE FC))
       (SETQ BLHID (READ-LINE FC))
       (SETQ BLDIM (READ-LINE FC))
       (SETQ BLTXT (READ-LINE FC))
       (CLOSE FC)
       (PROMPT "\nR.P CONTINUE OF LAYER IS:" )(PROMPT BLCNT)(TERPRI)
       (PROMPT "\nR.P CENTER OF LAYER IS:" ) (PROMPT BLCEN)(TERPRI)
       (PROMPT "\nR.P HIDDEN OF LAYER IS:" ) (PROMPT BLHID)(TERPRI)
       (PROMPT "\nR.P DIMENSION OF LAYER IS:" ) (PROMPT BLDIM)(TERPRI)
       (PROMPT "\nR.P TEXT   OF LAYER IS:" ) (PROMPT BLTXT)(TERPRI)
    )
)

(SETQ ANS (strcase (GETSTRING "\nDO YOU WANT TO CHANGE LAST SETTING <Y/N> N:")))
(IF (= ANS "Y")
    (PROGN
       (PROMPT "\nPLEASE SETTING LAYER:" )
       (SETQ FC (OPEN "c:/acad/ACAD/SUPPORT/BL.SET" "w"))
       (PROMPT "\nR.P CONTINUE OF LAYER IS:" )(PROMPT BLCNT)(TERPRI)
       (setq BLCNT (GETSTRING T"\nSETTING SKT-BLT LAYER OF CONTNIUE LINE:"))
       (IF (= BLCNT "")
              (WRITE-LINE "DRAW" FC)
              (WRITE-LINE BLCNT FC)
       )
       (PROMPT "\nR.P CENTER OF LAYER IS:" )(PROMPT BLCEN)(TERPRI)
       (setq BLCEN (GETSTRING T"\nSETTING SKT-BLT LAYER OF CENTER LINE:"))
       (IF (= BLCEN "")
              (WRITE-LINE "CENTER" FC)
              (WRITE-LINE BLCEN FC)
       )
       (PROMPT "\nR.P HIDDEN OF LAYER IS:" )(PROMPT BLHID)(TERPRI)
       (setq BLHID (GETSTRING T"\nSETTING SKT-BLT LAYER OF HIDDEN LINE:"))
       (IF (= BLHID "")
              (WRITE-LINE "HIDDEN" FC)
              (WRITE-LINE BLHID FC)
       )
       (PROMPT "\nR.P DIMESION OF LAYER IS:" )(PROMPT BLDIM)(TERPRI)
       (setq BLDIM (GETSTRING T"\nSETTING SKT-BLT LAYER OF DIMESION/<TEXT>:"))
       (IF (= BLDIM "")
              (WRITE-LINE "TEXT" FC)
              (WRITE-LINE BLDIM FC)
       )
       (PROMPT "\nR.P TEXT OF LAYER IS:" )(PROMPT BLTXT)(TERPRI)
       (setq BLTXT (GETSTRING T"\nSETTING SKT-BLT LAYER OF TEXT /<TEXT>:"))
       (IF (= BLTXT "")
              (WRITE-LINE "TEXT" FC)
              (WRITE-LINE BLTXT FC)
       )
       (CLOSE FC)
       (SETQ FC (OPEN "c:/acad/ACAD/SUPPORT/BL.SET" "r"))
       (SETQ BLCNT (READ-LINE FC))
       (SETQ BLCEN (READ-LINE FC))
       (SETQ BLHID (READ-LINE FC))
       (SETQ BLDIM (READ-LINE FC))
       (SETQ BLTXT (READ-LINE FC))
       (CLOSE FC)
       (PROMPT "\nR.P CONTINUE OF LAYER NOW IS:" )(PROMPT BLCNT)(TERPRI)
       (PROMPT "\nR.P CENTER   OF LAYER NOW IS:" ) (PROMPT BLCEN)(TERPRI)
       (PROMPT "\nR.P HIDDEN   OF LAYER NOW IS:" ) (PROMPT BLHID)(TERPRI)
       (PROMPT "\nR.P DIM      OF LAYER NOW IS:" ) (PROMPT BLDIM)(TERPRI)
       (PROMPT "\nR.P TEXT     OF LAYER NOW  IS:" ) (PROMPT BLTXT)(TERPRI)
  )
)


;THE POINT IS FIST COUNTER Y THEN X
(MENUCMD "S=BLTIN")
(SETQ D (GETREAL"\nSelect dim:"))
(SETQ D (ATOF (RTOS D 2 3)))
(GRAPHSCR) (TERPRI)                                     ;GRAPHICS MODE
;(COMMAND "UJ" "")
;(SETQ D 16)
;(SETQ ANS "Y")
(IF  (= (SETQ ANS1 (GETSTRING "\nDOU YOU WANT TO P2 LINE:<Y>")) "")
     (SETQ ANS1 "Y"))
(SETQ ANS1 (STRCASE ANS1))
(IF (= D 0.118)
    (PROGN
       (SETQ D2 0.129)
       (SETQ BD1 0.196)
       (SETQ BD2 0.236)
       (SETQ H1  0.118)
       (SETQ H2  0.157)
       (SETQ SP 0.009)
       (SETQ SPP 0.019)
       (SETQ TTH 0.098)
    )
)
(IF (= D 0.157)
    (PROGN
       (SETQ D2 0.177)
       (SETQ BD1 0.255)
       (SETQ BD2 0.295)
       (SETQ H1  0.157)
       (SETQ H2  0.196)
       (SETQ SP 0.013)
       (SETQ SPP 0.027)
       (SETQ TTH 0.098)
    )
)
(IF (= D 0.196)
    (PROGN
       (SETQ D2 0.216)
       (SETQ BD1 0.314)
       (SETQ BD2 0.354)
       (SETQ H1  0.196)
       (SETQ H2  0.255)
       (SETQ SP 0.015)
       (SETQ SPP 0.039)
       (SETQ TTH 0.106)
    )
)
(IF (= D 0.236)
    (PROGN
       (SETQ D2 0.255)
       (SETQ BD1 0.393)
       (SETQ BD2 0.433)
       (SETQ H1  0.236)
       (SETQ H2  0.295)
       (SETQ SP 0.019)
       (SETQ SPP 0.039)
       (SETQ TTH 0.106)
    )
)
(IF (= D 0.314)
    (PROGN
       (SETQ D2 0.346)
       (SETQ BD1 0.511)
       (SETQ BD2 0.551)
       (SETQ H1  0.314)
       (SETQ H2  0.374)
       (SETQ SP 0.024)
       (SETQ SPP 0.039)
       (SETQ TTH 0.118)
    )
)
(IF (= D 0.393)
    (PROGN
       (SETQ D2 0.433)
       (SETQ BD1 0.629)
       (SETQ BD2 0.688)
       (SETQ H1  0.393)
       (SETQ H2  0.452)
       (SETQ SP 0.029)
       (SETQ SPP 0.039)
       (SETQ TTH 0.118)
    )
)
(IF (= D 0.472)
    (PROGN
       (SETQ D2 0.511)
       (SETQ BD1 0.708)
       (SETQ BD2 0.787)
       (SETQ H1  0.472)
       (SETQ H2  0.531)
       (SETQ SP 0.034)
       (SETQ SPP 0.039)
       (SETQ TTH 0.118)
    )
)
(IF (= D 0.551)
    (PROGN
       (SETQ D2 0.610)
       (SETQ BD1 0.826)
       (SETQ BD2 0.905)
       (SETQ H1  0.551)
       (SETQ H2  0.610)
       (SETQ SP 0.039)
       (SETQ SPP 0.039)
       (SETQ TTH 0.118)
    )
)
(IF (= D 0.629)
    (PROGN
       (SETQ D2 0.708)
       (SETQ BD1 0.944)
       (SETQ BD2 1.023)
       (SETQ H1  0.629)
       (SETQ H2  0.688)
       (SETQ SP 0.039)
       (SETQ SPP 0.039)
       (SETQ TTH 0.118)
    )
)
(IF (= D 0.787)
    (PROGN
       (SETQ D2 0.866)
       (SETQ BD1 1.102)
       (SETQ BD2 1.181)
       (SETQ H1  0.787)
       (SETQ H2  0.846)
       (SETQ SP 0.049)
       (SETQ SPP 0.039)
       (SETQ TTH 0.118)
    )
)
(IF (= D 0.866)
    (PROGN
       (SETQ D2 0.944)
       (SETQ BD1 1.181)
       (SETQ BD2 1.259)
       (SETQ H1  0.866)
       (SETQ H2  0.925)
       (SETQ SP 0.049)
       (SETQ SPP 0.039)
       (SETQ TTH 0.118)
    )
)
(IF (= D 0.944)
    (PROGN
       (SETQ D2 1.023)
       (SETQ BD1 1.299)
       (SETQ BD2 1.378)
       (SETQ H1  0.944)
       (SETQ H2  1.003)
       (SETQ SP 0.049)
       (SETQ SPP 0.039)
       (SETQ TTH 0.118)
    )
)
(IF (= D 1.181)
    (PROGN
       (SETQ D2 1.299)
       (SETQ BD1 1.653)
       (SETQ BD2 1.771)
       (SETQ H1  1.181)
       (SETQ H2  1.259)
       (SETQ SP 0.068)
       (SETQ SPP 0.039)
       (SETQ TTH 0.118)
    )
)
(IF (= D 1.417)
    (PROGN
       (SETQ D2 1.535)
       (SETQ BD1 1.968)
       (SETQ BD2 2.125)
       (SETQ H1  1.417)
       (SETQ H2  1.496)
       (SETQ SP 0.068)
       (SETQ SPP 0.039)
       (SETQ TTH 0.118)
    )
)
;(SETQ P1 (LIST -5.31 3.64))
;(SETQ P2 (LIST -5.31 133.64))
(SETQ P1 (GETPOINT "\nP1:"))
(SETQ P2 (GETPOINT P1 "\nP2:"))
(SETQ AG1 (ANGLE P1 P2))
(SETQ AG2 (* PI 0.5))
(SETQ LSE (DISTANCE P1 P2)) ;DIST FOR P1 P2
(SETQ CR SP)
(SETQ DR1 (POLAR P1 (+ AG1 AG2) (/ BD2 2.0)))
(SETQ DR2 (POLAR P1 (- AG1 AG2) (/ BD2 2.0)))
(SETQ DR3 (POLAR (POLAR P1 AG1 H2) (+ AG1 AG2) (/ BD2 2.0)))
(SETQ DR4 (POLAR (POLAR P1 AG1 H2) (- AG1 AG2) (/ BD2 2.0)))
;(SETQ DR5 (POLAR (POLAR P1 AG1 (- H2 H1)) (+ AG1 AG2) (- (/ BD1 2.0) SP)))
;(SETQ DR6 (POLAR (POLAR P1 AG1 (- H2 H1)) (- AG1 AG2) (- (/ BD1 2.0) SP)))
(SETQ DR5 (POLAR (POLAR P1 AG1 0.039) (+ AG1 AG2) (- (/ BD1 2.0) SP)))
(SETQ DR6 (POLAR (POLAR P1 AG1 0.039) (- AG1 AG2) (- (/ BD1 2.0) SP)))
(SETQ DR7 (POLAR (POLAR P1 AG1 (+ (- H2 H1) SP)) (+ AG1 AG2) (/ BD1 2.0)))
(SETQ DR8 (POLAR (POLAR P1 AG1 (+ (- H2 H1) SP)) (- AG1 AG2) (/ BD1 2.0)))
(SETQ DR9 (POLAR (POLAR P1 AG1 H2) (+ AG1 AG2) (/ BD1 2.0)))
(SETQ DR10 (POLAR (POLAR P1 AG1 H2) (- AG1 AG2) (/ BD1 2.0)))
(SETQ DR11 (POLAR (POLAR P1 AG1 H2) (+ AG1 AG2) (+ (/ D 2.0) SPP)))
(SETQ DR12 (POLAR (POLAR P1 AG1 H2) (- AG1 AG2) (+ (/ D 2.0) SPP)))
(SETQ DR13 (POLAR (POLAR P1 AG1 LSE) (+ AG1 AG2) (+ (/ D 2.0) SPP)))
(SETQ DR14 (POLAR (POLAR P1 AG1 LSE) (- AG1 AG2) (+ (/ D 2.0) SPP)))
(SETQ DR15-1 (POLAR (POLAR P1 AG1 H2) (+ AG1 AG2) (- (/ D 2.0) SP)))
(SETQ DR16-1 (POLAR (POLAR P1 AG1 H2) (- AG1 AG2) (- (/ D 2.0) SP)))
(SETQ DR15 (POLAR (POLAR P1 AG1 H2) (+ AG1 AG2) (/ D 2.0)))
(SETQ DR16 (POLAR (POLAR P1 AG1 H2) (- AG1 AG2) (/ D 2.0)))
(SETQ DR17 (POLAR (POLAR P1 AG1 (- (+ LSE (* D 2)) SP)) (+ AG1 AG2) (/ D 2.0)))
(SETQ DR18 (POLAR (POLAR P1 AG1 (- (+ LSE (* D 2)) SP)) (- AG1 AG2) (/ D 2.0)))
(SETQ DR19 (POLAR (POLAR P1 AG1 (+ LSE (* D 2))) (+ AG1 AG2) (- (/ D 2.0) SP)))
(SETQ DR20 (POLAR (POLAR P1 AG1 (+ LSE (* D 2))) (- AG1 AG2) (- (/ D 2.0) SP)))

(SETQ DR21 (POLAR (POLAR P1 AG1 (- LSE (* D 1.5))) (+ AG1 AG2) (/ D 2.0)))
(SETQ DR22 (POLAR (POLAR P1 AG1 (- LSE (* D 1.5))) (- AG1 AG2) (/ D 2.0)))
(SETQ DR23 (POLAR (POLAR P1 AG1 (- LSE (* D 1.5))) (+ AG1 AG2) (- (/ D 2.0) SP)))
(SETQ DR24 (POLAR (POLAR P1 AG1 (- LSE (* D 1.5))) (- AG1 AG2) (- (/ D 2.0) SP)))

(SETQ DR25 (POLAR (POLAR P1 AG1 (- LSE (* D 1.5) SP)) (+ AG1 AG2) (/ D 2.0)))
(SETQ DR26 (POLAR (POLAR P1 AG1 (- LSE (* D 1.5) SP)) (- AG1 AG2) (/ D 2.0)))

(SETQ SINT (POLAR (POLAR P1 AG1 (+ LSE (* D 2))) AG1 (/ D 2.0)))
(SETQ DRINT1 (POLAR SINT (+ AG1 (DTR 120)) 0.118))
(SETQ DRINT2 (POLAR SINT (- AG1 (DTR 120)) 0.118))

(SETQ INT1 (INTERS SINT DRINT1 DR19 DR23 NIL))
(SETQ INT2 (INTERS SINT DRINT2 DR20 DR24 NIL))

(SETQ DR27 (POLAR (POLAR P1 AG1 (+ LSE (* D 1.5))) (+ AG1 AG2) (- (/ D 2.0) SP)))
(SETQ DR28 (POLAR (POLAR P1 AG1 (+ LSE (* D 1.5))) (- AG1 AG2) (- (/ D 2.0) SP)))
(SETQ DR29 (POLAR (POLAR P1 AG1 (- (+ LSE (* D 1.5)) SP)) (+ AG1 AG2) (/ D 2.0)))
(SETQ DR30 (POLAR (POLAR P1 AG1 (- (+ LSE (* D 1.5)) SP)) (- AG1 AG2) (/ D 2.0)))


(IF (= ANS1 "Y")
    (PROGN
       (SETQ P2N (POLAR P2 (+ AG1 AG2) 0.157))
       (COMMAND "SELECT" P2N "")
       (SETQ SA (SSGET "P" ))
       (SETQ N (SSLENGTH SA))
       (SETQ I 0)
       (SETQ NB (ASSOC 0 NA))
       (SETQ NA (ENTGET (SSNAME SA I)))
       (SETQ NP11 (ASSOC 10 NA))
       (SETQ NP12 (ASSOC 11 NA))
       (SETQ LA1 (ASSOC 8 NA))
       (SETQ LA11 (CDR LA1))
       (SETQ NP1 (CDR NP11))
       (SETQ NP2 (CDR NP12))
       (SETQ TR1 NP1)
       (SETQ TR2 NP2)
       (COMMAND "ERASE" P2N "")
       (IF (> (CAR TR1) (CAR TR2))
          (PROGN
             (SETQ TR1 NP2)
             (SETQ TR2 NP1)
          )
       )
    )
)
(IF (= ANS1 "Y")
    (COMMAND "LAYER" "SET" BLCNT "")
    (COMMAND "LAYER" "SET" BLHID "")
)
(COMMAND "LINE" DR1 DR3 DR4 DR2 "")
(COMMAND "LINE" DR5 DR7 "")
(COMMAND "LINE" DR6 DR8 "")
(COMMAND "LINE" DR5 DR6 "")
(COMMAND "LINE" DR7 DR8 "")
(COMMAND "LINE" DR7 DR9 "")
(COMMAND "LINE" DR8 DR10 "")
(COMMAND "LINE" DR11 DR13 "")
(COMMAND "LINE" DR12 DR14 "")
(COMMAND "LINE" DR15 DR17 "")
(COMMAND "LINE" DR16 DR18 "")
(COMMAND "LINE" DR17 DR19 "")
(COMMAND "LINE" DR18 DR20 "")
(COMMAND "LINE" DR19 DR20 "")
(IF (>= (DISTANCE DR15-1 DR27) (* D 3))
    (PROGN
      (COMMAND "LINE" DR25 DR23 INT1 "")
      (COMMAND "LINE" DR26 DR24 INT2 "")
      (COMMAND "LINE" DR21 DR22 "")
    )
)
(IF (<= (DISTANCE DR15-1 DR27) (* D 3))
    (PROGN
      (COMMAND "LINE" DR15-1 INT1 "")
      (COMMAND "LINE" DR16-1 INT2 "")
    )
)
(COMMAND "LINE" SINT INT1 "")
(COMMAND "LINE" SINT INT2 "")
(COMMAND "LINE" INT1 INT2 "")
(COMMAND "LINE" DR27 DR29 "")
(COMMAND "LINE" DR28 DR30 "")
(COMMAND "LINE" DR27 DR28 "")
(COMMAND "LINE" DR29 DR30 "")
(COMMAND "LINE" DR17 DR18 "")

(IF (= ANS1 "Y")
    (PROGN
       (COMMAND "LAYER" "SET" LA11 "")
       (COMMAND "LINE" TR1 (POLAR (POLAR P1 AG1 LSE) (+ AG1 AG2) (/ D 2.0)) "")
       (COMMAND "LINE" TR2 (POLAR (POLAR P1 AG1 LSE) (- AG1 AG2) (/ D 2.0)) "")
    )
)


(COMMAND "LAYER" "SET" BLCEN "")
(COMMAND "LINE" (POLAR P1 AG1 -0.039) (POLAR P1 AG1 (+ 0.039 LSE (* D 2.5))) "")


;HERE IS TEXT

(SETQ NUM (GETSTRING T "\nHOW MANY BLT-SKT ?"))
(IF (OR (= NUM "") (= NUM "1"))
   (SETQ BLDIMT " ")
   (SETQ BLDIMT (STRCAT "(" NUM "X" ")"))
)
(IF (<= D 8)
    (SETQ TT2 (GETPOINT"\nWHERE IS TEXT POINT:"))
    (SETQ TT2 (POLAR (POLAR P1 AG1 (+ H1 0.078)) (- AG1 AG2) -0.039))
)
(IF (<  D 10)
    (SETQ TT5 (POLAR (POLAR P1 AG1 (- LSE 0.452))  (+ AG1 AG2) 0.102))
    (SETQ TT5 (POLAR (POLAR P1 AG1 (- LSE 0.452))  (+ AG1 AG2) 0.157))
)
(SETQ LONG1 (DISTANCE DR15-1 DR27))
(SETQ LONG1 (FIX LONG1))
(SETQ LONG1 (RTOS LONG1 2 0))
(SETQ LP (GETVAR "LUPREC"))   ;LP DIGITAL
(SETQ D1 (RTOS D 2 LP))
(SETQ D11 (FIX (ATOF D1)))
(SETQ RET (- D D11))
(IF (OR (= RET 0) (= RET 0.0) (= RET 0.00))
    (PROGN
       (SETQ SR (- (STRLEN D1) LP 1))
       (SETQ D1 (SUBSTR D1 1 SR))
    )
)
(SETQ DIST1 (STRCAT "M" D1 "X" LONG1 "L" BLDIMT))

(COMMAND "LAYER" "SET" BLTXT "")
(COMMAND "TEXT" TT2 TTH (RTD AG1) DIST1)
(COMMAND "LAYER" "SET" NY "")
)
