AutoLISP选择集操作,根据选择集中图元的类型,进行不同的操作,代码如下。

(defun c:ssope ()
    (setq ss (ssget))
    (setq i 0)
    (repeat (sslength ss)
    (setq typ (cdr (assoc 0 (entget (ssname ss i)))))
    (cond
        ((= typ "LINE")
         (print "line");操作代码
        )
        ((= typ "ARC")
         (print "arc");操作代码
        )
        ((= typ "CIRCLE")
         (print "circle");操作代码
        )
    )
    (setq i (1+ i))
    )
    (princ)
)

代码完。

相关文章:

  • 2021-07-27
  • 2022-01-05
  • 2022-01-03
  • 2022-12-23
  • 2021-06-06
  • 2021-11-09
  • 2021-10-17
  • 2021-11-19
猜你喜欢
  • 2021-08-11
  • 2022-12-23
  • 2021-04-27
  • 2022-01-27
  • 2021-12-08
  • 2021-05-18
相关资源
相似解决方案