IMetabaseObjectParams.Add

Syntax

Add: IMetabaseObjectParam;

Description

The Add method creates a new parameter.

Example

Executing the example requires that the repository contains an object with the OBJTEST identifier.

Sub UserProc;
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    Params: IMetabaseObjectParams;
    Param: IMetabaseObjectParam;
Begin
    MB := MetabaseClass.Active;
    MObj := MB.ItemById("OBJTEST").Edit;
    Params := MObj.Params;
    // Create parameter
    Param := Params.Add;
    Param.DataType := DbDataType.Integer;
    Param.Name := "Coefficient value";
    Param.DefaultValue := 100;
    // Save changes
    MObj.Save;
End Sub UserProc;

A new parameter is created for the specified object after executing this example. Integer numbers are specified as values for current parameter. The default value is 100.

See also:

IMetabaseObjectParams