Community
Civil 3D Customization
Welcome to Autodesk’s AutoCAD Civil 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Civil 3D Customization topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Modified event (alignment)

2 REPLIES 2
Reply
Message 1 of 3
joantopo
416 Views, 2 Replies

Modified event (alignment)

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?

 

 

 

 

 

Autocad C3D 2019 SP3, 2020 & 2021
Intel I9 9900K with frontal watercooler alphacool eisbaer 360 (original fans mounted in pull)- 3 fans Corsair 120 ML PRO in push.
MOBO Gygabyte Z390 Aorus Master- Corsair RGB Vengeance 64GB RAM (4x16) CL16
Nvidia Quadro RTX 4000
Samsung 970 EVO PLUS 1TB (unit C). Samsung 970 PRO 512GB (for data)
Power Supply: Corsair TX850M PLUS


Descubre mi programa VisorNET para Civil 3D:
https://apps.autodesk.com/CIV3D/es/Detail/Index?id=appstore.exchange.autodesk.com%3avisornet_windows32and64%3aes
2 REPLIES 2
Message 2 of 3
joantopo
in reply to: joantopo

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:

http://docs.autodesk.com/ACD/2013/ENU/index.html?url=files/GUID-E30279D1-E4B5-48A4-A3D8-9CEC83BD0967...

 

 

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.

 

 

 

Autocad C3D 2019 SP3, 2020 & 2021
Intel I9 9900K with frontal watercooler alphacool eisbaer 360 (original fans mounted in pull)- 3 fans Corsair 120 ML PRO in push.
MOBO Gygabyte Z390 Aorus Master- Corsair RGB Vengeance 64GB RAM (4x16) CL16
Nvidia Quadro RTX 4000
Samsung 970 EVO PLUS 1TB (unit C). Samsung 970 PRO 512GB (for data)
Power Supply: Corsair TX850M PLUS


Descubre mi programa VisorNET para Civil 3D:
https://apps.autodesk.com/CIV3D/es/Detail/Index?id=appstore.exchange.autodesk.com%3avisornet_windows32and64%3aes
Message 3 of 3
joantopo
in reply to: joantopo

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.

 

 

Autocad C3D 2019 SP3, 2020 & 2021
Intel I9 9900K with frontal watercooler alphacool eisbaer 360 (original fans mounted in pull)- 3 fans Corsair 120 ML PRO in push.
MOBO Gygabyte Z390 Aorus Master- Corsair RGB Vengeance 64GB RAM (4x16) CL16
Nvidia Quadro RTX 4000
Samsung 970 EVO PLUS 1TB (unit C). Samsung 970 PRO 512GB (for data)
Power Supply: Corsair TX850M PLUS


Descubre mi programa VisorNET para Civil 3D:
https://apps.autodesk.com/CIV3D/es/Detail/Index?id=appstore.exchange.autodesk.com%3avisornet_windows32and64%3aes

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


 

Autodesk Design & Make Report