tll1923 发表于 2008-7-16 15:34:00

取多条多段线长的lps

本帖最后由 tll1923 于 2010-12-21 16:15 编辑

<p>取得多条多段线的长 按选取顺序写到一个文件里</p><p>自己试了半天也没编成 555</p><p>求高手帮忙多谢了! </p>

tll1923 发表于 2008-7-16 15:46:00

<p>(defun c:tlen(/ curve tlen ss n f)<br/>(vl-load-com)<br/>(setq f (open (getfiled "" "" "" 1) "w"))<br/>(setq ss (ssget '((0 . "CIRCLE,ELLIPSE,LINE,*POLYLINE,SPLINE,ARC"))))<br/>(setq n 0)<br/>(repeat (sslength ss)<br/>(setq curve (vlax-ename-&gt;vla-object (ssname ss n)))<br/>(setq tlen (vlax-curve-getdistatparam curve<br/>(vlax-curve-getendparam curve)<br/>)<br/>)<br/>(setq tlen (strcat (rtos tlen 2 5) "\n"))<br/>(princ tlen f)<br/>(setq n (1+ n))<br/>)<br/>(close f)<br/>(princ)<br/>)</p><p></p><p>自己编出来了!哈哈</p>

sailorcwx 发表于 2008-7-16 19:39:00

老毛就说了,自己动手,丰衣足食

ljttjl 发表于 2008-7-16 20:37:00

<p>联系:ljttjl@ tom.com</p>
页: [1]
查看完整版本: 取多条多段线长的lps