symoin 发表于 2022-7-6 08:24:40

使用readi绘制多段线

海,
 
请参考附图,
 
是否有lisp通过窗口选择或单独选择文本来绘制红线。
红线由原点在底部和有读数的地方绘制。
距离是该级别对应文本的10倍,在蓝线的右侧或左侧。
有4个标高的偏差为10mm,4个读数后,下一个标高的偏差为20mm,再次为10mm。
红线批注。图纸

BIGAL 发表于 2022-7-6 10:15:31

这是一个写列的文字lisp应该是一个很好的起点,而不是写到文件只是调用pline和使用每个新的pt需要使用vl排序列表,虽然在做pline之前。通过比例因子调整x?
 
; converts column of text to comma seprated file with text value and y value
; put in excell and sort by y value
; by Alan H Nov 2004
(setq x 1)
(while (/= x 4)
(setq howmany (rtos x 2 0))
(setq fileto (strcat "c:/temp/setout" howmany))
(princ fileto)
(setq fout (open fileto "w"))
(while (not (setq ss (ssget ))))   
(princ "wow")
   (while (setq en (ssname ss 0))
    ; Entity type
    (setq entyp (cdr (assoc 0 (entget en))))
(princ "wow")
   (if (= entyp "TEXT")
   (progn
   (setq xyz (cdr (assoc 10 (entget en))))
   (setq txtht (cdr (assoc 1 (entget en))))
   ;write file out here
   (setq textout (strcat txtht "," (rtos (cadr xyz) 2 3)))
   ;write
   (write-line textout fout)
   (princ textout)
   )                        
   )                              
   ; Delete each measured entity from set
   (ssdel en ss)
;end while
)
(close fout)
(setq x (+ x 1))
) ;end if loop 3 times
(princ)
页: [1]
查看完整版本: 使用readi绘制多段线