求助,请高手帮看看程序哪出了问题
写了个小程序自己用,一直都没有问题,但刚碰到个图就不行了,请高手帮忙分析下哪出问题了,非常感谢;处理建筑图<0,Defpoints层移动至建筑临时层>
(defun c:clJZ ( / YY_QIANZ *doc* LAY LAYERS OLDMING ss)
(Setvar "Cmdecho" 0)
(vl-load-com)
(if (= (tblsearch "layer" "ZZ-Wall") nil)
(progn
(setq ss (ssget "X" '((8 . "0,Defpoints"))))
(if (/= ss nil)
(progn
(if (not (tblsearch "layer" "建筑临时层"))
(command ".layer" "m" "建筑临时层" "")
)
(command "chprop" ss "" "la" "建筑临时层" "")
)
)
(setq YY_QIANZ "ZZ-")
(if YY_QIANZ
(progn
(setq *doc* (vla-get-activedocument (vlax-get-acad-object))
layers (vla-get-layers *doc*)
)
(vlax-for lay layers (setq OLDMING (vla-get-name lay))
(if (not (member OLDMING '("0" "Defpoints")))
(vla-put-Name lay (strcat YY_QIANZ OLDMING))
)
)
)
)
(princ "已将建筑全部图层加前缀“ZZ-”<0,Defpoints层移动至建筑临时层>")
)
(alert "您已经处理过建筑图,请不要重复处理")
)
(Setvar "Cmdecho" 1)
(princ)
)
對別人的圖檔處理,有時找不出程序錯誤的原因,可以先試試將圖檔內容複製,再開新檔案貼上
lsjj 发表于 2013-4-27 11:19 static/image/common/back.gif
對別人的圖檔處理,有時找不出程序錯誤的原因,可以先試試將圖檔內容複製,再開新檔案貼上
谢谢。这个方法我试过了
页:
[1]