If you run LIST and pick an entity one of the listed bits of info is Handle.
Typically about four lines down the list. Is this what you want?
Regards, Charles Shade
CSHADEDESIGN | AUTOCAD LT | LT-KB | DYNAMIC BLOCKS
Please mark Accept as Solution if your question is answered. Kudos gladly accepted. ⇘
Welcome to the forums!
A little bit more explanation would be helpful. [Read the FAQ and How-To area; another good source of suggestions is here.] If you mean that you want to know the entity-data Handle of an object which you will select:
(cdr (assoc 5 (entget (car (entsel "\nSelect object: ")))))
or:
(vlax-get (vlax-ename->vla-object (car (entsel "\nSelect object: "))) 'Handle)
or:
(vla-get-Handle (vlax-ename->vla-object (car (entsel "\nSelect object: "))))