ParametersSelectionSet: IDimSelectionSet;
ParametersSelectionSet: Prognoz.Platform.Interop.Dimensions.IDimSelectionSet;
The ParametersSelectionSet property determines element selection in free dimensions of the output variable.
Dimension is free if each element uses its own calculation method, that is, the Use One Specification checkbox is deselected.
To change selection of elements in free dimensions using the custom interface, use the Parameters panel.
Executing the example requires a form that contains the UiModel component with the UiModel1 identifier and the ModelBox component with the ModelBox1 identifier. UiModel1 is a data source for ModelBox1 and contains a loaded model. This model should have additional free dimensions.
Add a link to the Dimensions system assembly.
Sub UserParam;
Var
DimSel: IDimSelection;
Begin
// Get selection in the first free dimension
DimSel := ModelBox1.ParametersSelectionSet.Item(0);
// Reset the current selection
DimSel.DeselectAll;
// Select the first element
DimSel.SelectElement(0, False);
// Save changes
ModelBox1.SaveObject;
End Sub UserParam;
Example execution result: calculation method is displayed for the model, which is set for the first element of free dimension.
The requirements and result of the Fore.NET example execution match with those in the Fore example. Use Fore.NET analogs instead of Fore components.
Imports Prognoz.Platform.Interop.Ms;
Imports Prognoz.Platform.Interop.Dimensions;
…
Public Sub UserParam();
Var
DimSel: IDimSelection;
Begin
// Get selection in the first free dimension
DimSel := modelBoxNet1.CtrlBox.ParametersSelectionSet.Item[0];
// Reset the current selection
DimSel.DeselectAll();
// Select the first element
DimSel.SelectElement(0, False);
// Save changes
modelBoxNet1.CtrlBox.SaveObject();
End Sub UserParam;
See also: