你刚才有什么代码?
我不知道你说的
这是直接来自acad帮助的什么意思
- Private Sub 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"
- End Sub
你可以随意运行它,它不会生成错误消息 |