明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1488|回复: 5

[基础] [求助]Automatic create layer, text style & dim style

[复制链接]
发表于 2010-6-16 19:46:00 | 显示全部楼层 |阅读模式
 

Dear All,

How to

Automatic create layer, text style & dim style in startup or create new drawing


Layer - 1, Layer-2 etc.


Tx-1, Tx-2 etc.


Dim-1, Dim-2 Etc


& Set unit automatic

"觉得好,就打赏"
还没有人打赏,支持一下
发表于 2010-6-16 20:14:00 | 显示全部楼层
You can save settings to acad.dwt
发表于 2010-6-17 00:22:00 | 显示全部楼层

ding 2L

顶贰楼

UP second floor

 

2L shuode dui

贰楼说得对

second floor has the right point

 

biao de chaxun he chuangjian, bu nan

表的查询和创建,不难的

it is merely about the records that are to be enquired or established, which i dont think hard

 

发表于 2010-6-17 10:19:00 | 显示全部楼层
本帖最后由 crazylsp 于 2011-4-21 11:36 编辑

if you use CAD2004, after finish set layer work

 楼主| 发表于 2010-6-17 14:32:00 | 显示全部楼层
  1. The following is a quotemasterlongStatements in 2010-6-16 20:14:00:
  2. You can save settings to acad.dwt
复制代码
dear sir

thx for reply
i'm already create acad.dwt
but i want some existing file not load layer & dim style & text style
because create a lisp
 楼主| 发表于 2010-6-17 15:10:00 | 显示全部楼层

dear all

 

[Quote]

 ;;;/////////////////////////////////////////////// //////////////////
(Defun c: SLS (); Define function
(Setq ROL (getvar "clayer")); Set ROL to current layer
(SET_LAYER); Goto SET_LAYER Function
(RESET_ORIGINAL_LAYER); Goto RESET_ORIGINAL_LAYER Function
(Princ); Exit quietly
); End of define function
;;;/////////////////////////////////////////////// //////////////////
(Defun SET_LAYER (); Define function
(CREATE_LAYER "Const" "1" "CONTINUOUS"); Goto CREATE_Layer Function, Layer Name, Color, LineType
(CREATE_LAYER "Steel" "2" "CONTINUOUS"); Goto CREATE_Layer Function, Layer Name, Color, LineType
(CREATE_LAYER "Dimension" "4" "CONTINUOUS"); Goto CREATE_Layer Function, Layer Name, Color, LineType
(CREATE_LAYER "Hidden" "1" "HIDDEN"); Goto CREATE_Layer Function, Layer Name, Color, LineType
(CREATE_LAYER "Text" "7" "CONTINUOUS"); Goto CREATE_Layer Function, Layer Name, Color, LineType
(CREATE_LAYER "Welds" "6" "CONTINUOUS"); Goto CREATE_Layer Function, Layer Name, Color, LineType
(CREATE_LAYER "Ref" "8" "CONTINUOUS"); Goto CREATE_Layer Function, Layer Name, Color, LineType
); End define function
;;;/////////////////////////////////////////////// //////////////////
(Defun CREATE_LAYER (NLAY CLR LT / LAY FRZ); Define function, Declare variables and arguments
(Setq LAY (tblsearch "layer" NLAY)); Search drawing to find layer
(If; If the following returns true
(Not LAY); Layer not in drawing
(Command "_.layer" "m" NLAY "c" CLR "" "lt" LT "" ""); Layer command ~ make new layer with color and linetype
(Progn; Then do the following
(Setq FRZ (cdr (assoc 70 LAY))); Variable FRZ is frozen layer
(If (= FRZ 65); Layer frozen from last edit
(Progn; Then do the following
(Command "_.layer" "t" NLAY ""); Thaw new layer if frozen
(Command "_.layer" "s" NLAY ""); Set new layer
); End progn (otherwise. ..)
(Command "_.layer" "s" NLAY ""); Set new layer
); End if
); End progn (otherwise. ..)
); End if
); End define function
;;;/////////////////////////////////////////////// //////////////////
(Defun RESET_ORIGINAL_LAYER (); Define function
(Command "_.layer" "s" ROL ""); Layer command ~ Reset original layer
); End define function
;;;/////////////////////////////////////////////// //////////////////

[/ Quote]

 

 

您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-10-2 06:33 , Processed in 0.182463 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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