Convert level increments to volume
- Last UpdatedApr 24, 2025
- 1 minute read
To convert a level increment to a volume
-
Invoke the StrappingTableService.ConvertIncrementsToVolume() method.
The following table details the parameters:
|
Name |
Type |
Description |
|---|---|---|
|
increments |
double |
The level increment value to be converted to a volume. |
The following table details the return value:
|
Type |
Description |
|---|---|
|
BLTResponse<double> |
A response package that contains an indication if the operation was successful or not, the error message (if applicable), and the converted volume value. |
Example:
using OASySDNA.LMS.Tank.Strapping;
using OASySDNA.LMS.Tank.Strapping.Common;
public void ConvertIncrementsToVolume(string strappingTableName, double increments)
{
var strappingService = new StrappingTableService(strappingTableName);
var response = strappingService.ConvertIncrementsToVolume(increments);
if (response.State != ResponseState.OK)
{
Console.WriteLine($"An error occurred when converting level to volume for table {strappingTableName}: ({response.State}) {response.FailureReason}");
}
else
{
Console.WriteLine($"The strapping table {strappingTableName} defines level {increments} as {response.Value} volume");
}
}