你好
我试图选择几个多段线,它们的所有顶点坐标到一个列表中。由于某些原因,选择集正确地显示了成员的数量,但我不能用ssname逐个调用它们
知道吗?
谢谢
谢伊
- (defun C:DEMO (/ pl pts sspl tpts)
- (setq sspl (ssget '((0 . "LWPOLYLINE")))) ;_select all polylines and assign them to a selection set sspl
- (setq i 1)
-
- (setq tpts 0)
- (while (<= i (sslength sspl))
- (setq pts (mapcar 'cdr
- (vl-remove-if-not
- '(lambda (e)
- (= (Car e) 10)
- )
- (entget(ssname sspl 1))
- )
- )
- )
- (setq i (1+ i))
-
-
-
- )
- (setq tpts (+ tpts pts))
- )
- ;_run a loop that extract all vertices from all sset members
- ;_loop vert list
- ;_create a temp line between 2 points
- ;_gets its length
- ;_get its angle
- ;_if the distance is less than x
- ;_if the angle is between w and z
- ;_isolate those verts
- ;_create a rectangle
这是干什么的?
|