OberonPlace.com Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 24-02-2003, 13:47
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,940
Blog Entries: 4
Default Would you miss CorelScript object?

There are some talks about the possibility that CorelScript object could be completely removed from future versions of CorelDRAW's VBA object model. Would you miss it?

I mean, do you still use CorelScript object in your VBA macros? If so, what do you use it for? Does it provide something which can't be done through the native VBA object model?

Your input on this matter is highly appreciated.

Feel free to post your comments or pieces of code that you can't work around the CorelScript object...

Thanks.
Reply With Quote
  #2  
Old 25-02-2003, 09:57
MrClark
Guest
 
Posts: n/a
Default Would you miss CorelScript object?

Yes... Unless everything in the CorelScript had a direct EXPLAINED conversion to a VBA object. That is one of the biggest disappointments I have with Corel. I don't see how a company can release an incomplete product. Things like "Description of function goes here" are all over in the "Help" files. :? OK I'll get off my soap box now.
Reply With Quote
  #3  
Old 25-02-2003, 10:36
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,940
Blog Entries: 4
Default Re: Would you miss CorelScript object?

Quote:
Originally Posted by MrClark
Things like "Description of function goes here" are all over in the "Help" files.
Do you use Draw 10 or 11? Because in Draw 11's help file there aren't that many left. Also, there is a nice programming guide in PDF form which can be found in Programs folder of your CorelDRAW installation. The file name is dvba_pg.pdf (I know the file name could have been better ).

Do you mind telling me what exactly are you doing with CorelScript?
Reply With Quote
  #4  
Old 25-02-2003, 10:52
MrClark
Guest
 
Posts: n/a
Default

This is one example in CorelDRAW

With CorelScript
.CreateArtisticText sFaceName, 0, 0
.SetCharacterAttributes 0, Len(sFaceName) - 1, "Arial", 7, 360, 0, 0, 0, 0, 0, 0, 0, 2
.RotateObject 90000000, 0, 0, 0
End With

I'm having some difficulty converting things to VBA without adequate documentation not to mention the time to convert them.

I really don't have a problem with VBA. I was actually very excited when I found out version 10 had VBA back end. The problem is converting everything very little documentation. I will check out the pdf file. (Another little secret I knew nothing about.) :?

I'm just trudging along.
Reply With Quote
  #5  
Old 25-02-2003, 11:24
MrClark
Guest
 
Posts: n/a
Default Would you miss CorelScript object?

I was not able to find
Quote:
dvba_pg.pdf
. Is that 10 or 11?
Reply With Quote
  #6  
Old 25-02-2003, 12:27
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,940
Blog Entries: 4
Default

Quote:
Originally Posted by MrClark
With CorelScript
.CreateArtisticText sFaceName, 0, 0
.SetCharacterAttributes 0, Len(sFaceName) - 1, "Arial", 7, 360, 0, 0, 0, 0, 0, 0, 0, 2
.RotateObject 90000000, 0, 0, 0
End With
This particular sample is very straight forward and can be done easily in either Draw 10 or Draw 11. Here is how:

Draw 10:

Code:
Dim s As Shape

ActiveDocument.DrawingOriginX = 0
ActiveDocument.DrawingOriginY = 0
ActiveDocument.Unit = cdrTenthMicron

Set s = ActiveLayer.CreateArtisticText(0, 0, sFaceName)
With s.Text.FontProperties
    .Name = "Arial"
    .Style = cdrNormalFontStyle
    .Size = 36
End With
s.Text.AlignProperties.Alignment = cdrCenterAlignment

s.Rotate 90
Here setting DrawingOriginX & Y and Unit properties of the document is just for compatibility with coordinate system of CorelScript.

In CorelDRAW 11 you can achieve the same even simpler:

Code:
Dim s As Shape

ActiveDocument.DrawingOriginX = 0
ActiveDocument.DrawingOriginY = 0
ActiveDocument.Unit = cdrTenthMicron

Set s = ActiveLayer.CreateArtisticText(0, 0, sFaceName, , , "Arial", 36, cdrFalse, cdrFalse, , cdrCenterAlignment)
s.Rotate 90
As for the programming guide, you can download it from here:

http://www.corel.com/partners_develo..._developer.htm

Note that it is written for CorelDRAW 11, but most of it still applies to Draw 10.
Reply With Quote
  #7  
Old 25-02-2003, 12:41
MrClark
Guest
 
Posts: n/a
Default CorelScript object

ha ha ha.

I almost beat you. Here's what I came up with.

Dim sFaceName as String
Dim ssFaceName As Shape

sFaceName = "GRAPHICS_NAME_0000_V01"

ActiveLayer.CreateArtisticText 0, 0, sFaceName
Set ssFaceName = ActiveSelection.Shapes(1)
With ssFaceName.Text.FontProperties
.Name = "Arial"
.Style = cdrNormalFontStyle
.Size = 36
End With
ssFaceName.Rotate 90

Dueling programmers

Like I said I like the VBA option I just don't have a lot of documentation on it and a rather tight deadline. The object model link will help - Thanks much.

I would like to jump right over to 11 (I have it at home) but I have to go through the paperwork (and justify it) to get it done at work.
Reply With Quote
  #8  
Old 25-02-2003, 14:40
MrClark
Guest
 
Posts: n/a
Default Re: Would you miss CorelScript object?

This file:
Quote:
Originally Posted by Alex
The file name is dvba_pg.pdf
Is on the site you mentioned: (http://www.corel.com/partners_develo..._developer.htm)
has the pdf file.

Reply With Quote
  #9  
Old 01-03-2003, 12:39
BitPusher
Guest
 
Posts: n/a
Default

Alex,

I won't miss the CorelScrip object, because I won't be upgrading from Corel V7 and V10 until such time that I have witnessed with my own eyes that the deplorable state of the Corel VBA documentation in V10 and especially V11 has been completely and accurately corrected/updated.

Carl E. Johnson
Reply With Quote
  #10  
Old 02-03-2003, 23:38
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,769
Blog Entries: 9
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 Not with Documentation

I really would not miss the CorelScript Object if all the CorelScript commands were documented on how to do the same in VBA. For example if I looked up .SelectAllObjects it would be nice to see how to accomplish this in VBA. I know this can be done like this only because Alex has posted it. I would have never guessed it.

ActivePage.Shapes.All.CreateSelection

The key is good documentation. He is how it was done and how you can now do it. I really like VBA, it is so much faster.

Shelby
Reply With Quote
Reply


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
CDR12: refresh Object Manager docker after CreateSelection zlatev CorelDRAW/Corel DESIGNER VBA 2 05-03-2005 09:00
Bounding lines around an object toy4mud CorelDRAW CS 2 04-11-2004 11:56
Sorting entries in the object manager dan CorelDRAW/Corel DESIGNER VBA 1 18-08-2004 22:16
Transfer shapes from Draw to Paint; Using CorelScript in VB6 DWGraphics Corel Photo-Paint VBA 1 18-08-2004 20:49
How Do I set the PP object? andyb Corel Photo-Paint VBA 2 29-05-2004 23:04


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


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