明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 2837|回复: 4

(原创)标注图层的转换等程序

[复制链接]
发表于 2007-1-2 23:13:00 | 显示全部楼层 |阅读模式

;;复制标注,移动标注,改变标注的图层,skydie,20061209


(defun c:sdim ()
 
   (princ "\n请选取对象...")
   (setq kk (ssget))
   (setq  n(sslength kk))
      (setq k 0 f (ssadd) kkk 0)  
      (repeat n
            (setq ee (ssname kk k))
            (setq en (entget ee))
            (setq dd (cdr (assoc 0 en)))
            (if (= dd "DIMENSION")
                (progn
                      (setq f (ssadd ee f))
                      (setq kkk (1+ kkk))
                  )
              )
               (setq k (1+ k))
            )
      (if (> kkk 0)
            (progn
                (initget "c C m M L l")
                (setq tt (getkword "\n复制(c),移动(m),改变图层(1),<Enter默认为复制>:"))
                (if (= tt nil ) (setq tt "C" ))
                (setq tt (strcase tt))
                (cond (( = tt "C") (command "copy" f "" pause pause))
                      (( = tt "M") (command "move" f "" pause pause))
                      (( = tt "L") (progn
                                           (setq newla (getstring "\n输入新图层名:"))
                                           (setq chklay (tblsearch "layer" newla)) (if (= chklay nil) (command "layer" "n" newla  "c" "5" newla "Lw" "0.1" newla "" ))
                                           (command "chprop" f "" "LA" newla "")
                                     )
                          )
                      )
                    )
                (alert" 警告:没有标注尺寸!")
            )
          
               (princ)
  
   )

发表于 2007-3-2 14:41:00 | 显示全部楼层

这个程序一点也不实用,

发表于 2011-4-21 15:29:36 | 显示全部楼层
发表于 2011-8-30 11:32:07 | 显示全部楼层
我觉得要是能用鼠标滚动修改标注文字的大小就好了
发表于 2011-8-31 08:54:23 | 显示全部楼层
好多都有....................
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-11-25 21:26 , Processed in 0.251594 second(s), 28 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表