|
发表于 2002-9-13 21:42:00
|
显示全部楼层
ADDLAYER:
' This example creates a new layer called "New_Layer"
Dim layerObj As AcadLayer
' Add the layer to the layers collection
Set layerObj = ThisDrawing.Layers.Add("New_Layer")
' Make the new layer the active layer for the drawing
ThisDrawing.ActiveLayer = layerObj
' Display the status of the new layer
MsgBox layerObj.name & " has been added." & vbCrLf & _
"LayerOn Status: " & layerObj.LayerOn & vbCrLf & _
"Freeze Status: " & layerObj.Freeze & vbCrLf & _
"Lock Status: " & layerObj.Lock & vbCrLf & _
"Color: " & layerObj.Color, , "Add Example"
Return |
|