Specify namespaces
- Last UpdatedMay 16, 2023
- 1 minute read
- PI System
- AF SDK 2.10
- PI Server
You must specify which namespaces you want to work with for a given DLL. For a given application, you must add the appropriate statements at the top of the program to indicate the namespaces that the application will be using frequently.
Note: When you run an application created with AF SDK, the application dynamically calls AF SDK dynamic link libraries (DLLs); however, the application also requires some of the services that are installed with AF SDK in addition to the DLLs. Therefore, you must install PI System Explorer on any computer on which an AF SDK application is run.
Using the Visual Studio editor, insert the following lines at the beginning of the program:
using OSIsoft.AF;
using OSIsoft.AF.Asset;
using OSIsoft.AF.UnitsOfMeasure;
For later class files or projects that you work on, some other popular "usings" are:
using OSIsoft.AF.Time;
using OSIsoft.AF.Data;
using OSIsoft.AF.EventFrame;
The using statements you add depend on which of the many namespaces in a given DLL you want to have available to the program you are working on.