IMsFormulaTransformVariable.Parameter

Syntax

Parameter: IMsModelParamAttributes;

Description

The Parameter property determines parameters to which variable corresponds.

Example

Executing the example requires that the repository contains a modeling container with the CONT_MODEL identifier. This container should include a model with the MODEL identifier.

Add links to the Metabase, Ms system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    cm: IMetabaseObjectDescriptor;
    Model: IMsModel;
    Transform: IMsFormulaTransform;
    InputsVar: IMsFormulaTransformVariables;
    Varabl: IMsFormulaTransformVariable;
    i: Integer;
Begin
    
// Get current repository
    mb := MetabaseClass.Active;
    
// Get modeling container
    cm := mb.ItemById("CONT_MODEL");
    
// Get model
    Model := mb.ItemByIdNamespace("MODEL", cm.Key).Bind As IMsModel;
    
// Set up model parameters
    Transform := Model.Transform;
    
// Set up method variables
    InputsVar := Transform.Inputs;
    Debug.WriteLine(
"Variables that are parameters:");
    
For i := 0 To InputsVar.Count - 1 Do
        Varabl := InputsVar.Item(i);
        
If Varabl.Parameter.Parameter.Id <> "" Then
            Debug.WriteLine(
"  " + Varabl.Id);
        
End If;
    
End For;
End Sub UserProc;

After executing the example the identifiers of variables that are the parameters are displayed in the console window.

See also:

IMsFormulaTransformVariable