• AutoLISP选择集操作


    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)
    )

    代码完。

    作者:codee
    文章千古事,得失寸心知。


  • 相关阅读:
    装饰器的应用
    绑定路由关系
    基本使用
    numpy多项式拟合
    pandas空值处理与插值
    索引
    事务
    子查询
    视图
    自关联
  • 原文地址:https://www.cnblogs.com/bimgoo/p/2503028.html
Copyright © 2020-2023  润新知