求助!
<BR>请看上面的图,这里有一大堆的点要处理,我需要将所有的点的z坐标标注在图上,这只是图形的一部分,一共有上万个点要处理,我自己编了一个小程序只可以一个点一个点的标注,可是活要的急,请大家给一个批量完成这个工作的程序吧。下面是我的程序:<BR>(defun c:hdim ())<BR> (setq height (getint "\n(输入字高:) "))<BR> (repeat 30<BR> (setq bp (getpoint "\n高程点: "))<BR> (setq a (rtos (caddr bp) 2 2))<BR> (setq pt0 (list (car bp) (cadr bp)))<BR> (command "style" "zzy1" "romanc.shx, gbcbig.shx"<BR> height 0.8 0 ""<BR> "" ""<BR> )<BR> (command "text" "j" "mc" pt0 0 a)<BR> )<BR> (princ ()))<BR>很简单只可单个标注请帮忙吧。 在你这个基础上改了改!再试试!
(defun c:hdim ()<BR> (setq pz (getvar "osmode"))<BR> (setq height (getint "\n(输入字高:) "))<BR> (command "style" "zzy1" "romanc.shx, gbcbig.shx"<BR> height 0.8 0 ""<BR> "" ""<BR> )<BR> (setq ss (ssget))<BR> (setq leng (sslength ss))<BR> (setq index 0)<BR> (setvar "CMDECHO" 0)<BR> (setvar "osmode" 0) <BR> (repeat leng<BR> (setq b1 (entget (ssname ss index)))<BR> (setq tc (assoc 0 b1))<BR> (setq index (+ index 1))<BR> (cond<BR> ((= (cdr tc) "POINT")<BR> (setq xy (cdr (assoc 10 b1)))<BR> (setq a (rtos (caddr xy) 2 2))<BR> (setq pt0 (list (car xy) (cadr xy)))<BR> (command "text" "j" "mc" pt0 0 a)<BR> )<BR> )<BR> )<BR> (princ ())<BR> (setvar "osmode" PZ)<BR>)
页:
[1]