你的程序问题很多,看看我改的,对比一下,找一下问题吧。
将对象设到当前层用CHPROP命令。
- (defun mj_s (/ p2)
- (setq p2 t)
- (command "area")
- (while p2
- (setq p2 (getpoint "\npickpoint:"))
- (command p2)
- )
- (command "")
- )
- (defun c:df (/ oce pm mmj mj)
- (setq oce (getvar "cmdecho"))
- (setvar "cmdecho" 0)
- (mj_s)
- (if (and (= p1 nil) (= p2 nil))
- (progn
- (setq mmj (getvar "area"))
- (setq mj (rtos (* mmj 0.0001) 2 3))
- (setq pm (getpoint "\n选择标注点:"))
- (command "text" "j" "m" pm "35" "0" mj)
- (setvar "cmdecho" oce)
- )
- )
- (prin1)
- )
|