sky3912 发表于 2006-2-20 21:40:00

[求助]有没有测量曲线长度的小程序啊

有没有测量曲线长度的小程序啊

王咣生 发表于 2006-2-21 07:56:00

reply

(defun c:test ( / en curve-obj name eparam len)<BR>&nbsp; (setq en (car (entsel "\n选择一条线:")))<BR>&nbsp; (if en<BR>&nbsp;&nbsp;&nbsp; (progn<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq curve-obj (vlax-ename-&gt;vla-object en))<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq name (vlax-get-property curve-obj 'ObjectName))<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (if (wcmatch (strcase name) "*LINE")<BR>&nbsp;(progn<BR>&nbsp;&nbsp; (setq eparam (vlax-curve-getEndParam curve-obj))<BR>&nbsp;&nbsp; (setq len (vlax-curve-getDistAtParam curve-obj eparam))<BR>&nbsp;)<BR>&nbsp;(princ "\n非曲线.")<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )<BR>&nbsp;&nbsp;&nbsp; )<BR>&nbsp; );if<BR>)

sky3912 发表于 2006-2-21 08:20:00

谢谢斑竹啊,呵呵

momokill 发表于 2006-3-3 23:22:00

谢谢斑竹啊,呵呵
页: [1]
查看完整版本: [求助]有没有测量曲线长度的小程序啊