DEFUN C:CIRDIM
(SETQ CLAY  (GETVAR "CLAYER"))
(COMMAND "SETVAR" "HIGHLIGHT" "1")
(IF (= (SETQ E (GETREAL "\n<Extension>/Length:")) NIL)
       (SETQ E 1))
(COMMAND "SELECT" "AU" "\\")
(SETQ SA (SSGET "P" ))
(SETQ N (SSLENGTH SA))
(SETQ I 0)
(REPEAT N
  (SETQ NA (ENTGET (SSNAME SA I)))
  (SETQ I (+ 1 I))
  (SETQ NB (ASSOC 0 NA))
  (IF (= "CIRCLE" (CDR NB))
      (PROGN
          (SETQ NP1 (ASSOC 40 NA))
          (SETQ R (CDR NP1))
          (SETQ NP2 (ASSOC 10 NA))
          (SETQ CEN (CDR NP2))
          (SETQ CP1 (LIST (CAR CEN) (+ (CADR CEN) R E)))
          (SETQ CP2 (LIST (CAR CEN) (- (CADR CEN) R E)))
          (SETQ CP3 (LIST (- (CAR CEN) R E) (CADR CEN)))
          (SETQ CP4 (LIST (+ (CAR CEN) R E) (CADR CEN)))
          (COMMAND "LAYER" "SET" "CENTER" "")
          (COMMAND "LINE" CP1 CP2 "")
          (COMMAND "LINE" CP3 CP4 "")
          (COMMAND "SETVAR" "HIGHLIGHT" "1")
          (COMMAND "LAYER" "S" clay "")
       )
 )
)
