楼主:您好,你在CAD方面的造诣太深了,我虚心地向您学习!你上次告诉我的高程点旋转90度的方法,很好用,我现在已经用的很好了,同时我想在这里问您另外一个问题,关于我用的一个LISP程序计算面积的,这个程序直接将面积结果,标注在了图面上,但我想能不能让这个面积值自动存到"CTRL+C"里面,这样我可以直接在EXCEL表格里"粘贴"出来,就省下了一步"选中复制"的过程!肯请楼主的指点!!
我的LISP计算面积的程序是
(defun C:MJ() (setq pt (getpoint "选取区域内一点:")) (setq pt1 (getpoint "\n选写入面积值之点")) (setq old (getvar "cmdecho")) (setvar "cmdecho" 0) (command "point" (list 0 0)) (setq obj (entlast)) (command "Boundary" "a" "O" "R" "x" pt "") (if (= nil jd) (setq jd 2)) (if (or (= nil (entnext obj)) (/= "REGION" (cdr (assoc 0 (entget (entnext obj)))))) (setq pp "\n无闭合区域") (progn (command "Area" "o" (entlast)) (command "Erase" (entlast) "") (if (/= nil pt1) (command "text" pt1 "" "" (rtos (getvar "area") 2 jd)) ) (setq pp (strcat "\n面积:" (rtos (getvar "area")))) ) ) (command "Erase" obj "") (prompt pp) (setvar "cmdecho" old) (prin1) ) |