OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > CorelDRAW/Corel DESIGNER VBA

Thread Tools Search this Thread Display Modes
Old 31-07-2010, 10:00
Posts: n/a
Default Please help to confirm X5 bug

Hoping someone could verify what I believe to be a bug:

If you use .Separate in a macro, then Draw X5
doesn't close when you close the program -- need to
Cntrl+Alt+Delete to manually close the program.
That will continue to happen if you separate (break apart) an effect
group such as contour or drop shadow, whether you use a macro or not,
until you F8, at which time it will close ok as long as you don't use
.Separate in a macro again.

Pasted below is a sample test macro if anyone is willing to help verify this possible bug.
Thank You so much!!

Option Explicit

Sub test_separate()

Dim s As Shape, sr As ShapeRange
Dim rect As Shape
Dim cSr As ShapeRange
Dim e As Effect

Set rect = ActiveLayer.CreateRectangle2(0, 0, 5, 9, 0.1, 0.1, 0.1, 0.1)
rect.Fill.ApplyUniformFill CreateRGBColor(255, 255, 0)
Set e = rect.CreateContour(cdrContourOutside, 0.5, 1)
Set cSr = e.Separate
Set s = cSr(1)
s.Fill.ApplyUniformFill CreateRGBColor(255, 0, 0)

End Sub
Reply With Quote
Old 31-07-2010, 11:10
shelbym's Avatar
shelbym shelbym is offline
Senior Member
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,790
Blog Entries: 12
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
Default X5 Bug

Yep, I see the same thing with X5 SP1, I will get it reported so that hopefully it is fixed in the next service pack. THANKS.

Reply With Quote
Old 31-07-2010, 17:43
runflacruiser's Avatar
runflacruiser runflacruiser is offline
Senior Member
Join Date: Jun 2009
Location: Pigeon Forge, TN USA
Posts: 811

Did you find that Separate is the cause of the problem?
Reply With Quote
Old 03-08-2010, 21:34
SteveDude SteveDude is offline
Senior Member
Join Date: Dec 2005
Location: Salina, Kansas USA
Posts: 149
Smile ...


You might of just solved an ancient mystery. Might try the CorelScript equivelent. Seems to work when others fail.When Alex hears the word "CorelScript" he gets all worked up. So keep it quiet .

Reply With Quote
Old 07-08-2010, 11:51
jemmyell jemmyell is offline
Senior Member
Join Date: Jan 2005
Location: Orange County, California, USA, Earth, Solar System, Milky Way Galaxy
Posts: 157
Default something funny about this method...


I don't see this problem in my C++ implementation. I am able to generate single contours and separate them to shapes (curves) with no apparent problems.

I think you should try providing all the default parameters explicitly. Also, there are THREE UNDOCUMENTED parameters (in the X4 docs - I can't find Shape.Contour in the X5 help at all). They are:

EndCapType Specifies the end-cap type of the contour. This parameter is optional, and its default value is cdrContourSquareCap.

CornerType Specifies the corner type of the contour. This parameter is optional, and its default value is cdrContourCornerMiteredOffsetBevel.

MiterLimit Specifies the miter limit. This parameter is optional.

This is from the Curve.Contour method documentation.

The C++ code I am using is:

offset = dist;

steps = 1L;

outlineColor = NULL;

fill1 = NULL;

fill2 = NULL;

spacingAccel = 0L;

colorAccel = 0L;

miterLimit = 0.0;

eff = shp->CreateContour(CorelDRAW::cdrContourInside,offset,steps,CorelDRAW::cdrDirectFountainFillBlend,

// Get the contour shape that was created

tmpShapes = eff->Separate();

=James Leonard
-James Leonard
CNC Inlay Guy - www.CorelDRAWCadCam.com
Reply With Quote
Old 09-08-2010, 13:07
Posts: n/a

Thanks everyone!
I will wait for SP2, but in the meantime, I will try the CorelScript idea, but I really don't know how to convert it -- are there any simple ways or do I need to learn it?

Reply With Quote
Old 11-11-2010, 18:32
Posts: n/a

YAY!! SP2 fixed the separate issue. YAY!!

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

All times are GMT -5. The time now is 11:45.

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