本帖最后由 zml84 于 2013-3-27 16:58 编辑
- (Defun STABEL (TBL / snl sll) (SetQ snl '()
- sll (TblNext TBL T)
- )
- (While (SetQ snl (Cons (Cdr (Assoc 2 sll)) snl)
- sll (TblNext TBL nil)
- )
- )
- (setq snl (reverse snl))
- )
- (defun c:tt ()
- (setq lys (vla-get-Layers
- (setq AcDocument
- (vla-get-ActiveDocument (vlax-get-acad-object))
- )
- )
- ly1 (STABEL "LAYER")
- )
- (vlax-for ly lys
- (setq b (vlax-get-property ly "Name")
- c (assoc (strcase b)
- '(("JZD" "地籍界线")
- ("JZP" "界址点")
- ("KZD" "测量控制点")
- ("SXSS" "水系及附属设施")
- ("JMD" "居民地及设施")
- ("DLSS" "交通及附属设施")
- ("GXYZ" "管线及附属设施")
- ("DMTZ" "地貌")
- ("GCD" "高程点及注记")
- ("ZBTZ" "植被和土质")
- ("ZJ" "注记")
- ("DLDW" "独立地物")
- ("DLJ" "地籍要素注记")
- ("TK" "图廓整饰")
- )
- )
- c (cadr c)
- )
- (and c
- (not (member c ly1))
- (princ (strcat "\n****替换图层名称: " b " --> " c));_ZML84 修改于 2013-3-27
- (vla-put-name ly c)
- )
- )
- (princ)
- )
|