Entity name and handent

Entity name and handent

Anonymous
Not applicable
1,048 Views
1 Reply
Message 1 of 2

Entity name and handent

Anonymous
Not applicable

Hello, Community.

 

I confuse the relationship between entity name and handle.

I know that entity name (group code -1) resets when reopen drawing

Handle (group code 5) is fixed the own value.

However, handent lisp returns entity name base on a handle.

So I think that own handle value will be same as entity name even though reopen the drawing.

 

 

0 Likes
1,049 Views
1 Reply
Reply (1)
Message 2 of 2

_gile
Consultant
Consultant

Hi,

 

The handle is a persistant identifier unique per document.

The ename (or ObjectId) is a non persistant identifier unique per session.

 

That means, in the same session of AutoCAD, each time you open or create a drawing (document) AutoCAD generates a new ObjectId  for each object in this document which is different from all already created ObjectId in the session.

In each document AutoCAD keeps a link between each handle and the corresponding ObjectId in this session.



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

0 Likes