IAlgorithmParamValue.Name

Syntax

Name: String;

None;

Description

The Name property determines a parameter name.

Example

Executing the example requires that the repository contains a calculation algorithm with the ALGORITHM identifier. The calculation algorithm should contain at least one parameter.

Add a link to the Calculation Algorithm Core custom assembly contained in the Calculation Algorithms component, and links to the Algo, Metabase, Transform system assemblies.

Sub UserProc;Sub UserProc1;
Var
    MB: IMetabase;
    MObj: IMetabaseObjectDescriptor;
    Algo: ICalcObject;
    CalcAlgo: ICalcAlgorithm;
    ParamValues: IAlgorithmParameterValues;
    ValueList: IAlgorithmParamValueList;
    Param: IAlgorithmParamValue;
    ParamType: String;
Begin
    MB := MetabaseClass.Active;
    
// Get calculation algorithm
    MObj := MB.ItemById("OBJ230551");
    Algo := CalcObjectFactory.CreateCalcObject(MObj, 
True);
    CalcAlgo := Algo 
As ICalcAlgorithm;
    
// Get collection of calculation algorithm parameters
    ParamValues := CalcAlgo.ParamValues;
    ValueList := ParamValues.Values;
    
// Get the first parameter and display its settings in the console
    Param := ValueList.Item(0);
    Debug.WriteLine(
"Name: " + Param.Name + '(' + Param.Id + ')');
    Debug.Indent;
    
Select Case Param.ParamType As Integer
        
Case 5: ParamType := "Dictionary elements selection";
        
Case 7: ParamType := "Alternative hierarchy";
    
End Select;
    Debug.WriteLine(
"Parameter type: " + ParamType);
    Debug.WriteLine(
"Dictionary: " + Param.LinkedObject.Name);
    
If Param.ParamType = TsParamType.Selection Then
        Debug.WriteLine(
"Number of elements selected by default: " + (Param.Value As IDimSelection).SelectedCount.ToString);
    
Elseif Param.ParamType = TsParamType.Hierarchy Then
        Debug.WriteLine(
"Alternative hierarchy key: " + Param.Value);
    
End If;
    Debug.Unindent;
End Sub UserProc1;

Not provisioned.

After executing the example the console displays settings of the first parameter:

Name: Planning version

Identifier: PLANNING_VERSION

Parameter type: Dictionary elements selection

Dictionary: Planning versions

The number of elements selected by default: 1

See also:

IAlgorithmParamValue