各位大神看下,选中红色线条相交的圆,使红色线和相交的圆处于选中状态
本帖最后由 664571221 于 2023-5-22 17:29 编辑各位大神看下,选中红色线条相交的圆,使红色线和相交的圆处于选中状态,红色线可能有多个图层,或则就使圆处于选中状态,能提示圆的个数最好 本帖最后由 自贡黄明儒 于 2023-5-22 16:29 编辑
求方法,还是程序???
求得直线两端点p1 p2,然后(ssget "_F" p1 p2 '((0 . circle)))
自贡黄明儒 发表于 2023-5-22 16:18
求方法,还是程序???
求得直线两端点p1 p2,然后(ssget "_F" p1 p2 '((0 . circle)))
黄大师你都出马了,必须来个程序呀 本帖最后由 liuhe 于 2023-5-22 22:41 编辑
(DEFUN C:TT (/ SS SS1 I E BOX SS2 J)
(SETQ SS (SSGET '((0 . "LINE") (62 . 1))))
(IF (NOT SS)
(VL-EXIT-WITH-VALUE 0)
)
(SETQSS1 (SSADD)
I 0
)
(REPEAT (SSLENGTH SS)
(SETQ E (SSNAME SS I)
BOX (list (cdr (ASSOC 10 (ENTGET E))) (cdr (ASSOC 11 (ENTGET E))))
SS2 (SSADD)
SS2 (SSGET "F" BOX (list '(0 . "INSERT")))
)
(IFSS2
(PROGN
(SETQ J 0)
(REPEAT(SSLENGTH SS2)
(IF (NOT (SSMEMB (SSNAME SS2 J) SS1))
(SSADD (SSNAME SS2 J) SS1)
)
(SETQ J (1+ J))
)
)
)
(SETQ I (1+ I))
)
(PRINC (SSLENGTH SS1))
(PRINC)
)
圆是图块
xyp1964 发表于 2023-5-22 18:00
圆是图块
派大可以上码吗.... liuhe 发表于 2023-5-22 17:36
no function definition: GETENBOX 大神 xyp1964 发表于 2023-5-22 18:00
圆是图块
呼叫派大....... 波总的代码
(defun c:tt (/ e ee i s s1 ss)
(if (setq s (ssget ":S" '((0 . "LINE")(62 . 1))))
(progn
(setq i -1)
(setq ss (ssadd))
(while (setq e (ssname s (setq i (1+ i))))
(setq ee (entget e))
(setq ee (mapcar '(lambda(x)(cdr (assoc x ee)))'(10 11)))
(if (setq s1 (ssget "F" ee '((0 . "INSERT")(8 . "EQUIP_喷头"))));;
(ssadd (ssname s1 0) ss)
)
)
(sssetfirst nil ss)
(princ (strcat "\n共选择了" (itoa (sslength ss)) "个"))
(princ)
)
)
)
页:
[1]