CreateVariable(Name: String;
GraphMeta: String;
Level: DimCalendarLevel;
Var VariableExists: Boolean;
[ParentKey: Integer = -1;]
[InCycle: Boolean = False]): IMsCalculationChainVariable;
CreateVariable(Name: string;
GraphMeta: string;
Level: Prognoz.Platform.Interop.Dimensions.DimCalendarLevel;
var VariableExists: boolean;
ParentKey: uinteger;
InCycle: boolean): Prognoz.Platform.Interop.Ms.IMsCalculationChainVariable;
Name. Name of the created variable.
GraphMeta. Graphical context.
Level. Calendar frequency of the variable.
VariableExists. Indicates that variable with the Name name and the Level frequency exists already in internal time series database.It is returned after executing the method
ParentKey. Parent element key.
InCycle.Indicates that variable is created in cycle.
The CreateVariable method creates a metamodel's internal variable.
The internal variable can be created, if IMsMetaModelVisualController.HasVariableRubricator is set to True, that is metamodel contains internal time series database.
The GraphMeta parameter can take the Null value.
Available values of the VariableExists parameter:
True. The variable exists in internal time series database.
False. The variable is absent in time series database.
If the ParentKey parameter is set to -1, the internal variable is created in metamodel root.
Available values of the InCycle parameter:
True.Variable is created in cycle.The method is used both to create variables in web application and to generate task from express report.On generating task in cycle, a lot of variable are added and it is possible to pass the step controlling whether this variable is present in the task.It is also possible to pass selection updating in slices and update it at the end of cycle.
False.Variable is created in standard mode.
The method use is given in the example for IMsMetaModelVisualController.HasVariableRubricator.
See also: