Community
hello every one
this is my code that i have with problem
public class CADLogs : Autodesk.AutoCAD.Runtime.IExtensionApplication { public struct OpenedDocuments { public Autodesk.AutoCAD.DatabaseServices.Database cDocument ; public int Duration; } public Database curDwg = new Autodesk.AutoCAD.DatabaseServices.Database(); public DocumentCollection DwgIO = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager; public CADLogs() { //curDwg.ObjectModified += curDwg_ObjectModified; DwgIO.DocumentBecameCurrent += DocumentBecameCurrent; DwgIO.DocumentCreated += DocumentCreated; } private void DocumentBecameCurrent(object sender, DocumentCollectionEventArgs e) { curDwg = e.Document.Database; } private void curDwg_ObjectModified(object sender, ObjectEventArgs e) { Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("\n modified" + curDwg.Filename + ">>" + DateTime.Now.ToString()); } private void DocumentCreated(object sender, DocumentCollectionEventArgs e) { e.Document.Database.ObjectModified += curDwg_ObjectModified; curDwg = e.Document.Database; } public void Initialize() { curDwg = Autodesk.AutoCAD.DatabaseServices.HostApplicationServices.WorkingDatabase; curDwg.ObjectModified += curDwg_ObjectModified; } public void Terminate() { //MessageBox.Show("terminate"); } }
curDwg_ObjectModified works with first drawing only ,but when i open new drawing the event doesn't work , and i trying to solve this problem but i can't ..
can someone help me ??
this is the problem : if any person need to see the solve follow this subject