In Automation Builder a browser-based python script editor is integrated. This allows the user to modify the existing python script, to create a python script from the scratch and to finally execute the script.
Moreover, it assists the user in writing the script with the following features:
-
Auto suggest
-
IntelliSense suggestions for the python syntax during typing.
-
IntelliSense for CODESYS script engine and Automation Builder injected script objects.
-
Built-in language service that provides complete code intelligence for objects, properties and methods.
-
Details of the object with [CTRL] + [spacebar].
-
-
Auto completion
Press the Enter key on a function suggested by IntelliSense in order to insert it.
-
Python syntax highlighting (basic syntax colorization)
The function and its respective namespace is automatically colored in order to match colors.
-
Matching brackets
Matching brackets are highlighted as soon as the cursor is near to one of them using the command palette.
-
Zoom
Changes the font size of the editor's content.
-
Find and replace
Support of 'Find' (search for a keyword) and 'Find and replace' (search and replace a keyword). This feature is supported in the editor, however not integrated in Automation Builder platform.
-
Minimap
High level overview of the script for a quick navigation and code understanding.
-
Copy/paste
Support of 'copy and paste' of the script text within and into the editor.
-
Undo/redo
Support of 'undo/redo' for editing actions. This feature is supported in the editor, however not integrated in Automation Builder platform.
-
Keyboard shortcuts
Keyboard shortcuts allow to perform most tasks directly from the keyboard (e.g. [CTRL] + [Z], [CTRL] + [Y]) including copy and paste. For further keyboard shortcuts refer to the command palette ([F1]).
-
Folding
Support of folding and expanding script regions.
-
Comment/uncomment the code
Support of commenting ([CTRL] + [K]) and uncommenting ([CTRL] + [C]) code through shortcuts.
-
'Execution' button
Executes the script directly in the editor window.
-
In order to start a new script from the scratch the user can start with an empty editor. This can be done via the 'Add script' dialog without script file selection.
For further features that can be used in the python script editor refer to the command palette ([F1]).
Limitations with CODESYS script engine IntelliSense
-
No IntelliSense available for return type of a property.
-
No support of IntelliSense for keyword “None”.
-
No IntelliSense support for method overloading.
-
No IntelliSense support for methods that return an object.
-
Private methods are also part of IntelliSense. Refer to the CODESYS script engine document to verify the access modifier.