Bundt User's Manual · Bundt Toolset version 1.0.1.0

Scripting Session window

A scripting session window allows you to interactively write, edit and run scripts.

Overview

This is a screenshot of a scripting session window. Its major features are listed on the right.

Main menu

Grayed items in the table below behave exactly as in the Main Window menu.

File
    New
        Type Model... Shows the New Type Model dialog box to create a new type model.
        Instance Model... Shows the New Instance Model dialog box to create a new instance model.
    Open Model... Opens a model from a file.
    Open Recent Model Opens a recently used model.
    Exit Exits the application.
Scripting
    New Scripting Session Creates a new scripting session and opens up a new Scripting Session window to work with.
    Load Script Loads a script from a text file, replacing the contents of the code editor with those of the file.
    Save Script Saves the contents of the code editor to a text file.
    Clear Clears the contents of the code editor.
    Check Syntax Compiles and analyzes the code in the code editor, reporting any syntax errors.
    Run Compiles, analyzes and executes the code in the code editor, showing the produced output and reporting any syntax or execution errors.
    Go To Error/Reference If an error message is selected, highlights the code in the code editor that produced the error. If a context element is selected, shows it on screen.
Window
    Tile Tiles open windows using Windows default behaviour.
    Cascade Cascades open windows using Windows default behaviour.
    (window switcher) Shows a list of open windows in ModelDesigner, and allows switching between them.
Help
    Bundt User's Manual Opens a browser to the online Bundt User's Manual.
    Bundt Scripting Reference Opens a browser to the online Bundt Scripting Reference.
    ConML Technical Specification Opens a browser to the online ConML Technical Specification.
    About Shows the About dialog box with information about the application.

Main toolbar

The items in this toolbar are as follows.

Load Script Loads a script from a text file, replacing the contents of the code editor with those of the file.
Save Script Saves the contents of the code editor to a text file.
Clear Clears the contents of the code editor.
Check Syntax Compiles and analyzes the code in the code editor, reporting any syntax errors.
Run Compiles, analyzes and executes the code in the code editor, showing the produced output and reporting any syntax or execution errors.
Go To Error/Reference If an error message is selected, highlights the code in the code editor that produced the error. If a context element is selected, shows it on screen.
/ Last Result A green light is shown if the last syntax check or run was successful; a red light is shown otherwise.

Code editor

The code editor allows you to type in script code and edit it.

It is a good idea to validate your code every now and then through the Check Syntax command.

Also, remember that the code that you enter in the code editor is not saved with your model. If you close the Scripting Session window, your code is lost forever. Save it to a file by using the Save Script command if you want to keep your code for later use.

Output pane

The output pane is where the system shows messages and results of the execution of your scripts.

If there are any errors during compilation or analysis, you will see a summary here. Then you can switch to the messages pane for details.

Similarly, errors during execution of your scripts will be summarised here, an details provided on the messages pane.

Finally, printout data or other results of running your scripts are displayed here. For example, if you type in write 11/2; and run it, you will see the result 5.5 in the output pane.

Messages pane

The messages pane is where the system shows detailed error messages after failed compilation, analysis or execution.

For each message, the system shows a descrition of the problem as well as the line and column in the code editor where the error originated. You can use the Go To Error/Reference command (or double click the message) to select the associated code fragment.

Context pane

The context pane is where the system shows the scripting session context. This is a list of the last referred to model element of each kind, as well as a LastResult flag.

Please see the Bundt Scripting Reference for more information on the scripting session context.

Variables pane

The variables pane is where the system shows the scripting session variables. Each variable displays its data type and current value.

See Also


Contents distributed under a Creative Commons Attribution 4.0 International License · About · Terms of Use · Contact Us · last updated on 08 October 2020