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 page in the graphical editor.
- You have activated the check box When inserting window macros under the menu items Options > Settings > User > Graphical editing > Macros in the group box Open value set selection dialog for placeholder objects.
- Select the following menu items: Insert > Window macro / symbol macro. (In addition to this, window and symbol macros can also be inserted via the popup menu.)
- Select the desired macro in the selection dialog. The File type field can be used to select not only window (*.ema) or symbol macros (*.ems), but also each or both of the macro types(*.ema, *.ems).
- If a selected macro has variants, you can use the Variant drop-down list to specify which variant should be inserted.
- Click [Open].
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 under the Options > Settings > Projects > "Project name" > Devices > Numbering (online) menu items 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 Select macro dialog.
- Below the graphical preview of the dialog is a comments field. For window and symbol macros, the source project from which the macro originates is displayed here along with the description, if available. For window macros created from DXF / DWG files this field only displays a note regarding their "source" ("DXF" for macros from DXF files; "DWG" for macros from DWG files).
- 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 menu items: Page > Page macro > Insert
- In the selection dialog select the desired macro(s). (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 Select macro dialog.
- 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.
- Up to 12 pages are shown for page macros in the graphical preview of this dialog. The source project from which the macro originated is displayed below this graphical display in a comments field 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. - 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