ForeSub: String;
The ForeSub property determines name of the macro that creates a dictionary.
The macro must be implemented in
A procedure located in any repository unit/form/assembly and having one of the following signature can be used as custom macro:
Sub UserMacro(UserDim: IUserDimension; Builder: IDimBuilder);
Sub UserMacro(UserDim: IUserDimension; Builder: IDimBuilder; Param: IMetabaseObjectParamValues);
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: