GenerativeComponents Help

Script Editor

Script Editor is a multi line intelligent script writing interface that allows quickly author, format, edit and amend the scripts for an expression, script function, transaction step or entire transaction file. The full Script Editor is opened via various interfaces in the workflow, including Transactions, Functions, Console, Watches and clicking the square () icon in properties field.

Accessing the (Expression Builder) tool in the Script Editor toolbar or Tools > Expression Builder opens the Expression Builder dialog. It is possible to insert the selected function into the Script Editor by double-clicking it in the Expression Builder. The full list of Geometry library methods and descriptions can be found under the Bentley.Geometry tab in the Expression Builder.

The Statement Builder is another tool handy in the Script Editor toolbar that assists building the statements with proper syntax script around the type. The tool can also accessed from Tools > Statement Builder.



The auto-complete in the Script Editor gives a list of arguments for each technique. It is important to be aware that certain techniques are overloaded and take different combinations of arguments. You can switch between these using the up and arrows within the auto-complete pop-up.


Example illustrating auto-complete Intellisense –the node followed by a dot pops up another list of applicable techniques

While working in the Script Editor, instant scripting in the context of a desired node is achieved by clicking the node in either view in the model. It picks the node name at the insertion point making of the node name available in the scripting.

Editing Aids

The Script Editor is provided with built in view and navigate tools that assist you in organizing your code well.
For example the View menu provides the following options:
  • Display Line Number β€” when on, the script editor adds numbering in sequence to each line. The number in the left indicates the line number, including for a blank line.
  • Indicate Modified Line β€” when on, the line that is modified for any code, is marked a revision mark in the left. A vertical bar in the left indicates the line is edited in the current session.
  • Show Spaces β€” when on, the blank spaces are displayed visually with a color dot. This includes the spacebar and the tab key spaces, different in color from the period character.
These aids ease in quickly organizing and verifying the syntax of the code being edited.
Besides view options, the navigational tools such as Find, Replace and Go to Line are easy to locate, and edit the code quickly.