IDimMacroSelectionPrimitive.Macro

Fore Syntax

Macro: String;

Fore.NET Syntax

Macro: String;

Description

The Macro property determines the macro name that is used to form the selection schema.

Comments

The following format is specified for the macro name: <Module/form/assembly/.NET assembly identifier>.<Class name>.<Procedure name> or :<Module/form/assembly/.NET assembly key>.<Class name>.<Procedure name>.

The static procedure with the following signature can be specified as a macro to form the selection schema:

Public Shared Sub <procedure name>(<variable selection scheme>, <limiting group of elements>: IDimSelection);
Begin
    
End Sub <procedure name>

The first input item provides an access to the variable selection scheme. It contains a selection, obtained by the primitive implementation, added before the primitive.

The second item contains the selection of the transferred group of elements. Is used to limit selected items. If the group of elements is not specified, the parameter has the Null value.

NOTE. The group of elements is not indicated when opening the dictionary. The group of elements can be specified when using the IDimSelectionSchema.Process or IDimSelectionSchema.ProcessInplace methods.

Fore Example

This example is a macro used to form the selection schema.

Class Primitives: Object
    Public Shared Sub SelectionMacro(Selection, Group: IDimSelection);
    Begin
        If Group <> Null Then
            //Change the Selection schema according to the limiting Group of items
        Else
            //Change the Selection schema
        End If;
    End Sub SelectionMacro;
End Class Primitives;

The following code can be used to specify the path to the macro:

Var
    //...
    Scheme: IDimSelectionSchema;
    MacroPrimitive: IDimMacroSelectionPrimitive;
    //...
Begin
    //...
    Scheme := //Getting a selection schema
    //Creating a primitive
    MacroPrimitive := Scheme.Add(SelectionPrimitiveType.Macro) As IDimMacroSelectionPrimitive;
    MacroPrimitive.Macro := "MOD_MACRO.Primitives.SelectionMacro";

Fore.NET Example

This example is a macro used to form the selection schema.

Imports Prognoz.Platform.Interop.Dimensions;

Class Primitives: Object
    Public Shared Sub SelectionMacro(Selection, Group: IDimSelection);
    Begin
        If Group <> Null Then
            //Change the Selection schema according to the limiting Group of items
        Else
            //Change the Selection schema
        End If;
    End Sub SelectionMacro;
End Class Primitives;

The following code can be used to specify the path to the macro:

Var
    //...
    Scheme: IDimSelectionSchema;
    MacroPrimitive: IDimMacroSelectionPrimitive;
    //...
Begin
    //...
    Scheme := //Getting a selection schema
    //Creating a primitive
    MacroPrimitive := Scheme.Add(SelectionPrimitiveType.sptMacro) As IDimMacroSelectionPrimitive;
    MacroPrimitive.Macro := "MOD_MACRO.Primitives.SelectionMacro";

See also:

IDimMacroSelectionPrimitive