User Guide : Managing Macro Sets and Macros : Managing Local Macros for a Map or Process
 
Share this page                  
Managing Local Macros for a Map or Process
You can add, delete, edit, and duplicate local macros for a map or a process. A local value is always an overridden macro and is stored in the runtime configuration file.
You should never use local macros during design-time. Local macros are only applicable at runtime and they are automatically setup when execute action is called. If you need a local macro at runtime, you must set up a regular or global macro at design-time, test with that, then move those macros to local, run, save and move them to production.
To configure macros specific to a map or process:
1. In the map file or a process file, go to the Configuration tab > Macros section.
The Macro Sets section displays the available project-level macro sets and the Macros section displays the macros for a particular macro set.
2. You can add additional macro sets from the workspace-level macro sets. To do this,
a. Click icon.
A dialog box is displayed.
b. From Workspace Macro Sets, select the required macro set and click .
The selected macro sets are moved to Selected Macro Set section.
c. Click OK.
The macro sets are displayed in the Macro Sets section.
3. To add a macro to the macro set:
a. Click the macro set for which you want to add a macro and then click /download/attachments/24975421/Map_Mapping_AddField_Icon.png?version=1&modificationDate=1487964026526&api=v2.
A macro with the default name is added.
b. Click within the cells and specify the following information for the macro:
Macro Name - Type a unique name for the macro. The maximum number of characters is 198 and can include spaces.
Macro Value - If you want to assign a macro to a file or directory, click /download/attachments/24975421/SelectIcon_WithinField.png?version=1&modificationDate=1487964026604&api=v2 and specify the directory. If you are using the macro to store a text string, then type the value in this field.
Override - By default, it is No.
4. To edit a macros, change the Macro Name and/or the Macro Value.
5. To delete a macro:
a. Select the macro that you want to delete and click /download/attachments/24975421/Map_Source_Delete_Icon.png?version=1&modificationDate=1487964026588&api=v2.
A message asking for confirmation is displayed.
b. Click Yes.
The selected macro(s) are deleted
6. To duplicate a macro:
a. Select the macro that you want to duplicate and click /download/attachments/24975421/Map_Source_Copy_Icon.png?version=1&modificationDate=1487964026573&api=v2.
The selected macro is duplicated and appears with a numeral increment by 1 appended to the name.
b. Update the Macro Name and Macro Value.