IForeMethod.Assembly

Syntax

Assembly: String;

Description

The Assembly property determines an identifier of the module that contains the custom method.

Example

Executing the example requires that the repository contains an area of the global parameters with the SHARED_P identifier. The repository should also contain the MY_FUNC_ASSEMBLY module that contains the PiDiv function.

Sub Main;

Var

mb: IMetabase;

Shp: ISharedParams;

UserMeth: IForeMethods;

uMethod: IForeMethod;

Begin

mb := MetabaseClass.Active;

Shp := mb.ItemById("SHARED_P").Edit As ISharedParams;

UserMeth := Shp.Methods;

UserMeth.Clear;

uMethod := UserMeth.Add;

uMethod.Assembly := "MY_FUNC_ASSEMBLY";

uMethod.Method := "PiDiv";

uMethod.Category := "My functions";

uMethod.Name := "'PiDiv function'";

uMethod.Description := "Value is divided by 'Pi'";

uMethod.ResultType := ForeResultType.Real;

uMethod.Type := ForeMethodType.Arithmetic;

Debug.WriteLine("Method key: " + uMethod.Key.ToString);

(Shp As IMetabaseObject).Save;

End Sub Main;

After executing the example a new PiDiv function contained in the MY_FUNC_ASSEMBLY module is added to the collection of custom methods.

See also:

IForeMethod