IUiMetabaseObjectParams.UiObject

Syntax

UiObject: IUiMetabaseObject;

Description

The UiObject property determines the component connected with repository object, parameters of which should be controlled.

Comments

The list of available components includes all the components UiDimension, UiErAnalyzer, UiModel, UiReport, UiWorkspaceObject, UiMetabaseDataset located on the form.

Example

Executing the example requires a form with the Button1 button, the UiMetabaseObjectParams component named UiMetabaseObjectParams1, the component, which is controlled by UiMetabaseObjectParams1, and the components that are the control elements of the parameters values. Object parameters have the numerical values.

    Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
    Var
        UiObj: IUiMetabaseObject;
        Obj: IMetabaseObjectDescriptor;
        ParamValues: IMetabaseObjectParamValues;
        ParamValue: IMetabaseObjectParamValue;
    Begin
        UiObj := UiMetabaseObjectParams1.UiObject;
        Obj := UiObj.Object;
        ParamValues := Obj.Params.CreateEmptyValues;
        UiMetabaseObjectParams1.CollectValues(False, ParamValues);
        For Each ParamValue In ParamValues Do
            ParamValue.Value := ParamValue.Value + 1;
        End For;
        UiMetabaseObjectParams1.CollectValues(True, ParamValues);
        UiObj.Active := False;
        UiObj.Active := True;
    End Sub Button1OnClick;

If the user presses the button after executing this example, the collection of object parameters values assigned in the control elements is received. All values are increased by one, after that the control elements are updated and the object is reopened with new values of the parameters.

See also:

IUiMetabaseObjectParams