Layer property example


Sub Layer_Example()
'This example returns the Layer property.
    Dim ents As Object
    Dim ent As AcadEntity
    Dim ct As Long
    Set ents = ThisDrawing.ModelSpace
    ct = ents.count
    Set ent = ents.Item(ct - 1)
    MsgBox "The Layer property for the last entity is: " & ent.Layer
End Sub

 


© Bricsys NV. All rights reserved.