You are on page 1of 24

Automating Project Actions

Automating Project Actions

EPLAN Training

Automating Project Actions

Creating a Simple Script in EPLAN .............................................................3


1.1

Create script..............................................................................................3

1.2

Select project actions................................................................................4

Automatically Processing a Project ............................................................6


2.1

Define active script....................................................................................6

2.2

Enter directory for log files ........................................................................6

2.3

Executing automated processing ..............................................................9

Automatically Processing Multiple Projects.............................................12

Extending a Script in the Editor.................................................................16

4.1

Connect the editor...................................................................................16

4.2

Edit script ................................................................................................17


Calling Up a Script from the Command Line ............................................21

This functionality is only available for certain module packages. Info

EPLAN Training

Automating Project Actions

Creating a Simple Script in EPLAN

The project actions to be automatically executed are defined in the script. Scripts are
stored on a per-project basis.
Precondition:
You have opened and selected a project in the Page navigator.
Utilities > Automated processing > Settings

1.1

Create script

1. In the Settings: Automated processing dialog click

EPLAN Training

(New).

Automating Project Actions


2. In the New script dialog, in the Name field, enter a meaningful name for the
script.

3. Click [OK].
The name of the script is entered into the Settings: Automated
processing dialog.

1.2

Select project actions

1. In the dialog Settings: Automated processing dialog select the script you
want to edit from the Script name drop-down list.

2. In the Available actions field, select a project action and then click

3. Once EPLAN has opened a dialog, define the settings for the selected project
action and click [OK].
The project action is entered into the Selected actions field.

EPLAN Training

Automating Project Actions


4. Select all of the project actions that you would like to automate, in the same
manner.

5. To define the sequence in which the project actions are to be executed, select
(Move up) or
a project action in the Selected actions field and click
(Move down), as many times as necessary until the element is in the
desired position.

6. Click

(Save).

The script is created.

7. Click [OK].

This functionality is only available for certain module packages. Info

EPLAN Training

Automating Project Actions

Automatically Processing a Project

To automatically process a project, in the settings, select a script from all the project
related scripts as the currently active script.
Preconditions:

You have opened a project.

You have created a script.

2.1

Define active script

1. Select the menu item Options > Settings > Projects > "Project name" >
Management > Automated processing.

2. Select the desired script from the Active script drop-down list.

2.2

Enter directory for log files

If you enter a different directory for an existing log file, the log file will not be
overwritten.

EPLAN Training

Automating Project Actions


1. Select the menu item Options > Settings > Projects > "Project name" >
Management > Automated processing.

2. Click [...] next to the Log file field.

EPLAN Training

Automating Project Actions


3. If you have not yet created a log file, in the [Open] dialog, select a storage
location and enter a file name with the type *.log.

4. If you have already created a log file, in the [Open] dialog, select the existing
*.log log file.

5. Click on [Open].

EPLAN Training

Automating Project Actions

2.3

Executing automated processing

1. Select the menu item Page > Navigator.

EPLAN Training

Automating Project Actions


2. Select a project in the page navigator.

EPLAN Training

10

Automating Project Actions


3. Select the menu items Utilities > Automated processing > Run.
The project actions are executed.

This functionality is only available for certain module packages. Info

EPLAN Training

11

Automating Project Actions

Automatically Processing Multiple Projects

Preconditions:

You have imported directories and projects into Project management.

You have created a script.

Project > Management


1. To select several projects, hold down the [Ctrl] key and select the desired
projects.

EPLAN Training

12

Automating Project Actions


2. Select Popup menu > Automated processing.
The Automated processing dialog is opened.

3. To use the currently active project-related script for each project, select the
Use separate script for each project option.

4. To use the same project-spanning script for all projects, select the Use script
from selected project for all projects option.

EPLAN Training

13

Automating Project Actions


5. In the Name field, select the project whose script is to be used for all other
selected projects.

6. Click [Settings] to verify or change the settings, then click [OK].

7. In the Automated processing dialog, click [OK].


In the Project selection dialog, all of the projects are displayed that will be
automatically processed.

8. Click [OK].
The status is shown in the System messages dialog.

9. Click [Close].
The projects are automatically processed, one after the other.

EPLAN Training

14

Automating Project Actions


This functionality is only available for certain module packages. Info

EPLAN Training

15

Automating Project Actions

Extending a Script in the Editor

4.1

Connect the editor

1. Select the menu items Options > Settings > User > Management >
Automated processing.

2. Click [...] next to the Editor for direct editing field.

EPLAN Training

16

Automating Project Actions


3. In the Open dialog, select the executable *.exe file of a text editor and click
[OK].

4. In the Settings: Automated processing dialog click [OK].

4.2

Edit script

Precondition:
You have opened and selected a project in the page navigator.

EPLAN Training

17

Automating Project Actions


1. Select the menu items Utilities > Automated processing > Settings.

EPLAN Training

18

Automating Project Actions


2. In the dialog Settings: Automated processing dialog select the script you
want to edit from the Script name field.

3. Click

(Edit).

The script is opened in the editor.

EPLAN Training

19

Automating Project Actions


4. Edit the source code, save the script and close the editor.

This functionality is only available for certain module packages. Info

EPLAN Training

20

Automating Project Actions

Calling Up a Script from the Command Line

Preconditions:

You have created a script.

EPLAN is closed.

1. In the windows taskbar start menu, select Start > Run.

EPLAN Training

21

Automating Project Actions


2. In the Run dialog, in the Open field, enter the command cmd.
A command line window is opened.

3. After the Drive:\> prompt, enter the file path and file name of the executable
file EPLAN.exe and a space.
Example:
C:\>D:\Program Files\EPLAN\EPLAN\Version\BIN\EPLAN.exe

4. After this, enter ExecuteScript and a space, the parameter /ScriptFile:,


and then the file path and file name of the automation script and a space.
Example:
C:\>D:\Program Files\EPLAN\EPLAN\Version\BIN\EPLAN.exe
ExecuteScript /
me\EPLAN\EPLAN\Version\Projects\ESS\demo_d.edb\script.cs

5. After this, enter the parameter /ProjectName: and the file path and file name
of the *.elk project.
Example:
C:\>D:\Program Files\EPLAN\EPLAN\Version\BIN\EPLAN.exe

EPLAN Training

22

Automating Project Actions


ExecuteScript
/ScriptFile:D:\Program
Files\EPLAN\EPLAN\Version\Projects\ESS\demo_d.edb\script.cs
/ProjectName:D:\Program
Files\EPLAN\EPLAN\Version\Projects\ESS\demo_d.elk

6. Press [Enter].
The command line opens EPLAN and performs the project actions defined
in the script.

7. To examine the status, select the menu item Utilities > System messages.

EPLAN Training

23

Automating Project Actions

EPLAN Training

24

You might also like