Jump to content
Matteo Paolo Conte

RADStudio 10 Seattle v. 23 - Delphi - Corel Draw 2018 v.20 - OLE Automation

Recommended Posts

I need to command Corel Draw through OLE Automation. In older versions (both Corel Draw and Delphi) it was enough to import the Type Library. Now I'm trying but I can't because many errors appear.

I follow this procedure:

Component -> Import Component -> VCL for Delphi 32 -> Import a Type Library -> Corel - Corel Draw 20.1 Type Library (v.14.1)


-> Insert in ActiveX Palette page and flag "Generate Component Wrappers"

-> Install to New Package (I chose CorelDrawPkg.dpk as filename)


The IDE generate the unit CorelDRAW_TLB but the compilermresponds with 101 errors which I can't fix

 

Can anyone help me?

 

CorelDRAW_TLB.pas

Errors..txt

Share this post


Link to post

I dont have CorelDraw, but if you see on CorelDraw_TLB exists many error reported...

  • constructor Create(AOwner: TComponent); override; // --->  constructor Create(AOwner: TComponent);  {override; compile but "hide" ancestral constructor}   --> 101 errors goes to 56 errors
  • property Center: IVGSnapPoint read Get_Center write Set_Center;  ---> some methos does not exits on class declaration
    • others below, etc...
  •  

Share this post


Link to post
23 minutes ago, Matteo Paolo Conte said:

I don't actually know how to do

I think there may be some incompatibility between your RAD and the version of CorelDraw you have installed... So, Delphi may not be translating the information well...
Have you tried importing the CorelDraw lib in a more up-to-date version of Delphi? (ex. using a VM if dont have another pc, you can use a trial-edition for tests)

 

Quote

public

     constructor Create(AOwner: TComponent);       //override;   -> but this "hide" the ancestral method (from TOleServer or TComponent)

///

 

Edited by programmerdelphi2k

Share this post


Link to post
1 hour ago, Matteo Paolo Conte said:

the problem remains the same...

here Im using RAD 11.3 and using your new TLB, now, just 53 errros when trying compile it... as above, there are not many procedures in the classes imported from CorelDraw, and in your "CorelDRAW_TLB.pas" exists many errors informed by Delphi... 

    property Point1: IVGSnapPoint read Get_Point1 write Set_Point1;  <--- Set_Point1, does not exist in the class declaration, possibly due to the many errors encountered when Delphi tries to import them!

 

"VGCore_TLB.pas" compile without errors!

 

Edited by programmerdelphi2k

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×