Run a CtAPI Application
- Last UpdatedJul 02, 2026
- 1 minute read
To run a CtAPI application, the program needs to be able to locate CtAPI.dll and its dependencies. There are several ways to achieve this:
-
If you are running your application on a computer where Plant SCADA is installed, you can copy your program and its dependencies to the Plant SCADA Bin directory.
-
You can copy the set of required binaries into the same directory as your application. These binaries are packaged in the files CtAPI.Win32.Redist.zip and CtAPI.x64.Redist.zip, which can be found in the following directory on the Plant SCADA installation media:
\AVEVA Plant SCADA2023\Extras\CtAPI
You will need to use this approach if you want to use CtAPI on a computer that does not have Plant SCADA installed.
-
If the above options are not possible (for example, you are using CtAPI from VBA in a Microsoft Office application such as Excel), then you can add the Plant SCADA Bin directory to the %PATH% environment variable. This allows your application to locate CtAPI.dll. However, certain dependencies will not be located this way because Windows will not use the path to locate .NET managed assemblies.
To resolve this, call the CtAPI function ctSetManagedBinDirectory with the path to the Plant SCADA Bin directory before your call to ctOpen. If Plant SCADA is not installed on the computer running the application, then extract the binaries from the above zip file to another directory and use that directory in place of the Bin directory.
Note: The connection between a remote CtAPI client and Plant SCADA is encrypted by default. For more information, see Configure a Secure Connection from a Remote CtAPI Application.