Add a reference to the PC Automation COM library


Topic:

Prepare use of PC Automation from other environments


Guide:
[+] Delphi

The provided Delphi code example already has this reference set up (it includes Dpscad_TLB.pas) - you only need the steps below when starting a new project from scratch.

The one file that is needed to use PC Automation through OLE, is "Dpscad_TLB.pas".
If Delphi is installed, but not PC Automation, then Delphi can't generate that file itself, and therefore the user has to manually place that file in each project, that needs to communicate with PC Automation.
Furthermore, it has to be inserted in the units USE-clause.

If PC Automation and Delphi is installed on the same machine, Delphi can create that file itself by following these simple steps:

Step 1: Select "Component -> Import Component..."

Step 2: On the "Personality, Framework and Platform" page, select "VCL for Delphi Win32", and click Next

Step 3: On the "Type of Component" page, select "Import a Type Library", and click Next

Step 4: On the "Registered Type Libraries" page, select the newest version available of "PCschematic ELAutomation Library", and click Next

Step 5: On the "Component" page, leave the default values as they are, and click Next

Step 6: On the "Create Unit" page, choose "Create Unit", and click Finish

[+] Word®/Excel®

To make PC Automation accessible in Word® and Excel®, follow these steps:

Step 1: On the "Developer" tab, click "Visual Basic" (in the Code group) to open the VBA editor. If the "Developer" tab isn't visible, enable it first via "File -> Options -> Customize Ribbon".

Step 2: In the VBA editor, open the "Tools" menu and select "References..."

Step 3: In the References dialog, check "PCschematic ELAutomation Library". If more than one version is listed, pick the newest one - compare the Location field to tell them apart.

[+] Microsoft Visual Studio

The provided C# and VB code examples already have this reference set up - you only need the steps below when starting a new project from scratch.

To make PC Automation accessible in Microsoft Visual Studio, use the provided Dpscad.dll (found in the code-examples folder) and add a reference to it from inside your project:

Step 1: In Solution Explorer, right-click your project's References (or Dependencies) node and select Add Reference...

Step 2: Click Browse..., locate Dpscad.dll, and select it.

Step 3: Confirm the reference has been added, then build your project.