(VMON)
;------------------------------------------------------------------------
;DIMENSION CHAMFER
;(DEFUN C:CHAF  (/ E1 E2 E3)
(DEFUN C:CHAF()
;(IF (= (TYPE F1) 'FILE ) "YES"  (STOP))
;(IF (= (TYPE F2) 'FILE ) "YES" (STOP))
  (SETQ SC (GETVAR "DIMLFAC"))
  (SETQ CA (GETVAR "LUPREC"))
  (SETVAR "ORTHOMODE" 0)
  (SETQ E1 (ENTSEL "\nSelect chamfered line:"))
  (MENUCMD "S=NUMBER")
  (SETQ E2 (GETSTRING "\nSelect number or RETURN for none:"))
  (SETVAR "CMDECHO" 1)
  (IF (= (SETQ E3 (ABS (- (CADR (CDR (ASSOC 10 (ENTGET (CAR E1)))))
                                (CADR (CDR (ASSOC 11 (ENTGET (CAR E1)))))
                             )
                        )
         )
                  (ABS (- (CAR (CDR (ASSOC 10 (ENTGET (CAR E1)))))
                                (CAR (CDR (ASSOC 11 (ENTGET (CAR E1)))))
                             )
                        )
      )
      (PROGN
       (SETQ E3 (RTOS (* E3 SC) 2 CA))
       (IF (/= E2 "")
        (COMMAND "DIM" "LEADER" "NEAR" (CADR E1) PAUSE "" (STRCAT E2 "-" "C" E3) EXIT)
        (COMMAND "DIM" "LEADER" "NEAR" (CADR E1) PAUSE "" (STRCAT "C" E3) EXIT)
       )
      )
  ) (princ)
)
