I don't think you can start a transaction from
this event. You can use ObjectId.Open() to open
objects, and ignore the warning.
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006/2007
http://www.acadxtabs.com
wrote in message news:5368594@discussion.autodesk.com...
When I use ObjectModified event to do something and following code causes error:
private void WorkingDatabase_ObjectModified(object sender, ObjectEventArgs e)
{
try
{
using (Transaction trans = HostApplicationServices.WorkingDatabase.TransactionManager.StartTransaction())
{
/*do something*/
trans.commit();
}
}
catch (Exception ex)
{
/*do something*/
}
}
the code crash at StartTransaction(), then I cannot fix it.
if I use TopTransaction replace the StartTransaction(), then the exception is eInprocesscommiting.
by the way, whether exist somewhere expose the transactionEnded event in Autocad managed class.
thanks for your help.
gyn