明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 552|回复: 0

[提问] 为什么这个图层工具在CAD2016就不能用了?

[复制链接]
发表于 2019-2-24 15:17:14 | 显示全部楼层 |阅读模式
本帖最后由 hcr_123 于 2019-4-18 09:59 编辑

defun c:EEA()
      (command "layer" "n" "0"  "l" "continuous" "0" "c" "7" "0" "")
      (command "layer" "n" "BASE"  "l" "phantom2" "BASE" "c" "1" "BASE" "")
      (command "layer" "n" "BEND"  "l" "continuous" "BEND" "c" "2" "BEND" "")
      (command "layer" "n" "CENTER"  "l" "center2" "CENTER" "c" "1" "CENTER" "")
      (command "layer" "n" "DIM"  "l" "continuous" "DIM" "c" "4" "DIM" "")
      (command "layer" "n" "FORM"  "l" "continuous" "FORM" "c" "180" "FORM" "")
      (command "layer" "n" "HATCH"  "l" "continuous" "HATCH" "c" "1" "HATCH" "")
      (command "layer" "n" "HIDDEN"  "l" "DASHED" "HIDDEN" "c" "2" "HIDDEN" "")
      (command "layer" "n" "LASER"  "l" "continuous" "LASER" "c" "1" "LASER" "")
      (command "layer" "n" "MARK"  "l" "continuous" "MARK" "c" "3" "MARK" "")
      (command "layer" "n" "NCT"  "l" "continuous" "NCT" "c" "6" "NCT" "")
      (command "layer" "n" "REP"  "l" "continuous" "REP" "c" "5" "REP" "")
      (command "layer" "n" "REPHID"  "l" "DASHED" "REPHID" "c" "5" "REPHID" "")
      (command "layer" "n" "ZCJG"  "l" "continuous" "ZCJG" "c" "3" "ZCJG" "")
)

1.以下用于图层转换

;本程序定义一些图层转换命令,本程序执行时,先选择图形再输入命令则将选择的图形转换到指定的层
;             不选择图形直接输入命令则将指定的层转换为当前层.
(DEFUN LAYERCH(MYLSP / LAYCH)
(if (setq LAYCH (ssget "i"))          ;如果已选择图形则将选择的图形转换到指定的层
   (command "_.change" LAYCH "" "_p" "_LT" "BYLAYER" "_C" "BYLAYER" "_la" mylsp "")
   (command "_layer" "m" mylsp  "")    ;否则将指定的层转换为当前层
)
   (princ)
)
(DEFUN C:DI() (LAYERCH "DIM"))          ;用简化命令DI定义DIM图层的转换命令
(DEFUN CS() (LAYERCH "LASER"))
(DEFUN C:ZC() (LAYERCH "ZCJG"))
(DEFUN C:PP() (LAYERCH "REP"))
(DEFUN C:Q() (LAYERCH "0"))
(DEFUN C:NC() (LAYERCH "NCT"))
(DEFUN C:MA() (LAYERCH "MARK"))
(DEFUN C:FM() (LAYERCH "FORM"))
(DEFUN C:BE() (LAYERCH "BEND"))
(DEFUN C:BA() (LAYERCH "BASE"))
(DEFUN C:HI() (LAYERCH "HIDDEN"))
;如果要定义其它图层的简化命令,按以上格式即可.

为什么到了CAD2016版本以上,那个选择的图形转换到指定的层不能用了,显示错误,是哪里语句出了问题?哪个大神可以帮忙解答吗?

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

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

本版积分规则

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

GMT+8, 2025-5-19 02:49 , Processed in 0.148610 second(s), 27 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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