OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > Corel Script > CorelDRAW CS

Thread Tools Search this Thread Display Modes
Old 09-12-2002, 09:43
Rick Randall
Posts: n/a
Default closing dockers/interactive toolbars to speed up a macro

yo--i have a conversion macro that opens the user selected .cdrs, exports them to various formats and closes them. it works great but it could be faster if i could figure out how to close all of the open dockers and the property bar while the macro is running and them re-open them when it's done. how do i do this?-----rick
Reply With Quote
Old 09-12-2002, 20:39
Alex's Avatar
Alex Alex is offline
Join Date: Nov 2002
Posts: 1,941
Blog Entries: 4
Default Re: closing dockers/interactive toolbars to speed up a macro


Are you working with CorelScript or VBA? You posted in the CorelScript forum while you are referring to a "macro".

If you are in VBA, have you tried the optimization settings?

Here is how you can speed things up alot:

Sub Test()
    Optimization = True
    EventsEnabled = False
    ActiveDocument.PreserveSelection = False

    ' Do something....

    EventsEnabled = True
    Optimization = False
End Sub
Here Opimization is the single biggest performance booster. It suppresses most of the screen updates including dockers/toolbars.
If you create/move/delete shapes a lot, then using EventsEnabled could save you some time because you will disable event firing (VBA will not receive events like Shape_Created, etc).

Finally when working with selected shapes, by default CorelDRAW always restores the previous selection when you access shapes directly (for example, using ActivePage.Shapes(1).Move 1, 0 will store the current selection, select the first shape on the page temporarily, move the selection (single object) and then restore the selection. Sometimes you may not want to keep the original selection and you can save some execution time by suppressing this behavior by using Document.PreserveSelection property.

I hope this helps.

However if you need this from CorelScript, then let me know, maybe I can come up with something...
Reply With Quote

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
New macro to clip curves w.r.t. a border Gerard Hermans Macros/Add-ons 0 09-06-2003 07:50
Speeding up a macro Rick Randall CorelDRAW/Corel DESIGNER VBA 2 12-12-2002 10:51

All times are GMT -5. The time now is 06:03.

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