Visible: Boolean;
The Visible property determines whether the parameter will be displayed on the parameters panel.
The property is sued on working with the calculation algorithm parameter.
Available values:
True. The parameter is displayed on the parameters panel.
False. The parameter is not displayed on the parameters panel. The last entered value of the default value specified in the ITsModelParam.DefaultValue property is used in the calculation.
Executing the example requires that the repository contains a calculation algorithm with the ALGORITHM identifier. Parameters are added in the calculation algorithm.
Add links to the Algo, Metabase, Ms, Transform system assemblies. Add a link to the assembly required to work with the calculation algorithm.
Sub UserProc;
Var
MB: IMetabase;
MObj: IMetabaseObjectDescriptor;
Algo: ICalcObject;
CalcAlgo: ICalcAlgorithm;
MetaModel: IMsMetaModel;
Params: IMsModelParams;
Begin
MB := MetabaseClass.Active;
// Get calculation algorithm
MObj := MB.ItemById("ALGORITHM");
Algo := CalcObjectFactory.CreateCalcObject(MObj, True);
CalcAlgo := Algo As ICalcAlgorithm;
// Get calculation algorithm parameters
MetaModel := CalcAlgo.MsProblem.MetaModel;
Params := MetaModel.Params;
Debug.WriteLine("Number of parameters: " + Params.Count.ToString);
If Params.Count > 0 Then
(Params.Item(0) As ITsModelParam).Visible := False;
// Save changes
CalcAlgo.SaveObject;
End If;
End Sub UserProc;
After executing the example, the first parameter added to the calculation algorithm will be hidden on the parameters panel.
See also: