.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Identify features that have been processed by an UNDO/REDO operation

4 REPLIES 4
Reply
Message 1 of 5
diordonez
912 Views, 4 Replies

Identify features that have been processed by an UNDO/REDO operation

I have an application to maintain water/sewer networks in AutoCAD and a Relational Database.

 

How can I detect when the user performs UNDO or REDO, and identify what features have been affected by this operation, since I need to maintain integrity between CAD and Database.

 

That means if the user UNDO a water pipe creation I need to delete programmatically the same pipe in the database.

If the user REDO the pipe creation I need to recreate the pipe in the database.

4 REPLIES 4
Message 2 of 5
Hallex
in reply to: diordonez

My guess is create primary key as Handle of pipe,
then you would be able delete it from SQL /Access Database
using DatagridView or other control
Just an idea
_____________________________________
C6309D9E0751D165D0934D0621DFF27919
Message 3 of 5
diordonez
in reply to: diordonez

Thanks for your suggestion.

 

My real question is: How can I know that a pipe has been deleted as a consequence of the UNDO operation ? OR, how can I know that a pipe has been re-created as a consequence of the REDO operation.

 

Thanks

Message 4 of 5
Hallex
in reply to: diordonez

I think you may use doc.Database object events

Database db = doc.Database;

db.ObjectAppended+=...

db.ObjectErased+=...

db.ObjectModified+=...

db.ObjectReappended+=...

db.ObjectUnappended+=...

In every event you can perform operation that you need

to link with SQL / Access Database

Not tested actually,j ust a guess, sorry

_____________________________________
C6309D9E0751D165D0934D0621DFF27919
Message 5 of 5
diordonez
in reply to: diordonez

Thanks for the suggestion.

I'll test it and I'll let you know the results.

 

Regards.

 

Diego

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost