Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Don't work ActivePage.Guides(cdrAllGuides).RemoveAll

16 views
Skip to first unread message

Kostya

unread,
Sep 4, 2004, 8:56:49 AM9/4/04
to corel.graphic_apps.draw-script

If you will to try remove a guideline from your corel document you need to know.

Don't works

ActivePage.Guides(cdrAllGuides).RemoveAll

Nor

ActiveDocument.Pages(0).Guides(cdrAllGuides).RemoveAll

Thus you need to do it that:

For Each sh In CorelDoc.Pages(0).Guides(cdrAllGuides)
sh.Delete
Next sh

Because

For Each sh In ActiveDocument.ActivePage.Guides(cdrAllGuides)
sh.Delete
Next sh

Don't works too.

"I'm going to slightly mad..." :)

---Kostya

PC CD12, SP1, WinXP Pro SP1


Peter Clifton

unread,
Sep 4, 2004, 1:09:41 PM9/4/04
to corel.graphic_apps.draw-script

Kostya spoke unto the group and said...

>
> If you will to try remove a guideline from your corel document
> you need to know.

Don't know why this works and the other methods fail, however I am sure
Alex will be along sometime to explain. Anyway....

Using my brute force and ignorance approach to programming, I looked the
the various examples in the help file and saw this starting method for
finding out how many of each guideline type there are on a page and
substituted the reporting code with s.delete

HTH

Peter

Sub DeleteGuides()
Dim s As Shape

For Each s In ActiveDocument.Pages(0).Guides(cdrAllGuides)
s.Delete
Next s

End Sub

Sakis

unread,
Sep 5, 2004, 12:50:48 PM9/5/04
to corel.graphic_apps.draw-script

There are many many functions in latest Corel releases that don't work any
more. Class interfaces and TLB appear ok but some class memeber just don't
work.
I was mad too, because of this weird situation. After many bug reports sent
to Corel, they promised that they will fix it in v12 sp1.
Unfortunately they don't (as always), sp1 is out and corrects nothing. Corel
really f***ed all my commercial scripts.
Sometimes i wonder why all of us still playing with this bug-collection
named CorelDraw.

Sakis

"Kostya" <d-signer...@cnews1.corel.dmz (there add 'at' sign)> wrote in
message news:4139b56a_1@cnews...

Peter Clifton

unread,
Sep 5, 2004, 2:52:16 PM9/5/04
to corel.graphic_apps.draw-script

Sakis spoke unto the group and said...

>
> There are many many functions in latest Corel releases that don't work any
> more. Class interfaces and TLB appear ok but some class memeber just don't
> work.

Have you visited Alex Vakulenko's Draw VBA forums at

http://www.oberonplace.com/

When things haven't worked as expected for me, he has been really
helpful.

Peter

Sakis

unread,
Sep 6, 2004, 4:53:21 AM9/6/04
to corel.graphic_apps.draw-script

I know that forum, actually i'm a member. Alex is very helpfull, but that's
not the case.
The problem is Corel people. After fifteen years using CorelDraw i cannot
stand it any more. Every single update, corrects only a few old bugs,
introducing tens of new ones.
Two years now, I've switched to Illustrator for my primary design jobs
because of Corels bugs, although i don't like Adobe user interface. Now i
think it's time to learn Adobe scripting API, removing Corel garbage from
our company's disks.
Sometimes i wonder how easy was for Corel people to kill such a nice
program. It's a shame !!!

Sakis

"Peter Clifton" <peterN_O_@S_P_A_M_clifton89.freeserve.co.uk> wrote in
message news:MPG.1ba570a55...@cnews.corel.ca...

Peter Clifton

unread,
Sep 6, 2004, 5:39:01 AM9/6/04
to corel.graphic_apps.draw-script

Sakis spoke unto the group and said...

> Two years now, I've switched to Illustrator for my primary design jobs

> because of Corels bugs, although i don't like Adobe user interface. Now i
> think it's time to learn Adobe scripting API, removing Corel garbage from
> our company's disks.

Then why post in a Corel technical support forum if you are not willing
to offer help in solving problems or providing useful workarounds.

Peter

"No good deed goes unpunished" - Clare Boothe Luce

Sakis

unread,
Sep 6, 2004, 6:46:11 AM9/6/04
to corel.graphic_apps.draw-script

Peter, I don't understand your post.
As i told you, i still use Corel creating scripted apps for our clients.
I've switched to Adobe for my own design jobs.
By the way, posting in a Corel newsgroup doesn't mean that i'm here only to
offer help but also asking for that.
Unless you mean that i have to like Corel :)

Sakis

message news:MPG.1ba6403de...@cnews.corel.ca...

Peter Clifton

unread,
Sep 6, 2004, 7:31:27 AM9/6/04
to corel.graphic_apps.draw-script

Sakis spoke unto the group and said...

> By the way, posting in a Corel newsgroup doesn't mean that i'm here only to

> offer help but also asking for that.

I saw nothing in your answer that offered help.

> Unless you mean that i have to like Corel :)

I saw nothing in your answer that indicated a light hearted post, only
another rant.

I do not know why some classes fail, however I took the time to find a
method that worked and posted what I believe to be a helpful response.

I may not be a Corel Evangelist/Guru, but I know that continued negative
posting, sometimes for no good reason, has consequences.

Have you any idea how depressing it is to use a package day in day out
and earn a living, spend hundreds, if not thousands of hours, trying to
help people do the same only to see a prolonged period of
harsh/destructive criticism change the whole dynamic of the groups.

Peter

Sakis

unread,
Sep 6, 2004, 8:12:10 AM9/6/04
to corel.graphic_apps.draw-script

> Have you any idea how depressing it is to use a package day in day out
> and earn a living, spend hundreds, if not thousands of hours, trying to
> help people do the same only to see a prolonged period of
> harsh/destructive criticism change the whole dynamic of the groups.

Yes Peter, i know that quite well. May i ask you if you know how annoying is
spending hours of working and finally loose your job because of countless
CARMs ?
Have you any idea how annoying is waiting years for simple bug fixes that
Corel never fixed ? Or loosing months of add-ins development, because of
undocumented Corel missing functions ? Or spending time and money, talking
with Corel tech people asking for help on various bugs.
Come on Peter, i'm sure you know quite well what i ment. I wish i knew
better English to describe my Corel experience, that's not an ordinary
application, it's an adventure.

Peter Clifton

unread,
Sep 6, 2004, 8:53:55 AM9/6/04
to corel.graphic_apps.draw-script

Sakis spoke unto the group and said...
>
> > Have you any idea how depressing it is to use a package day in day out
> > and earn a living, spend hundreds, if not thousands of hours, trying to
> > help people do the same only to see a prolonged period of
> > harsh/destructive criticism change the whole dynamic of the groups.
>
> Yes Peter, i know that quite well. May i ask you if you know how annoying is
> spending hours of working and finally loose your job because of countless
> CARMs ?

I can honestly say that has not been my experience, using CorelDRAW has
been and still is overwhelmingly positive experience.

Peter

Sakis

unread,
Sep 6, 2004, 9:49:15 AM9/6/04
to corel.graphic_apps.draw-script

> I can honestly say that has not been my experience, using CorelDRAW has
> been and still is overwhelmingly positive experience.

I really wish i had same positive experience as you Peter. Unfortunately i
had to switch to AI, something i never enjoyed because of Adobe's stiff user
interface.
Anyway, i respect your opinion. Just a few years ago, i'd agree with you :)

Sakis

Kostya

unread,
Sep 6, 2004, 10:56:36 PM9/6/04
to corel.graphic_apps.draw-script

As you knew Illustrator's object library is very poor in comparison with Corel's
one.

If you are choosing between CorelDraw and Illustrator you are choosing between
the lesser of two evils. But not of two goods.

Each of the vector editors has enough ideology-based solutions, tools, methds
and so on. For example: Corel denies to made artistic and paragraph text
stretching, while in Illustrator it's very useful feature. Adobe denies to made
commands for node works, even deleting a several nodes simultaneously, while in
CorelDraw it's makes your works more quick and more fine. And so and so and
so...

How can we influence the producers of program products?

---Kostya


Alex Vakulenko

unread,
Sep 6, 2004, 11:33:13 PM9/6/04
to corel.graphic_apps.draw-script

Sakis,

Can you be more specific on what kind of problems you have in CorelDRAW as
far as automation is concerned?

As far as I know, SP1 has fixed quite a few of problems and now Draw 12 is
quite good and stable, including VBA support...

Any more details would be appreciated.

Alex

Alex Vakulenko

unread,
Sep 6, 2004, 11:31:43 PM9/6/04
to corel.graphic_apps.draw-script

Kostya,

What you need to do is to call Delete method. RemoveAll just removes objects
from a ShapeRange obejct. It doesn't delete the shapes from the document.
This method is very useful when you use a ShapeRange as a temporary storage
for a set of shapes and when you want to reuse it for something else.

In your case, I would just use (in CorelDRAW 12):

ActiveDocument.MasterPage.Guides.Delete

I hope this helps.

Alex

"Kostya" <d-signer...@cnews1.corel.dmz (there add 'at' sign)> wrote in
message news:4139b56a_1@cnews...
>

Kostya

unread,
Sep 7, 2004, 9:48:13 PM9/7/04
to corel.graphic_apps.draw-script

Wow! Why I could not to read in Corel VBA Help the following:

"The RemoveAll method removes all shapes from the range.
The shapes are removed only from a specific range object and not from any other
ranges of which it may be a part.

The shapes are not deleted from the document." (c) Corel Corporation

I withdraw a petition.

Thanks Alex.

---Kostya

BTW

"Alex Vakulenko" <alexv@vakcer_dot_com> сообщил/сообщила в новостях следующее:
news:413d1e96$1_3@cnews...

0 new messages