关入禁闭室
- UID
- 67
- 积分
- 1619
- 金币
-
- 活跃
-
- 阅读权限
- 0
- 注册时间
- 2006-7-29
- 最后登录
- 1970-1-1
|
发表于 2007-11-23 19:29
|
显示全部楼层
来自: 中国福建宁德
(defun C:cdtj (/ CURVE TLEN SS N SUMLEN)
(vl-load-com)
(setq SUMLEN 0)
(setq SS (ssget '((0 . "CIRCLE,ELLIPSE,LINE,*POLYLINE,SPLINE,ARC"))))
(setq N 0)
(repeat (sslength SS)
(setq CURVE (vlax-ename->vla-object (ssname SS N)))
(setq TLEN (vlax-curve-getdistatparam
CURVE
(vlax-curve-getendparam CURVE)
)
)
(setq SUMLEN (+ SUMLEN TLEN))
(setq N (1+ N))
)
(print (strcat "总长度: " (rtos SUMLEN 2 5)))
(princ)
) |
|