如果你看一下这段代码,它显示了层的细节,在这个阶段没有代码,有些人可能有一些不难的任务,为什么不亲自去做呢。
- (setq doc (vla-get-activedocument (vlax-get-acad-object)))
- (setq alllayers (vla-get-layers doc))
- (vlax-for lay alllayers
- (vlax-dump-object lay)
- )
查看转储,您将看到打开/关闭freez/解冻开关,因此可以列出现有条件。
- ; IAcadLayer: A logical grouping of data, similar to transparent acetate overlays on a drawing
- ; Property values:
- ; Description = ""
- ; Freeze = 0
- ; LayerOn = -1
- ; Linetype = "Continuous"
- ; Lineweight = -3
- ; Lock = 0
- ; Material = "Global"
- ; Name = "0"
- ; PlotStyleName = "Color_7"
- ; IAcadLayer: A logical grouping of data, similar to transparent acetate overlays on a drawing
- ; Property values:
- ; Description = ""
- ; Freeze = -1
- ; LayerOn = -1
- ; Linetype = "Continuous"
- ; Lineweight = -3
- ; Lock = 0
- ; Material = "Global"
- ; Name = "alan1freeze"
- ; PlotStyleName = "Color_7"
- ; Plottable = -1
- ; IAcadLayer: A logical grouping of data, similar to transparent acetate overlays on a drawing
- ; Property values:
- ; Description = ""
- ; Freeze = 0
- ; LayerOn = 0
- ; Linetype = "Continuous"
- ; Lineweight = -3
- ; Lock = 0
- ; Material = "Global"
- ; Name = "alan2off"
|