多行文字没格式应该简单
 - (defun c:testa (/ en1 en2 ent1 ent2 t1 t2)
- (setq en1 (car (entsel "\n选择对比1:"))
- en2 (car (entsel "\n选择对比2:"))
- ent1 (entget en1)
- ent2 (entget en2)
- t1 (cdr (assoc 1 ent1))
- t2 (cdr (assoc 1 ent2)
- )
- )
- (if (eq t1 "")
- (setq t1 (cdr (assoc 42 ent1)))
- )
- (if (eq t2 "")
- (setq t2 (cdr (assoc 42 ent2)))
- )
- (if (eq (type t1) 'STR)
- (setq t1 (atof t1))
- )
- (if (eq (type t2) 'STR)
- (setq t2 (atof t2))
- )
- (cond ((> t1 t2) (princ "\n先大于后"))
- ((= t1 t2) (princ "\n先等于后"))
- ((< t1 t2) (princ "\n先小于后"))
- )
- (princ)
- )
|