You can generate macros automatically in macro projects.
Tip:
You can automatically group the macros in the macro project before generation and / or automatically activate the handles. To this purpose select the menu items Project data > Macros > Prepare macros for automatic generation.
Generating window or symbol macros automatically
Preconditions:
- You are in a macro project.
- You have opened a page that contains objects (such as schematic cut-outs, graphics, etc.), from which macros are to be generated automatically.
- Select Insert > Box / connection point / mounting panel > Macro box.
- Use the mouse to drag the frame around the desired objects.
- Repeat these steps until all the macro boxes are defined.
- End the action via the Cancel action popup menu item or via the [Esc] button.
- Double-click a macro box.
The entry "Defining" is preset for the Type of usage drop-down list in the Macro box tab of the property dialog. This has the effect that the "Referencing" type of usage is assigned to the automatically generated macros when being inserted into a schematic and / or macro project, meaning that they can be updated if required. - Enter the data for the macro to be generated in this tab. In order for a macro to be generated you have to specify at least one macro name in the Name field. If you do not specify a file extension, a window macro (*.ema) is generated from the respective macro box. To generate symbol macros enter the macro name including the file extension (*.ems).
- Click [OK].
- Repeat Steps 5 - 7 for all further macro boxes.
- Select the menu items Project data > Macros > Generate automatically.
- Activate the Overwrite existing macros check box in the Generate macros automatically dialog if you want to overwrite existing macros during generation in the specified macro directory
- Click [OK].
The areas identified above the macro boxes are stored as window and / or symbol macros into the specified macro directory. When doing this the necessary data is taken from the macro box properties.
The result of the automatic generation is displayed in the System messages dialog.
Tip:
Macro boxes can also be drawn as polylines by using the MC2 symbol. To do so, select the symbol in the Symbol selection dialog and specify the starting point of the box by clicking the left mouse button inside the schematic. After you have specified all of the other points, complete the task via the Complete polyline popup menu item.
Generating page macros automatically
Preconditions:
- You are in a macro project.
- You have inserted objects on at least one page (e.g., schematic cut-outs, graphics, etc.), from which macros are to be automatically generated.
- Mark one or more pages in the page navigator.
- Select the Properties popup menu item.
- Specify the data for the macro to be generated in the Page tab of the Page properties dialog. In order to create a page macro, you have to specify at least one macro name in the Macro: Name property. In order to generate multi-page page macros enter the same macro name into the page properties of several pages in the respective tab Page.
- Enter any further data for the macro (such as Macro: Version) in the properties table on the Page tab.
- Click [OK].
- Repeat Steps 1 - 4 for all further page for which you want to generate page macros.
- Select the menu items Project data > Macros > Generate automatically.
- Activate the Overwrite existing macros check box in the Generate macros automatically dialog if you want to overwrite existing macros during generation in the specified macro directory.
- Click [OK].
The page macros (*.emp) are stored in the specified macro directory. When doing this the necessary data are taken from the page properties.
The result of the automatic generation is displayed in the System messages dialog.
Tip:
If you want to assign a prepared macro box or a prepared page to several macros, use the Macro definition tab. Enter the respective name and the description of the macros to be generated in the lines of this tab. During automatic generation the same content (same macro box or same page) is stored in several macros.
See also