Matteo Paolo Conte 0 Posted July 3, 2023 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
programmerdelphi2k 237 Posted July 3, 2023 25 minutes ago, Matteo Paolo Conte said: Can anyone help me? where is the "VGCore_TLB.pas" Share this post Link to post
Matteo Paolo Conte 0 Posted July 3, 2023 Excuse me! Here it is.. VGCore_TLB.pas Share this post Link to post
programmerdelphi2k 237 Posted July 3, 2023 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
Matteo Paolo Conte 0 Posted July 3, 2023 Sorry... I don't actually know how to do the things you indicated... Share this post Link to post
programmerdelphi2k 237 Posted July 3, 2023 (edited) 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 July 3, 2023 by programmerdelphi2k Share this post Link to post
Matteo Paolo Conte 0 Posted July 4, 2023 I tried to install the trial of RADStudio 11 Alexandria on a VM and the problem remains the same... CorelDRAW_TLB.pas VGCore_TLB.pas Share this post Link to post
programmerdelphi2k 237 Posted July 4, 2023 (edited) 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 July 4, 2023 by programmerdelphi2k Share this post Link to post