Hi.
In my plug-in I have some datagridview to show alignment data of all alignments in drawing.
I have a button called (regen) to update data in these datagridviews. I read again database drawing and re-source again datagridview. (method "upload_all")
I have read some posts and blogs about this:
http://adndevblog.typepad.com/autocad/2013/04/find-which-properties-changed-on-modified-event.html
http://www.theswamp.org/index.php?topic=43356.msg485953#msg485953
and about overrule:
http://adndevblog.typepad.com/infrastructure/2012/08/using-overrule-with-civil-3d-entities.html
But I don´t understand almost.
I only want to execute method "upload_all" if some alignment is modified in the drawing.
Also, I would like to do it if some alignment is just created or deleted.
How can I do it?
I have made this:
align.Erased += new ObjectErasedEventHandler(TypeViewer.TypeViewerControl.ProcesRegenAlin); // align.Reappended += new EventHandler(TypeViewer.TypeViewerControl.ProcesRegenAlin); //si se elimina del dibujo y se vuelve a recuperar con un "deshacer" ctrl+z //align.Unappended += new EventHandler(TypeViewer.TypeViewerControl.ProcesRegenAlin); align.Copied += new ObjectEventHandler(TypeViewer.TypeViewerControl.ProcesRegenAlin);
in Get_Alignments method that is fired when we open aplicattion or we change of active drawing.
(upload_all) method has been renamed as ProcesRegenAlin.
However I have this question:
Autocad has these events:
For "Modified" there are different events:
Modified Triggered when the object is modified.
and
ObjectModified Triggered when an object has been modified.
I like this last event "ObjectModified" because it says "it happens when object has been modified" while "Modified" event happens while(during) we are modifying object.
So, Civil 3D only has "Modified" event. Civil 3D doesn´t has "ObjectModified" and I want that.
I have tried with "SubObjectModified" but doesn´t happen anything.
Any ideas about how doing the "ObjectModified" event handler for Alignment objects in Civil 3D?
The "ObjectModified" event is only for AutoCAD objects yet.
I don´t want the "Modified" object to apply all DataBase because I want events on particular alignments, not all them.
Thanks.