arcers 发表于 2019-11-6 11:05:11

layer命令不支持中文图层名称吗

命令行输入的layer命令支持英文图层名称,不支持中文图层名称?
有没有解决办法?

satan421 发表于 2019-11-6 11:28:31

;;生成图层
(command "-layer" "M" "测试图层1" "")
;;设置图层,需要存在"测试图层2"
(command "-layer" "S" "测试图层2" "")
......
不知道你说的不支持是怎么不支持?

arcers 发表于 2019-11-6 11:38:47

比如无法关闭、打开。

satan421 发表于 2019-11-6 11:41:53

;;关闭
(command "-layer" "off" "测试图层" "")
;;打开
(command "-layer" "on" "测试图层" "")

CAD2016测试通过

start4444 发表于 2019-11-6 11:45:52

2008支持

arcers 发表于 2019-11-6 11:46:15

本帖最后由 arcers 于 2019-11-6 12:12 编辑

satan421 发表于 2019-11-6 11:41
;;关闭
(command "-layer" "off" "测试图层" "")
;;打开
定义好了,没执行关闭。
(defun c:jggb ()
(command "-layer" "off" "砼梁" "")
(princ)
)

arcers 发表于 2019-11-6 12:13:12

satan421 发表于 2019-11-6 11:41
;;关闭
(command "-layer" "off" "测试图层" "")
;;打开


请再看一下lisp有无问题

satan421 发表于 2019-11-6 12:54:20

arcers 发表于 2019-11-6 12:13
请再看一下lisp有无问题

写的lisp没问题。如果定义的JGGB命令没冲突,要关闭的图层也不是当前图层的话,可能就是你的CAD有问题了
页: [1]
查看完整版本: layer命令不支持中文图层名称吗