Message 1 of 7
Get Last Entity
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Could someone point me in the direction of how to get the last entity created in a drawing?
In VBA, I did it this way:
Public Function entLast(Optional Layout As String = "Model", Optional Index As Long = 1) As AcadObject
Dim blk As AcadBlock
Set blk = ThisDrawing.Layouts(Layout).Block
Set entLast = blk.Item(blk.count - Index)
End Function
Thanks.
Chris