Click or drag to resize

RuntimeManagerConvertValueToString Method

Converts a value from a Parameter or a Variable to the string representation of that value independent from the given target system.

Namespace:  OpenTestSystem.Otx.Runtime.Api
Assembly:  OpenTestSystem.Otx.Runtime.Api (in OpenTestSystem.Otx.Runtime.Api.dll) Version: 5.5.0.0 (6.1.0.31040)
Syntax
public string ConvertValueToString(
	Object value
)

Parameters

value
Type: SystemObject
The value which should be converted to a String

Return Value

Type: String
String representation of the value.

Implements

IRuntimeManagerConvertValueToString(Object)
Examples
Display all parameters.
C#
static class Program
{
    static void Main()
    { 
        RuntimeManager rt = new RuntimeManager();
        rt.Load("C:\\Sample.ptx");
        IProcedure procedure = rt.GetMainProcedure();
        foreach (IParameter param in procedure.Parameters)
        {
            if (param is InParameter)
            {
                System.Windows.Forms.MessageBox.Show(rt.ConvertValueToString((param as IInParameter).Value));
            }
            else if (param is InOutParameter)
            {
                System.Windows.Forms.MessageBox.Show(rt.ConvertValueToString((param as IInOutParameter).Value));
            }
            else if (param is OutParameter)
            {
                System.Windows.Forms.MessageBox.Show(rt.ConvertValueToString((param as IOutParameter).Value));
            }
        }
    } 
}
See Also