;删除块儿对象包围框内的线图元要素
;删除块儿对象包围框内的线图元要素;原帖子的地址为块(包含属性块)边缘断线效果如何优化 - AutoLISP/Visual LISP 编程技术 - CAD论坛 - 明经CAD社区 - Powered by Discuz! (mjtd.com)
;没有币下载,且修改也要花时间,适当收一个;对于原帖子中的undo问题仍未解决
;参数 ss为块儿旋转集 rot为旋转与否,值为t或nil num为块儿的缩放比例
;执行命令kp
;主函数
(defun c:kp( / BP EN N)
(defun *error* ( msg )
(LM:endundo (LM:acdoc))
(if (not (wcmatch (strcase msg t) "*break,*cancel*,*exit*"))
(princ (strcat "\nError: " msg))
)
(princ)
)
(setq ss(ssget '((0 . "INSERT"))))
(setq rot t)
(progn
(while(not(setq num (getreal "\n 缩放比例:")))
(setq num (getreal "\n 缩放比例: ")))num)
(vl-cmdf "undo" "be")
(if(and ss num)
(repeat(setq n (sslength ss))
(setq en(cdar(ssnamex ss(setq n (1- n)))));(sssetfirst nil(ssadd (car en)(ssadd)))
(setq bp(cdr(assoc 10(entget(car en)))))
(abb en bp rot num)
)
)
(vl-cmdf "undo" "e")
)
支持支持大佬优化 magicheno 发表于 2022-2-27 13:13
支持支持大佬优化
undo 问题依然没有搞清楚希望大家继续研究下
支持支持大佬优化
页:
[1]