Specify namespaces
- Last UpdatedFeb 19, 2026
- 1 minute read
- PI System
- AF SDK 3.2.0
- PI Server
You have to specify the namespaces you want to work with for a given DLL. For a given application, you must add the appropriate using statements at the top of the program to indicate the namespaces that the application will use frequently. The using statements you add depends on which DLL namespaces you want made available in a working program.
Note: When you run an application created with the 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 the AF SDK in addition to the DLLs. PI System Explorer must be installed on any computer that also runs an AF SDK application.
-
Using the Visual Studio editor, insert the following lines at the very top of your code:
using OSIsoft.AF;
using OSIsoft.AF.Asset;
using OSIsoft.AF.UnitsOfMeasure; -
For later class files or projects that you work on, here are examples of frequently used namespaces:
using OSIsoft.AF.Time;
using OSIsoft.AF.Data;
using OSIsoft.AF.EventFrame;