Object data and Document events

Object data and Document events

Anonymous
Not applicable
260 Views
0 Replies
Message 1 of 1

Object data and Document events

Anonymous
Not applicable
Hi,

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).

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.

I would be grateful if anyone has any suggestions on how I might overcome this problem.

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.

TIA,

Scott
0 Likes
261 Views
0 Replies
Replies (0)