Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA Pipeline Operations for Liquids

Map the custom strap_enum value to your plugin

  • Last UpdatedApr 24, 2025
  • 2 minute read

Extending strap_enum

Each plugin corresponds to a unique strap_enum value. With each plugin created, you must create a corresponding value in strap_enum by extending the enum in the schema. Refer to the following strap_enum_override.json example.

{

"name": "strap_enum",

"values": [

{

"name": "AT_CUSTOM_FORMULA",

"description": "Use Custom Volume Formula",

"value": 100

},

{

"name": "AT_NO_PLUGIN",

"description": "Use Custom No Plugin",

"value": 101

}

]

}

Place the file in %DNADataRoot%\RealTime\database\schema\enumerations\your_strap_enum_override_file_name.json.

Note: The name of the file does not matter if it does not conflict with an existing file in the same directory.

When deciding on the value of your custom strap_enum, make sure it does not conflict with any values in the baseline schema. For example, in the baseline, schema STRAP_LEGACY has a value of 0, and STRAP_EXTENDED has a value of 1.

Make sure to space out your custom values from the baseline in case new baseline values are added in the future. For example, if you create 3 strap_enum values with the values 100, 101, and 102, and the baseline schema eventually adds STRAP_NEW with a value of 2—there will not be any conflicting values.

Applying the schema extensions

After you have included your schema extensions, you can apply them by executing %DNAInstallRoot%\RealTime\bin\SchemaConverter.exe with RealTime shut down. Once applied, execute the following Advanced Database Editor (ADE) initialization commands in order to see the new enumeration values in ADE:

dbeditdisplayschemamerge -v -f schema

dnatreelayoutschemamerge -p ADE -f schema

Extending LMS.RealTime.json

To map your custom strap_enum value to your plugin, you need to add a settings file that links the strap_enum name to the assembly and class that implements ILevelAndVolumePlugin. Place the settings file in the %DNADataRoot%\RealTime\config\Settings\ directory. For an example, refer to LMS.RealTime_override.json.

Note: The name of the file does not matter if it does not conflict with an existing file within the same directory.

{

"LMS": {

"Tank": {

"LevelAndVolumePluginAssemblies": {

"AT_CUSTOM_FORMULA": {

"AssemblyName":

"OASySDNA.LMS.SDKTests.RealTime.Tanking.LevelAndVolumePluginExample",

"ObjectName":

"OASySDNA.LMS.SDKTests.RealTime.Tanking.LevelAndVolumePluginExample.ExamplePlugin"

}

}

}

}

}

Extending LMS_Extensions.json

The plugin is loaded using the standard OASyS extension architecture. To load your custom assemblies, create a .json file in the %DNADataRoot%\RealTime\config\Settings\ directory. For an example, refer to LMS_Extensions_override.json.

Note: The name of the file does not matter if it does not conflict with an existing file within the same directory.

{

"LMS": {

"Extensions": {

"Tank": {

"OASySDNA.LMS.SDKTests.RealTime.Tanking.LevelAndVolumePluginExample.dll": true

}

}

}

}

Applying the Changes

After extending LMS.RealTime.json and LMS_Extensions.json, restart the RealTime service for the changes to take effect.

In This Topic