本帖最后由 kozmosovia 于 2024-11-12 16:43 编辑
用command或者ssgetfirst都是变相现需要选两次,不如直接遍历选择集一次,根据图元类型分组到指定的变量中- (and (setq ss (ssget '((0 . "line,circle"))))
- (setq ssline (ssadd)
- sscircle (ssadd)
- idx -1
- )
- (repeat (sslength ss)
- (setq sn (ssname ss (setq idx (1+ idx))))
- (ssadd sn
- (if (= (cdr (assoc 0 (entget sn))) "LINE")
- ssline
- sscircle
- )
- )
- )
- )
|