private static void Group_ObjectClosed(object sender, ObjectClosedEventArgs e) { if (erasingGroupId == ObjectId.Null) { return; } Database db = HostApplicationServices.WorkingDatabase; using (Transaction trans = db.TransactionManager.StartTransaction()) { Group g = trans.GetObject(erasingGroupId, OpenMode.ForWrite) as Group; erasingGroupId = ObjectId.Null; g.Erase(); trans.Commit(); } }
void BaseDBObject_ObjectClosed(object sender, ObjectClosedEventArgs e) { ObjectClosed(sender, e); }