ObjectModified error

ObjectModified error

Anonymous
Not applicable
357 Views
3 Replies
Message 1 of 4

ObjectModified error

Anonymous
Not applicable
When I use ObjectModified event to do something and following code causes error:
private void callback_ObjectModified(object sender, ObjectEventArgs e)
{
try
{
using (Transaction trans = HostApplicationServices.WorkingDatabase.TransactionManager.StartTransaction())< br> {
/*do something*/
trans.commit();
}
}
catch (Exception ex)
{
/*do something*/
}
}

the code crash at StartTransaction(), then I cannot fix it.
Thanks for help
0 Likes
358 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
I don't think you can use transactions in that context.

What is it you're trying to do?

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2008
Supporting AutoCAD 2000 through 2008
http://www.acadxtabs.com

wrote in message news:5701662@discussion.autodesk.com...
When I use ObjectModified event to do something and following code causes error:
private void callback_ObjectModified(object sender, ObjectEventArgs e)
{
try
{
using (Transaction trans = HostApplicationServices.WorkingDatabase.TransactionManager.StartTransaction())< br> {
/*do something*/
trans.commit();
}
}
catch (Exception ex)
{
/*do something*/
}
}

the code crash at StartTransaction(), then I cannot fix it.
Thanks for help
0 Likes
Message 3 of 4

Anonymous
Not applicable
I want to update BlockReference.
0 Likes
Message 4 of 4

Anonymous
Not applicable
Store the id of the notifying object, and then
open it later, after the operation is complete

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2008
Supporting AutoCAD 2000 through 2008
http://www.acadxtabs.com

wrote in message news:5701711@discussion.autodesk.com...
I want to update BlockReference.
0 Likes