CAD图层lisp问题
我想将CAD一个图层的名字变成另一个名字,如“A01TXT”变成“S01TXT",这样的LISP怎么写呢?...
我想将CAD一个图层的名字变成另一个名字,
如“A01 TXT”变成“S01 TXT",
这样的LISP怎么写呢? 展开
如“A01 TXT”变成“S01 TXT",
这样的LISP怎么写呢? 展开
3个回答
展开全部
(defun c:tt (/ JU LU XI)
(setvar "cmdecho" 0)
(defun table (s / d r)
(while (setq d (tblnext s (null d)))
(setq r (cons (cdr (assoc 2 d)) r))
)
)
(princ "\n功能 [修改图层名称]")
(setq ju (getstring "\n输入旧图层名:")
xi (getstring "\n输入新图层名:")
)
(setq Lu (table "LAYER"))
(if
(and (/= ju "")
(/= xi "")
(member ju Lu)
)
(command "-rename" "la" ju xi)
)
(princ)
)
(setvar "cmdecho" 0)
(defun table (s / d r)
(while (setq d (tblnext s (null d)))
(setq r (cons (cdr (assoc 2 d)) r))
)
)
(princ "\n功能 [修改图层名称]")
(setq ju (getstring "\n输入旧图层名:")
xi (getstring "\n输入新图层名:")
)
(setq Lu (table "LAYER"))
(if
(and (/= ju "")
(/= xi "")
(member ju Lu)
)
(command "-rename" "la" ju xi)
)
(princ)
)
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询