ITsModelParam.Visible

Syntax

Visible: Boolean;

Description

The Visible property determines whether the parameter will be displayed on the parameters panel.

Comments

The property is sued on working with the calculation algorithm parameter.

Available values:

Example

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(0As 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:

ITsModelParam