Build the software development kit (SDK) examples solution
- Last UpdatedApr 24, 2025
- 2 minute read
Follow the procedure below to retrieve the source code and build the examples' extended libraries on your system.
To build the software development kit (SDK) examples solution
-
Set up the Test and Development System.
For more information around installation, please contact AVEVA Customer Support.
-
On the RealTime server in the Test and Development System, log on as dnaInstaller.
-
Install the RealTime.Service.msi file, if not already installed.
-
On the RealTime server in the Test and Development System, log on as a member of DNA Developers.
-
On the desktop, double-click the Windows PowerShell for DNA shortcut.
Windows PowerShell for DNA opens.
-
Create a RealTime Developer Environment (refer to the AVEVA Enterprise SCADA Shared Components Developer documentation).
-
To build all the examples, proceed as follows:
-
In Notepad, open the %DNASourceRoot%\RealTime\build.xml file.
-
Locate the <ItemGroup Label="Solutions"> element.
-
Add the following to the above element:
DataExport.Examples.sln
The updated section should look as follows:
<ItemGroup Label="Solutions">
<Solution Include="source\DataExport.Examples.sln" />
</ItemGroup>
-
Save and close the file
-
-
Select Start, and, in the Search field, enter Developer Command Prompt for Visual Studio.
-
Press Enter.
The Visual Studio Developer Command Prompt window opens.
-
Execute the following commands:
cd %DNASourceRoot%\RealTime
msbuild build.xml
Once msbuild completes successfully, the system will:
-
Copy the OASySDNA.RealTime.DataExport.ExamplePlugin.dll file to %DNADataRoot%\RealTime\bin.
-
Copy the OASySDNA.DataExport.UnitTests.dll file to %DNADataRoot%\RealTime\bin.
-
-
Copy the %DNASourceRoot%\RealTime\source\DataExport\RealTime_DataExport_SamplePlugin.json file to the %DNADataRoot%\RealTime\config\settings folder.
Note: For information on overriding default configuration settings, see Modify configuration settings.
-
Restart the RealTime service.
The sample code will watch for changes in the curval field of any analog record.
-
For this plugin to function, create at least one analog record and configure a simulator.
-
Test the code as follows:
-
Update the value in the simulator to 75.
The following message should appear in the oasErrLog.log file:
Field curval changed, DO EXPORT CODE HERE. Old value is 0 and new value is 75
-
Update the value in the simulator to 99.
The following message should appear in the oasErrLog.log file:
Field curval changed, DO EXPORT CODE HERE. Old value is 75 and new value is 99
-