Bundt Scripting Reference · Bundt Scripting Language version 1.0.1.0

Scripting Session

A scripting session is a sequence of interactions with the scripting engine, across which state is preserved and managed.

Details

Scripting in the Bundt Scripting Language works like this:

  1. You provide a chunk of scripting code for the scripting engine to run.
  2. The scripting engine compiles, analyzes and executes the code, send the results to the ouptut stream and reporting on any errors.
  3. Go back to 1.

Every time you go through this loop, you have access to the results from previous passes. In this manner, you can run your scripts in small chunks, or in big batches, and still benefit from a persisten state.

A very important part of this state is the scripting context, which stores the last model entities that you have worked on for immediate reference. Equally important is the collectin of variables that you define throughout the session. They are always available for you between executions within the same session.

Before you start running scripts you need to create a session. From that point on, everything you run against this session will share a common state and context. Of course, you can have multiple sessions active at the same time. The scripts that you run on each are isolated from those running on others. If you are working interactively with the ModelDesigner , you can create a scripting session through the Scripting menu. If you are invoking the scripting engine programmatically, you create a session by calling ScriptingEngine.CreateSession().

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