.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

how to find last created object in AutoCAD using COM in C#

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
VallimanalanT
1343 Views, 2 Replies

how to find last created object in AutoCAD using COM in C#

Hi,

Any one help, how to find last created object in AutoCAD using COM in C#

2 REPLIES 2
Message 2 of 3
_gile
in reply to: VallimanalanT

Hi,

 

You can get the last entity in model space using ModelSpace.Item(ModelSpace.Count - 1)

dynamic acdoc = doc.GetAcadDocument();
var modelSpace = acdoc.ModelSpace;
var lastent = modelSpace.Item(modelSpace.Count - 1);


Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

Message 3 of 3
VallimanalanT
in reply to: _gile

Thank you

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Forma Design Contest


Autodesk Design & Make Report