![]() |
#1
|
|||
|
|||
![]()
Hi everyone,
I started scripting VB for the first time ever, as part of my project in Corel PhotoPaint. I am trying to write code to draw 2 lines as part of a crosshair. So far I have successfully extracted the coordinates (x1,y1,x2,y2) and (x3,y3,x4,y4) from a textfile as part of the procedure in the module. I want to use these coordinates to draw 2 lines (as objects), with the above-mentioned coordinates on to the background image. This is the code I have tried to use: Call Application.CorelScript.LineTool(3, 0, 0, 0, 0, 0) Call Application.CorelScript.StartDraw(x1, y1, 0, 0, 0, 0) Call Application.CorelScript.ContinueDraw(x2, y2, 0, 0, 0, 0) Call Application.CorelScript.EndDraw Call Application.CorelScript.LineTool(3, 0, 0, 0, 0, 0) Call Application.CorelScript.StartDraw(x3, y3, 0, 0, 0, 0) Call Application.CorelScript.ContinueDraw(x4, y4, 0, 0, 0, 0) Call Application.CorelScript.EndDraw However, the macro terminates at line 2 of the code above (the startdraw line). The error message is: Run-time error 1002: You need an open document for this operation It says this, even though the image I want to work with is already open :? Any ideas on how I can solve this problem? Thank you all in advance. |
#2
|
|||
|
|||
![]()
Hi guys,
I just wanted to say that I am using version 12 (I downloaded the full trial version from the corel website). Also, I am not able to look at any of the VBA gms files on the oberonplace.com website. I tried copying the files to the directory suggested and i still can't see it in the play macro window. Please help me solve this problem of creating the crosshair. Thanks, Ash. |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Suggestion - palette from existing drawing | Webster | CorelDRAW/Corel DESIGNER VBA | 3 | 22-10-2004 03:18 |
document name and created date in Corel drawing | eric | CorelDRAW/Corel DESIGNER VBA | 5 | 14-09-2004 22:17 |
Corel9Script- how to use Gamut alarm to modify a drawing? | Kitemaker | CorelDRAW CS | 1 | 30-06-2004 16:04 |