OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Corel User Forums > CorelDRAW > General

Thread Tools Search this Thread Display Modes
Old 28-10-2010, 00:54
Posts: n/a
Default CorelDraw COM Automation "Undo" command

Hi ladies and gents,

I try to use the "Undo" command of several opened Draw documents. It seems there is a bug related to the "Undo" command if there are several opened documents, because the undo is always tied to the latest opened document.

The following steps should clearify the above mentioned issue.

Open Draw (12 or X3 or X4 or X5) and open 3 documents. Perform some drawing operations on each document. Afterwards switch the ActiveDocument through Com Automation (C#, C++, ....)


corel.ActiveDocument.Undo(1); // the undo command won't undo the latest command on document 1. instead it will undo the document opened last.

I hope somebody has experience in this field of CorelDraw automation

Kind regards Lela
Reply With Quote
Old 06-12-2010, 14:46
Craig Tucker
Posts: n/a
Default CorelDRAW Automation

Hi Lela,
Just a question - why would you need to issue an 'undo' under automation? I guess it depends on the application.

Anyhow, although Corel states it is multi-threaded - I have really never trusted that it truly is. Computers are cheap - I suggest setting up an asynchronous process on separate computers (if your volume is heavy) to pickup your request (ie. one at a time), process your document, and close it without saving and you should never have any multi-document issues.

If IsObject(mCor) Then
If lbDocOpen = True Then
mCor.Dirty = False
End If
Set mCor = Nothing
End If

HTH, Craig.
Reply With Quote
Old 06-12-2010, 17:36
shelbym's Avatar
shelbym shelbym is offline
Senior Member
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,790
Blog Entries: 13
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym

Originally Posted by Craig Tucker View Post
Anyhow, although Corel states it is multi-threaded - I have really never trusted that it truly is.
Just a note, X5 has made large improvements in the multi-threading. Saving and Printing are a few of the bigger ones.

Reply With Quote

com automation, undo

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Move objects to selected layer (either "a" or "b") 6fazer CorelDRAW/Corel DESIGNER VBA 3 07-03-2007 20:10
corelDRAW paragraph text mirror "bug" hellraeser General 2 09-03-2006 00:17
4DR Alex:) turn on/off "Snap to objects" & "snap location marks" from VBA wOxxOm CorelDRAW/Corel DESIGNER VBA 1 14-06-2005 13:12
using "importfromfile" command without file name d olympiatr CorelDRAW/Corel DESIGNER VBA 3 14-08-2004 03:39
All CorelDraw settings are locked on "null" ???? porteg CorelDRAW/Corel DESIGNER VBA 4 29-10-2003 20:17

All times are GMT -5. The time now is 04:55.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com