5
13
8
初来乍到
使用道具 举报
63
6297
6283
后起之秀
(if (and (setq s (car (entsel "\n Select [Polyline,SPline,Line,Arc] : "))) (wcmatch (cdr (assoc 0 (entget s))) "*POLYLINE,SPLINE,LINE,ARC") ) (setq l (vlax-curve-getdistatparam s (fix (vlax-curve-getendparam s)))))
106
1万
101
顶梁支柱
(defun getcoords (ent) (vlax-safearray->list (vlax-variant-value (vlax-get-property (vlax-ename->vla-object ent) "Coordinates" ) ) ))(defun co-ords2xy (); convert now to a list of xy as co-ords are x y x y x y if 3d x y z x y z(setq numb (/ (length co-ords) 2))(setq I 0)(repeat numb(setq xy (list (nth (+ I 1) co-ords)(nth I co-ords) ))(setq coordsxy (cons xy coordsxy))(setq I (+ I 2))) ; end repeat)(setq plobjs (ssget (list (cons 0 "*polyline"))))(setq numb1 (sslength plobjs))(setq x numb1)(repeat numb1(setq obj (ssname plobjs (setq x (- x 1))))(setq co-ords (getcoords obj)))(co-ords2xy)(setq inc (length coordsxy))(repeat (/ inc 2) (setq x (rtos (nth (setq inc (- inc 1)) co-ords) 2 3 ))(setq y (rtos (nth (setq inc (- inc 1)) co-ords) 2 3 )) (setq xy (strcat x "," y )) (princ xy) (princ "\n ") )(setq ent nil) (setq obj nil)(setq plobjs nil)
本版积分规则 发表回复 回帖后跳转到最后一页
微信公众平台
扫描访问手机版
点击图片下载手机App
|关于我们|小黑屋|乐筑天下 繁体中文
GMT+8, 2025-3-11 00:08 , Processed in 0.458498 second(s), 62 queries .
© 2020-2025 乐筑天下
在线时间:10:00-17:00
暂无
扫一扫,关注我们
帮助中心
关于我们
下载APP客户端