To prepare the creation of macros, copies of the compressed project file Tutorial_P8.zw1 are created and variously re-saved.
The first copy (Template_Project.elk) is saved as an empty template. When the structure is generated, the macros of the page and sensors are inserted in this file.
The second copy (Macro_Project.elk) is saved as a macro project. This is used to create the macros for the page and the sensors:
Create path for macros:
- Start EPLAN Electric P8.
- Select Options > Settings.
- Navigate to User > Management > Directories.
- Specify the <EEC_Installation_Folder>\resources\Tutorial\P8 folder for the Templates.
- Specify the <EEC_Installation_Folder>\resources\Tutorial\P8 folder for the Macros.
- Confirm with [OK].
Enter instead of EEC installation Folder the folder where EEC is installed. The EPLAN Electric P8 projects are stored in the default folder.
Restore the project Tutorial_P8.zw1 :
- Select Project > Restore > Project...
- Select in the field Backup directory:
<EEC installation folder>\install\Tutorial\P8\Tutorial_P8.zw1
The file Tutorial_P8.zw1 is automatically entered into the field Projects .
- Enter into the field Project name the text Feeder.
- Confirm with [OK].
Create the first copy of the Feeder project:
- Select the Feeder project.
- Select Project > Copy.
The Copy project dialog opens.
- Select the Only header data option.
- In the Target project field, enter the file name:
Template_Project.elk
- Confirm with [OK].
Save the Template_Project project:
- Select the Template_Project project.
- Select Project > Back up > Project...
The Back up projects dialog opens.
- Select in the field Backup directory:
<EEC installation folder>\resources\Tutorial\P8
This directory should correspond to the path variable $(MD_MACROS).
- Confirm with [OK].
Create another copy of the Feeder project:
- Select the Feeder project.
- Select Project > Copy.
The Copy project dialog opens.
- If necessary, highlight the Entirely incl. report option.
- In the Target project field, enter the file name:
Macro_Project.elk
- Confirm with [OK].
Change the settings of the Macro_Project project:
- Highlight the Macro_Project project.
- Select Project > Properties...
The Project properties dialog opens.
- For the Type of project in the Value column, select Macro project.
- Confirm with [OK].
Create the macro template as a basic project:
- Highlight the Macro_Project project.
- Select Project > Organize > Create basic project.
The Create basic project dialog opens.
- Navigate to the following folder: EEC installation folder\resources\Tutorial\P8.
- Enter Macro_Template.zw9 into the File name field.
- Confirm with [Save].
Close the Feeder project:
- Select the Feeder project.
- Select Project > Close.
This completes all preparatory work.