The script editor

The Vertec Script Editor for creating and executing Python scripts

Product line

Standard

|

Expert

Operating mode

CLOUD ABO

|

ON-PREMISES

Modules

Services & CRM

Budget & Phases

Purchases

Resource Planning

Business Intelligence

Created: 08.08.2019
Updated: 19.08.2024 | Offloaded from the Python Scripts article here to improve findability.

To create and execute Python scripts, there is the Script Editor. You can open it via the Settings settings > Script Editor menu (in versions before 6.3, the menu item is called Python Script Editor). The Script Editor is shown as a separate page in a new tab:

In the left part of the window, the code is shown or edited. It must be valid Python code.

The right part of the window is the output window (as a separate application there is the Python console, which only shows the output window).

There are 4 buttons:

Execute: Execute the code displayed in the left part of the window.
Open file: This allows a script to be opened from the filesystem in the Script Editor. This button is not available in the Web app.
Save file: Saves the code shown in the left part of the window to the corresponding file. If it is a new code, a save dialog will appear. This button is not available in the Web app.
The Vertec settings menu

The Script Editor uses the last selected Vertec object in one of the other tabs as argobject. The respective argobject is shown in the upper part of the Script Editor window.

Any number of Script Editor windows can be opened in parallel. They work independently of each other, but all display the last selected Vertec object as argobject.

The Script Editor can also be opened via the Button Script. In this case it contains the script text of the corresponding script.

In addition to the usual shortcuts for copy (Ctrl+C) and paste (Ctrl+V), the following keyboard shortcuts are available:

  • Mark and Tab: Indent selected block
  • Select and Shift-Tab: Decrease the indentation of the selected block
  • Ctrl+E: Execute script (from Vertec 6.3.0.8)
  • Ctrl+Z: Undo (from Vertec 6.3.0.8)

Single-line commands can also be entered directly in the output window of the Script Editor or in the Python console, e.g. argobject, or for e in argobject.entraege: print e.code etc.

In the output window, the last input can be called up by pressing Ctrl + ↑ and executed again directly. If Ctrl + ↑ is called up several times, (all) previous inputs will be returned, respectively, by pressing Ctrl + ↓ the newer ones will be returned.

Bitte wählen Sie Ihren Standort