明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 2708|回复: 10

[讨论] 做一个单位统一图层的工具。

[复制链接]
发表于 2013-4-16 08:17:06 | 显示全部楼层 |阅读模式
想到了每个单位都要统一自己的图层,以便画图统一,应该怎么做这样的工具呢,方便快捷,还能自己定义的。
发表于 2013-4-16 08:52:02 | 显示全部楼层
那就用定义个模板文件吧,了解具体情况,可百度“cad模板文件”
发表于 2013-4-16 09:21:12 | 显示全部楼层
楼上说的方法够简单
发表于 2013-4-16 13:01:56 | 显示全部楼层
可以试试这个!
发表于 2021-6-7 09:43:47 | 显示全部楼层
很需要这个
发表于 2021-6-9 18:52:55 | 显示全部楼层
弄一个文件,设置好尺寸、图层、线型、比例、图框,存为acad.dwt,全公司覆盖原文件,打开cad就能用
发表于 2021-6-10 00:04:16 | 显示全部楼层
alexmai 发表于 2021-6-9 18:52
弄一个文件,设置好尺寸、图层、线型、比例、图框,存为acad.dwt,全公司覆盖原文件,打开cad就能用

他的意思,应该是在一个空白dwg中,用程序写出来。
发表于 2021-6-10 08:59:21 | 显示全部楼层
shcvip 发表于 2021-6-10 00:04
他的意思,应该是在一个空白dwg中,用程序写出来。

花点时间,线型,尺寸,图层单独找,论坛都有的
发表于 2021-6-10 09:28:26 | 显示全部楼层
这个是我常用的方法,直接按要求建图层及线形,不用设置DWG文件,方便,直接!

;;;自动创建常用图层
(defun c:FFF ()
  (setvar "cmdecho" 0)
  (command "layer" "m" "A-ELEV-LIN1-立面外轮廓线" "c" "40" "" "")
  (command "layer" "m" "A-ELEV-LIN2-立面中轮廓线" "c" "2" "" "")
  (command "layer" "m" "A-ELEV-LIN3-立面细轮廓线" "c" "153" "" "")
  (command "layer" "m" "A-ELEV_OTHER-立面配景" "c" "153" "" "")
  (command "layer" "m" "A-FURN-家具" "c" "251" "" "")
  (command "layer" "m" "A-FURN-建筑面积计算" "c" "6" "" "")
  (command "layer" "m" "DOOR" "c" "4" "" "")
  (command "layer" "m" "DOOR-NAME" "c" "5" "" "")
  (command "layer" "m" "大样剖切线" "c" "4" "" "")
  (command "layer" "m" "A-FURN-绘图层" "c" "2" "" "")
  (setvar "cmdecho" 1)
(princ)
)

;;;自动创建常用图层
(defun c:FFa ()
  (setvar "cmdecho" 0)
  (command "layer" "m" "0-总图-建筑红线" "c" "1" "" "l" "HANTOM" """")
  (command "layer" "m" "0-总图-红地红线"  "c" "6" "" "l" "DOTE" """")
  (command "layer" "m" "DOTE"  "c" "1" "" "l" "DOTE" """")
  (command "layer" "m" "0-总图-道路红线" "c" "2" "" "")
  (command "layer" "m" "0-总图-道路边线" "c" "3" "" "")
  (command "layer" "m" "0-总图-道路中心线" "c" "1" "" "l" "CENTER" """")
  (command "layer" "m" "0-总图-建筑外边线" "c" "42" "" "")
  (command "layer" "m" "0-总图-建筑可视线" "c" "2" "" "")
  (command "layer" "m" "0-总图-已建建筑外边线" "c" "190" "" "")
  (command "layer" "m" "0-总图-围墙线" "c" "221" "" "")
  (command "layer" "m" "0-总图-构筑物" "c" "6" "" "")
  (command "layer" "m" "0-总图-园林植物" "c" "251" "" "")
  (command "layer" "m" "0-总图-表格线" "c" "3" "" "")
  (command "layer" "m" "0-总图-园林布置" "c" "2" "" "")  
  (command "layer" "m" "0-总图-摩托车位" "c" "6" "" "")  
  (command "layer" "m" "0-总图-绿地面积" "c" "6" "" "")  
  (command "layer" "m" "0-总图-"绿化树"c" "6" "" "")  
  (command "layer" "m" "0-总图-小汽车停车位" "c" "6" "" "")
  (setvar "cmdecho" 1)
(princ)
)

;;;自动创建常用图层
(defun c:FFG ()
  (setvar "cmdecho" 0)
  (command "layer" "m" "0-TF-天花布置" "c" "2" "" "")
  (command "layer" "m" "0-FURN-平面图" "c" "2" "" "")
  (command "layer" "m" "0-TF-天花灯具布置" "c" "6" "" "")
  (command "layer" "m" "0-TF-天花尺寸标注" "c" "3" "" "")
  (command "layer" "m" "0-DM-地面布置" "c" "251" "" "")
  (command "layer" "m" "0-DM-地面家具配景" "c" "251" "" "")
  (command "layer" "m" "0-DM-地面尺寸标注" "c" "3" "" "")
  (command "layer" "m" "0-FURN-平面布置图" "c" "2" "" "")
  (command "layer" "m" "0-FURN-平面尺寸" "c" "2" "" "")
  (command "layer" "m" "A-FURN-家具" "c" "251" "" "")
  (command "layer" "m" "DOOR" "c" "4" "" "")
  (command "layer" "m" "DOOR-NAME" "c" "4" "" "")
  (command "layer" "m" "大样剖切线" "c" "4" "" "")
  (command "layer" "m" "A-FURN-绘图层" "c" "2" "" "")
  (setvar "cmdecho" 1)
(princ)
)

;;通过命令设换到相应天花图层
(defun c:T1() (setvar "clayer" "0-TF-天花布置") (princ))
(defun c:T2() (setvar "clayer" "0-TF-天花尺寸标注") (princ))
(defun c:T3() (setvar "clayer" "0-TF-天花灯具布置") (princ))


;;通过命令设换到相应地面图层
(defun c:D1() (setvar "clayer" "0-DM-地面布置") (princ))
(defun c:D2() (setvar "clayer" "0-DM-地面尺寸标注") (princ))
(defun c:D3() (setvar "clayer" "0-DM-地面家具配景") (princ))

;;通过命令设换到相应图层
(defun c:F1() (setvar "clayer" "A-ELEV-LIN1-立面外轮廓线") (princ))
(defun c:F2() (setvar "clayer" "A-ELEV-LIN2-立面中轮廓线") (princ))
(defun c:F3() (setvar "clayer" "A-ELEV-LIN3-立面细轮廓线") (princ))
(defun c:F4() (setvar "clayer" "A-FURN-绘图层") (princ))
(defun c:F5() (setvar "clayer" "A-FURN-家具") (princ))
(defun c:FFC() (setvar "clayer" "DOTE") (princ))
(defun c:FFD() (setvar "clayer" "DOOR") (princ))
(defun c:FFW() (setvar "clayer" "WINDOW") (princ))
(defun c:FW() (setvar "clayer" "WALL") (princ))
(defun c:F0() (setvar "clayer" "0") (princ))
发表于 2021-8-21 20:04:57 | 显示全部楼层
小毛草 发表于 2021-6-10 09:28
这个是我常用的方法,直接按要求建图层及线形,不用设置DWG文件,方便,直接!

;;;自动创建常用图层

为什么我用你的代码修改后   自动创建常用图层没问题  但是;;通过命令设换到相应图层不起作用
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-11-25 06:41 , Processed in 0.179622 second(s), 27 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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