本帖最后由 jun353835273 于 2023-10-29 10:46 编辑
- <div class="blockcode"><blockquote>(defun c:tt( / p1 p0 blk get ss)
- (setq p0 (getpoint "\n指定角点:"))
- (setq p1 (getcorner p0 "\n指定另一点:"))
- (setq blk (entsel "\n 选一个块"))
- (if (and p0 p1 blk
- (setq get (entget (car blk)))
- (= (cdr (assoc 0 get)) "INSERT")
- )
- (progn
- (setq blk (cdr (assoc 2 get)))
- (setq ss (ssget "c" p0 p1 (list '(0 . "INSERT")(cons 2 blk))))
- (sssetfirst nil ss)
- )
- )
- (princ)
- )
|