Macros can be inserted on project pages as window or symbol macros. New project pages are created when inserting page macros.
The macros are generally broken up when inserted, but it is still possible to change the data via the placeholder objects.
Insert window macros and symbol macros
Preconditions:
- You have opened a project page in the graphical editor.
- You have activated the check box When inserting window macros by means of the commands File > Settings > User > Graphical editing > Macros in the group box Open value set selection dialog for placeholder objects.
- Select the following commands: Insert center > Breadcrumb trail Home > Window macros / symbol macros.
- Using the folder structure navigate to the desired window macro / symbol macro.
- If the selected macro has variants, click in the top right in the preview tile of the macro on the icon for the number of variants.
All macro variants are displayed as tiles in the preview. - Click the tile of the required macro variant.
The macro is attached to the cursor and can be positioned wherever you want (single click).
If there are value sets present, please select a fitting value set for the placeholder object in the following Select value set - <Placeholder name> dialog. The inserted components contain the data from the value set.
If there are device tags in the DT macro, and you selected the With prompt option by means of the commands File > Settings > Projects > "Project name" > Device > Numbering (online) in the On insertion of macros and copies group box, EPLAN opens the Insertion mode dialog. Specify here how the device tags in the inserted macro should be numbered. - The macro is still attached to the cursor. Insert the macro again if you want.
- End the action via the Cancel action popup menu item or via the [Esc] button.
Notes:
- When positioning the macro with the mouse you can also use the additional following keys:
[Y] + mouse movement: The macro can only be moved horizontally at its original position (i.e., the position at which the macro was created).
[X] + mouse movement: The macro can only be moved vertically at its original position (i.e., the position at which it was created).
[Y] + [X]: The macro is fixed at its original position (i.e., the position at which it was created) and cannot be moved. - If there are variants in a macro, you can choose among the different variants when positioning the macro with the mouse. To do this press [Ctrl] and move the cursor in a circle. The various macro variants are displayed.
- When macros are inserted again, the most recently selected macro is preselected in the Insert center dialog.
- If the macro box is also to be inserted during the insertion of window or symbol macros, you have to activate the Also insert macro boxes project setting to do this. Alternatively you can individually determine for each macro during the preparation of the macros in the macro project whether the macro box is to be inserted or not. The setting at the macro box via the drop-down list Also insert macro box takes priority over the project setting.
Insert page macros
- Select the following commands: Tab Home > Command group Page > Drop-down button Page macro > Insert, or, alternatively, use the popup menu item Insert symbol macro in the page navigator.
- In the selection dialog select the desired macro(s). (A Multiple selection is possible for page macros!) When doing this, you can choose selection criterion window (*.ema) or symbol macros (*.ems) in the File type field in addition to page macros (*.emp).
- Click [Open].
- In the Adapt structure dialog you specify the placement of the new pages in the page structure of your project.
Depending on the number of page macros to be inserted this dialog is displayed several times - for each individual macro. - Click [OK]. The continuation of this process is the same as for copying pages (see Adapting the Structure).
The pages are created or overwritten.
Notes:
- When macros are inserted again, the most recently selected macro is preselected in the Open selection dialog.
- In the preview of this dialog the source project from which the macro originated is displayed along with the description and the number of pages, if available.
If you select an automatically-generated page macro, the Macro: description (ID 11057) property is displayed. If there are different descriptions stored in a page macro, only the description on the first page of the page macro is displayed. - If a placeholder object with value sets exists in a page macro, the subsequent dialog Select value set - <Placeholder name> is opened when page macros are inserted, provided the user-specific setting When inserting page macros is activated.
- The special property Macro: Inserted by is available in the page properties for inserting page macros (Category: "Macro"). When manually inserting a page macro, the user inserting the macro is automatically documented here.
Tip:
You can insert macros using drag & drop, by dragging a selected file from the Windows Explorer into the graphical editor or the page navigator of your project. Here too multiple selection is possible for page macros.
See also