只需一步,快速开始
使用道具 举报
;;试试我写的这个程序,可以轻松修改标注内容
;;支持批量修改哦。
(setq txt_de "100")(defun c:de (/ ss txt) (setvar "cmdecho" 0) (princ "\n 选择需修改的标注:") (setq ss (ssget))(if ss (progn (princ "\n 请输入字符(空格=恢复)<\"")(princ txt_de) (setq txt (getstring T "\">:"))(cond ((= txt " ")(setq txt "")) ((= txt "")(setq txt txt_de)) (T (setq txt_de txt)))(command "dimedit" "n" txt "p" "")))(princ))(princ "标注修改程序 命令de")(princ)
简单修改一下就成了,等现成的啊。
(defun c:changdim() (setq currentLay (getvar "dimstyle"))
;;设置标注变量;;本例仅设置字体大小的变量,如要修改其他变量,在此处添加 (setvar "DIMTXT" (getreal "\n请输入需更改的标注尺寸:"))
(command ".-DIMSTYLE" "S" currentLay) (command "_Y" ))
加载后命令行输入changdim即可,也可加入自已的程序段中
补充:虽然可实现变更,但一般不建议做这样的修改。
因为这样未指定的项(如箭头大小、引线粗细)等并不会变化,单字体变大会显得不协调。
最佳的办法是修改全局变量!
本版积分规则 发表回复 回帖后跳转到最后一页
小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 ) ©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途
GMT+8, 2024-5-18 07:26 , Processed in 0.247150 second(s), 25 queries , Gzip On.
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.