Result from script

IContext.ScriptResults - User-calculated values that are displayed on the general script results tab and on the optimization results tab. This property is of type Dictionary. In which, the key is the name of the field, and the value is a double.

using TSLab.Script;
using TSLab.Script.Handlers;

namespace MyLib
{
    public class TestScriptResults : IExternalScript
    {
        public virtual void Execute(IContext ctx, ISecurity sec)
        {
            ctx.ScriptResults["My result 1"] = 111;
            ctx.ScriptResults["My result 2"] = 222;
        }
    }
}

Results tab:

Optimization Results tab:

Last updated