IUserDimension.ForeSub

Syntax

ForeSub: String;

Description

The ForeSub property determines a name of the macro that builds a dictionary elements tree.

Comments

A unit or form that contains macro implementation is set in the ForeModule property.

As a macro, the procedure is used that has one of the following signatures:

Sub UserMacro(UserDim: IUserDimension; Builder: IDimBuilder);
Sub UserMacro(UserDim: IUserDimension; Builder: IDimBuilder; Param: IMetabaseObjectParamValues);

Example

Executing the example requires that the repository contains a calculated dictionary with the USER_DIM identifier, and a unit with the MACRO_USER_DIM identifier. The CreateDimension procedure is implemented in the unit that is used to build a calculated dictionary element tree and has the appropriate signature.

Sub UserProc;
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    Dim: IUserDimension;
Begin
    MB := MetabaseClass.Active;
    MObj := MB.ItemById("USER_DIM").Edit;
    Dim := MObj As IUserDimension;
    Dim.ForeModule := MB.ItemById("MACRO_USER_DIM").Bind As IModule;
    Dim.ForeSub := "CreateDimension";
    MObj.Save;
End Sub UserProc;

After executing the example the MACRO_USER_DIM unit and the CreateDimension macro for dictionary building are set for the calculated dictionary.

See also:

IUserDimension