只需一步,快速开始
(defun tuceng() (setq dxf(entget(car(nentsel "\n选择块内对象")))) (setq lay(cdr (assoc 8 dxf)))) (defun C:bf()(tuceng) (command "-layer" "off" lay "") (princ "\n已关闭该图层")(princ) ) (defun C:bwd()(tuceng) (command "-layer" "F" lay "") (princ "\n已冻结该图层")(princ) ) (defun C:bsd()(tuceng) (command "-layer" "LO" lay "") (princ "\n已锁定该图层")(princ) ) (defun C:bds()(tuceng) (command "-layer" "u" lay "") (princ "\n已解锁该图层")(princ) ) (defun C:bed() (setq fir(nentsel "\n选择块内对象")) (setq en(car fir)) (setq enb(CAR(reverse(car(reverse fir))))) (setq dxf(entget en)) (setq txt(cdr (assoc 1 dxf))) (setq newt(getstring "\n输入修改内容")) (tihuan en 1 newt nil) (COMMAND "MOVE" ENB "" '(0 0) '(0 0)) (princ) ) (defun C:bM();移动块内文字;可扩展为移动块内直线,多段线,矩形等等-tws.. (setq fir(nentsel "\n选择块内对象")) ;(setq pdt(getvar 'lastpoint)) (setq en(car fir)) (setq kn(car(reverse fir))) (setq nk(reverse(car(reverse fir)))) (setq dxf0(entget (nth 0 nk))) (setq P0(cdr (assoc 10 dxf0))) (setq xx(car p0) yy(cadr p0)) (setq n 1) (repeat (1-(length nk)) (setq dxf1(entget (nth n nk))) (setq P1(cdr (assoc 10 dxf1))) (setq xx(+ xx(car p1)) yy(+ yy(cadr p1))) (setq n(1+ n))) (setq enb(CAR(reverse kn))) (setq enc(caar(reverse fir))) (setq dxf(entget enc)) (setq pt (list xx yy)) ;(setq PT(cdr (assoc 10 dxf))) ;(setq PT1(getPOINT "\n输入基点")) (setq PT2(getPOINT "\n输入目标点")) (setq newpt(list(-(car pt2)(car pt))(-(cadr pt2)(cadr pt)))) (tihuan en 10 newpt nil) (COMMAND "MOVE" ENB "" '(0 0) '(0 0)) (princ) ) (defun TIHUAN (en code new mode / e) (if (and (= (type en) 'ENAME) (= (type code) 'INT) new ) (progn (setq e (entget en)) (if (assoc code e) (entmod (subst (cons code new) (assoc code e) e)) (if mode (entmod (reverse (cons (cons code new) (reverse e)))) nil ) ) ) ) )
您需要 登录 才可以下载或查看,没有账号?注册
查看全部评分
使用道具 举报
davide888 发表于 2014-6-18 10:06 块内修改,支持 可以修改标注比例不?
twsyzx 发表于 2014-6-18 20:07 这个建议不错,以前经常出现块放大后标注比例不符的情况
本版积分规则 发表回复 回帖后跳转到最后一页
小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 ) ©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途
GMT+8, 2024-5-17 19:58 , Processed in 0.199259 second(s), 29 queries , Gzip On.
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.