一楼程序的修改:- (defun c:mj ()
- (setvar "cmdecho" 0)
- (SETQ CSTY (GETVAR "CMLSTYLE"))
- (SETQ TXTH (TBLNEXT "STYLE" T))
- (WHILE (/= (CDR (ASSOC 2 TXTH)) CSTY) (SETQ TXTH (TBLNEXT "STYLE" nil)))
- (SETQ TXTH (CDR (ASSOC 40 TXTH)))
- (while (setq pt (getpoint "\n 选取点:"))
- (setvar "cecolor" "1")
- (command "bpoly" pt "")
- (if (setq en (entlast)) (progn
- (command "area" "o" en)
- (setq aa (getvar "area"))
- (redraw en 3)
- (IF (= TXTH 1)
- (COMMAND "TEXT" PT 0 (RTOS AA 2 3))
- (command "text" pt 3 0 (rtos aa 2 3))
- )
- (entdel en)
- ))
- (setvar "cecolor" "bylayer")
- )
- (prin1)
- )
|