Bundt Scripting Reference · Bundt Scripting Language version 1.0.1.0

Context

The scripting context is a piece of data in your session that stores the most recently used model entities for quick access.

Details

Every time you run a script statement that acts upon an entity such as a model or a model element, the current scripting session stores a reference to this entity into the context.

The context stores one entity of each type, overwriting the previous. For example, if you create an attribute in a model, this attribute is placed in context. If later you alter another attribute, this new attribute is placed in context replacing the previous one.

In this manner, there is always one entity of each kind in context, or perhaps none if you haven't used any yet.

If you are working interactively with the ModelDesigner , you can check out the context at any time through the Context tab at the bottom of the scripting session window.

One entity of each of the following kinds can be kept in context:

  • Model
  • Language
  • Tag
  • Type model
  • Package
  • Enumerated type
  • Enumerated item
  • Class
  • Property
  • Attribute
  • Semi-association
  • Association
  • Instance model

In addition, the context keeps a LastResult flag that specifies whether the last run script terminated successfully or with errors. If you are using the ModelDesigner , this flag is displayed as a green/red OK/fail label at the top right corner of the scripting session window.

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