.NET

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

ObjectId value vs. Handle

402 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 (402 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 (402 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?

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community