IMsFormulaTransform.CreateStringGenerator

Syntax

CreateStringGenerator: IMsTransformStringGenerator;

Description

The CreateStringGenerator method creates a generator of string representation of calculation options.

Example

Executing the example requires a form, a button with the identifier Button1 positioned on this form, the LanerBox component and the UiErAnalyzer component named UiErAnalyzer1 that is used as a data source for LanerBox. Working area of the time series database must be loaded to UiErAnalyzer1. The first series of working area must be computable.

Click the button to start executing of this example.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);

Var

Laner: ILaner;

Series: ILanerSeries;

CalcSerie: ILanerCalculateSerie;

TransformModel: IFormulaTransformModel;

FormulaTransform: IMsFormulaTransform;

StringGenerator: IMsTransformStringGenerator;

Inp: Integer;

Begin

Laner := UiErAnalyzer1.ErAnalyzer.Laner;

Series := Laner.Series;

CalcSerie := Series.Item(0) As ILanerCalculateSerie;

TransformModel := CalcSerie.Transform;

FormulaTransform := TransformModel.Transform As IMsFormulaTransform;

StringGenerator := FormulaTransform.CreateStringGenerator;

CalcSerie.Name := StringGenerator.Execute;

Inp := StringGenerator.Transform.Inputs.Count;

Debug.WriteLine("Input series number: "+Inp.ToString);

End Sub Button1OnClick;

After executing the example the string representation of its calculation options will be used as the name of the first series. The number of input series for the calculated series is displayed in the console window.

See also:

IMsFormulaTransform