<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Object data and Document events in AutoCAD Map 3D Developer Forum</title>
    <link>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/object-data-and-document-events/m-p/624923#M4983</link>
    <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I am trying to write some code that will automatically modify a field in an object data table whenever a new object is created from an existing one (for example, with the COPY command).&lt;BR /&gt;
&lt;BR /&gt;
I have tried writing code in the AcadDocument_ObjectAdded event but every time I attempt to modify the object data attached to the added object, the AttachTo method fails. I know the ObjectAdded event can be triggered many times when new objects are created in Autodesk Map and I have checked the TypeName of Object to ensure that I only attempt to modify object data when the object is of type IAcadObject, however this has not worked either.&lt;BR /&gt;
&lt;BR /&gt;
I would be grateful if anyone has any suggestions on how I might overcome this problem.&lt;BR /&gt;
&lt;BR /&gt;
I realise this question is not strictly an Autodesk Map question but I figured object data was only available in Autodesk Map so I would post it to this newsgroup.&lt;BR /&gt;
&lt;BR /&gt;
TIA,&lt;BR /&gt;
&lt;BR /&gt;
Scott</description>
    <pubDate>Wed, 04 Jun 2003 21:24:48 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2003-06-04T21:24:48Z</dc:date>
    <item>
      <title>Object data and Document events</title>
      <link>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/object-data-and-document-events/m-p/624923#M4983</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I am trying to write some code that will automatically modify a field in an object data table whenever a new object is created from an existing one (for example, with the COPY command).&lt;BR /&gt;
&lt;BR /&gt;
I have tried writing code in the AcadDocument_ObjectAdded event but every time I attempt to modify the object data attached to the added object, the AttachTo method fails. I know the ObjectAdded event can be triggered many times when new objects are created in Autodesk Map and I have checked the TypeName of Object to ensure that I only attempt to modify object data when the object is of type IAcadObject, however this has not worked either.&lt;BR /&gt;
&lt;BR /&gt;
I would be grateful if anyone has any suggestions on how I might overcome this problem.&lt;BR /&gt;
&lt;BR /&gt;
I realise this question is not strictly an Autodesk Map question but I figured object data was only available in Autodesk Map so I would post it to this newsgroup.&lt;BR /&gt;
&lt;BR /&gt;
TIA,&lt;BR /&gt;
&lt;BR /&gt;
Scott</description>
      <pubDate>Wed, 04 Jun 2003 21:24:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/object-data-and-document-events/m-p/624923#M4983</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2003-06-04T21:24:48Z</dc:date>
    </item>
  </channel>
</rss>

