ShowAdditionalAttributesDialog Command

Purpose

Open the dialog box to set values of additional attributes.

Parameters of Use

Command parameters are passed in the IUiCommandExecutionContext.Data property. Executing the command requires to specify the following values in the property:

Value type Description
Element 1: IMsModel Standard model.
Element 2: IRubricator Time series database.

Application Features

The Attribute Values dialog box can be opened for standard models if a time series database is a data source for output variable.

Example

Executing the example requires a form containing a button with the Button1 identifier.

It is required that the repository contains a modeling container with the MS_PLUGIN identifier containing a standard model with the DIMITERATOR identifier. A data source for output variable is a time series database with the TSDB identifier.

Add links to the Cubes, Fore, Metabase, Ms, UI system assemblies.

The example is a handler of the OnClick event for the Button1 button.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    Mb: IMetabase;
    MsKey: Integer;
    Model: IMsModel;
    Rubricator: IRubricator;
    Target: IUiCommandTarget;
    Context: IUiCommandExecutionContext;
    Arg: array 
Of Variant;
Begin
    
// Get current repository
    Mb := MetabaseClass.Active;
    
// Get model
    MsKey := Mb.GetObjectKeyById("MS_PLUGIN");
    Model := Mb.ItemByIdNamespace(
"DIMITERATOR", MsKey).Edit As IMsModel;
    
// Get time series database
    Rubricator := Mb.ItemById("TSDB").Edit As IRubricator;
    
// Get the Ms plugin
    Target := WinApplication.Instance.GetPluginTarget("Ms");
    
// Create a context to execute a command
    Context := Target.CreateExecutionContext;
    
// Create command parameters array
    Arg := New Variant[2];
    Arg[
0] := Rubricator;
    Arg[
1] := Model;
    
// Send command parameters array
    Context.Data := Arg;
    
// Execute the command
    Target.Execute("ShowAdditionalAttributesDialog", Context);
End Sub Button1OnClick;

After executing the example, clicking the Button1 button opens a dialog box to set values of additional attributes.

See also:

IUiCommandTarget.Execute