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

Problem with UNDO & MREDO

4 REPLIES 4
Reply
Message 1 of 5
Anonymous
512 Views, 4 Replies

Problem with UNDO & MREDO

Hi All,

I am using ADT and Xml. When an object ( Doors & Windows) is added, modified or deleted from the drawing then i am writing that information to the Xml file by using the Reactors. But when UNDO and REDO commands are used in between then is there any way to handle them just like reactors.

Thanks & Regards,
Basha
4 REPLIES 4
Message 2 of 5
MarkPendergraft
in reply to: Anonymous

I know you can set a commandflag at the beginning of your subm but i'm not sure if it disables undos during your command, or doesn't allow your command to be undone.
Message 3 of 5
Anonymous
in reply to: Anonymous

IMHO, You're taking the wrong approach by using reactors.

It's far easier to just scan the database when it is saved,
and update your external data there.

The only time I need to track changes to objects in 'near-
real-time', is when I need to update a user interface (like
a floating palette) to keep the view it displays in sync with
the contents of the drawing.

But, if the purpose is only to update external data like your
scenario, the better way is to just do it once when the file is
saved.


--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006/2007
http://www.acadxtabs.com

wrote in message news:5484625@discussion.autodesk.com...
Hi All,

I am using ADT and Xml. When an object ( Doors & Windows) is added, modified or deleted from the drawing then i am writing that information to the Xml file by using the Reactors. But when UNDO and REDO commands are used in between then is there any way to handle them just like reactors.

Thanks & Regards,
Basha
Message 4 of 5
Anonymous
in reply to: Anonymous

Hi Tony,

Thanks for your kind response. Actually i have a xml file with all information of the drawing. I am updating that Xml file whenever an Object is added, deleted or modified using Reactors(ObjectAdded, ObjectErased etc..). Now my problem are ...............

1) when i delete an object or add multiple objects and issued Undo and Redo commands then how can i update my Xml file (i want to update my Xml file with the drawing itself).

2)I have attached XData to the Objects. Suppose if i delete an Object which is having some XData attached. If i Undo is it possible to Read that XData in the ObjectReappended method. I am getting error like "eWasOpenedForRead".

3)What do you mean by Scanning the Database.

Hope u definitely have answers for me.Thanks in Advance

Best Regards,
Basha
Message 5 of 5
Anonymous
in reply to: Anonymous

>> I am updating that Xml file whenever an Object is added,
>> deleted or modified using Reactors(ObjectAdded, ObjectErased etc..).

Well, as I said previously, this approach to keeping
external data in-sync is flawed and unreliable.

>> What do you mean by Scanning the Database.

When the document is saved, you just scan the entire
drawing and extract what you need and update the
external data.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006/2007
http://www.acadxtabs.com

wrote in message news:5487414@discussion.autodesk.com...
Hi Tony,

Thanks for your kind response. Actually i have a xml file with all information of the drawing. Now my problem are ...............

1) when i delete an object or add multiple objects and issued Undo and Redo commands then how can i update my Xml file (i want to update my Xml file with the drawing itself).

2)I have attached XData to the Objects. Suppose if i delete an Object which is having some XData attached. If i Undo is it possible to Read that XData in the ObjectReappended method. I am getting error like "eWasOpenedForRead".

3)What do you mean by Scanning the Database.

Hope u definitely have answers for me.Thanks in Advance

Best Regards,
Basha

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