.NET

Reply
Active Contributor
ahmed.felix
Posts: 38
Registered: ‎08-31-2006
Message 1 of 3 (474 Views)

ObjectId value vs. Handle

474 Views, 2 Replies
09-29-2006 10:30 AM
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.
*Tony Tanzillo
Message 2 of 3 (474 Views)

Re: ObjectId value vs. Handle

09-29-2006 12:10 PM 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.
Valued Contributor
smcclure
Posts: 60
Registered: ‎06-08-2006
Message 3 of 3 (474 Views)

Re: ObjectId value vs. Handle

01-16-2007 08:08 AM 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?
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.