Most of the replies you got are from people who
don't seem to understand the problem at all or the fact that using a GUID or
other 'unique' string attached to an object's XData doesn't work, because
when you copy an object within the same drawing, the ummmm 'unique'
identifier is copied along with it, and hence, it is duplicated and
therefore no longer unique.
In order to implement your own 'unique' identifier that is guaranteed to be
unique within a drawing (or across several drawings), you must handle deep
clone events on the Database, and in the handler of the event, you must
*change* the unique identifier in the cloned object.
However, even with that, the approach being suggested still does not work,
because:
1. COPYCLIP + PASTECLIP has no deep clone context, even though the
result is identical to using the COPY command.
2. If the drawing is edited without your application loaded, then the
simple act of copying an object with one of the so-called 'unique'
identifiers results in two or more objects with the same 'unique' identifer,
and when your app does get control back again, it has no way of knowing
which of the multiple objects with the same 'unique' identifier is the
original, and which are the copies of it.
3. It takes much longer to locate an object given the 'unique'
identifier, as opposed to using handles.
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009
http://www.acadxtabs.com
Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm
Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");
wrote in message news:6190507@discussion.autodesk.com...
Thanks a lot everyone. All posts have been useful for me. XDATA are very
interesant, and I will use it. Best regards Danijel Ivankovic
Edited by: Discussion_Admin on May 29, 2009 10:23 AM