In Macro-Typicals you organize the macros that you require for your project documentation and specify rules for these usage. A Macro-Typical represents the technical context of one product function. Select the Macro-Typical that you wish to edit in the sidebar.
Preconditions:
- You have opened the Macro navigator in the EPLAN platform.
- You have called the dialog Designer and are in the editing mode of a Macro-Typical.
Adding a macro to a Macro-Typical
- In the Macro navigator mark the macro that you want to add to the Macro-Typical.
- Click the
Add macro button in the workspace.
- The macro is added at the end of the list of Elements.
or
- In the list of Elements click the
button of the element under which you want to add the macro. - The macro is added under the element.
Note:
- The representation type and variant of each macro are displayed in the list of the Elements at the end of the macro path.
- You can also add several macros at once to a Macro-Typical.
Tip:
Change the position of an element in the list by dragging-and-dropping it upward or downward.
Specifying the usage of a macro
- Click the desired macro in the list of Elements in the workspace.
- The view is extended with the structure and variable information that exists in the macro.
- Select one of the following options:
- Active button: The macro is always used when the project documentation is generated. It is not displayed in the Project Builder.
- Configure button: An additional input field is displayed. If you enter nothing there, the engineer determines in the Project Builder whether the macro is used when the project documentation is generated. It is displayed in the Project Builder.
- Configure button: An additional input field is displayed. Control the usage of the macro with a configuration variable. Enter a corresponding formula, for example =Macro-1==''Generate'.
Whether a macro is used during the generation of the project documentation in the Project Builder or not depends on the decision of the engineer. The engineer requires a selection option. This selection option is provided through a configuration variable that is referenced through a formula with the status of the macro. This controls the usage of the macro in the Macro-Typical during the generation of the project documentation.
Precondition:
You have added a macro to the Macro-Typical.
Procedure:
- Create a configuration variable Macro-1 of the string type, the displayed name Status and the pre-defined values Generate and Do not generate.
- The configuration variable is displayed to the engineer in the Project Builder. The engineer can set the value of Macro-1 to Generate or Do not generate.
- Enter the formula =Macro-1==''Generate' in the input field next to the Configure button in the extended view of the macro.
- You have thus made the generation of the macro dependent on the value of the variable Macro-1. Only if the engineer in the Project Builder sets the value to Generate, is the macro used during the generation of the project documents.
Specifying the position of a macro
You can specify the position on the schematic page at which window and symbol macros are to be placed. To this purpose you enter an X and Y coordinate or you let the position be calculated automatically with a formula. The position specification is effected in the measurement unit selected by you and always references the bottom left-hand corner of the schematic page.
- Click the desired macro in the list of Elements in the workspace.
- The view is extended with the structure and variable information that exists in the macro.
- Click the From macro button under Position if the macro is to be placed at the position that is stored in the macro.
or
- Click the Absolute button if the macro is to be placed at a different position.
- Two new input fields are displayed next to the Absolute button.
- Enter the X and Y coordinates at which the macro is to be placed. Alternatively you can specify the formulas that are used to calculate the coordinates.
- The macro is placed at the desired position.
Note:
The absolute position specification always references the insertion point of a macro.
Placing macros sequentially
You can place macros sequentially next to each other without specifying absolute positions. You place the first macro on the insertion point that is stored in the macro. For the following macro you specify the direction and the distance in which it is to be placed. Relevant for the calculation of the position of the following macro is always the edge of the macro box of the preceding macro.
- Click the desired macro in the list of Elements in the workspace.
- The view is extended with the structure and variable information that exists in the macro.
- Activate the Sequential button.
- A drop-down list and an input field are displayed.
- From the drop-down list select the direction in which the macro is to be placed.
- In the input field enter the distance in which the next macro is to be placed.
- The position is calculated automatically and the macro is placed correspondingly.
Three macros are placed. Macro No. 1 is to be placed on its original insertion point. Macro No. 2 is to placed at a distance of 20 mm to the right next to Macro No. 1. Macro No. 3 is to be placed with a distance of 30 mm to the right next to Macro 2.
Preconditions:
- You have added three macros to the Macro-Typical. For the first macro you have activated the From macro button under Position.
- All the macros are placed on the same schematic page.
Procedure:
- In the extended view of Macro No. 2 activate the Sequential button, select the direction Right, and enter a distance of 20 mm.
- The X coordinate is calculated automatically. Macro No. 2 is placed with a distance of 20 mm to the right-hand edge of the macro box of Macro No. 1. The Y coordinate is taken unchanged from the macro.
- In the extended view of Macro No. 2 activate the Sequential button, select the direction Right, and enter a distance of 30 mm.
- The X coordinate is calculated automatically. Macro No. 3 is placed with a distance of 30 mm to the right-hand edge of the macro box of Macro No. 2. The Y coordinate is taken unchanged from the macro.
Notes:
- For the first macro that you wish to place on a schematic page activate the From macro button under Position. The Sequential button is always deactivated for the first macro because no starting point is defined that can be used for calculation.
- The coordinate that is not calculated through your direction selection is imported unchanged from the macro.
- Only window (*.ema) / symbol macros (*.ems) can be placed sequentially.
Specifying default values for variables of a macro
- Click the desired macro in the list of Elements in the workspace.
- The view is extended with the structure and variable information that exists in the macro.
- Under Structure enter a value only in those fields that are to have a fixed default value. Alternatively you can have the individual structure identifiers calculated with a formula.
- All the fields into which you enter a value are not displayed in the Project Builder.
or
- Activate the From macro check box in order to use the values of the structure identifiers that are available in the macro.
- No structure identifiers are displayed for configuration in the Project Builder.
- Under Variables enter a value only in those fields that are to have a fixed default value. Alternatively you can have the variables of a macro calculated with a formula.
- All the fields into which you enter a value are not displayed in the Project Builder.
Notes:
- If no values are specified for structure identifiers, the macro inherits the values of the preceding macros. This does not apply for the first macro in the list. If an inherited value exists, it is displayed in the corresponding field of a grayed-out text.
- All the macros in which the same structure identifiers are used are represented indented in the workspace. When you click a macro in the workspace, all the macros that use the same structure identifier are highlighted in color.
Using the graphical preview for macros
- In the list of the Elements in the workspace click the
button next to the macro that you want to view in the graphical preview of the EPLAN platform.
- The macro is displayed in the graphical preview.
Duplicating a macro in a Macro-Typical
- Click the
button next to the macro that you want to duplicate in the list of the Elements in the workspace.
- The duplicate is added under the selected macro. In the process all data on position, structure and variables of the macro are applied. The name of the macro is not changed.
Removing a macro from a Macro-Typical
- Click the
button next to the name of the element that you want to remove in the list of the Elements in the workspace.
Read more
Configuration variables: Basics
