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

ObjectId value vs. Handle

2 REPLIES 2
Reply
Message 1 of 3
ahmed.felix
1904 Views, 2 Replies

ObjectId value vs. Handle

In VBA ObjectId and Handle used to have different behaviors, Handle preserved its value when the drawing was closed and reopened later as opposed to ObjectId. In .NET things have changed and there's an ObjectId object that contains a Handle. I've noticed that ObjectId.ToString keeps the same value if I close AutoCAD and reopen a drawing later, but just to avoid any surprises and maybe get some new information: Is ObjectId a better substitution for the old VBA Handle than the new Handle itself? Or is there any reason why I would have (or want) to use Handle if all I need is a number/string to keep an object's identity in a file in order to refer to it at a later time? Thank you.
2 REPLIES 2
Message 2 of 3
Anonymous
in reply to: ahmed.felix

Nothing has changed.

An ObjectId is not permanent - It's essentially a memory address.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006/2007
http://www.acadxtabs.com

wrote in message news:5345717@discussion.autodesk.com...
In VBA ObjectId and Handle used to have different behaviors, Handle preserved its value when the drawing was closed and reopened later as opposed to ObjectId. In .NET things have changed and there's an ObjectId object that contains a Handle. I've noticed that ObjectId.ToString keeps the same value if I close AutoCAD and reopen a drawing later, but just to avoid any surprises and maybe get some new information: Is ObjectId a better substitution for the old VBA Handle than the new Handle itself? Or is there any reason why I would have (or want) to use Handle if all I need is a number/string to keep an object's identity in a file in order to refer to it at a later time? Thank you.
Message 3 of 3
smcclure
in reply to: ahmed.felix

How long is it safe to use an object ID? WIthin the transaction? Within the life of the database? Within the AutoCAD session?

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost