Script (dictionary item)
For automation interface information about a Script item, click here
A Script item allows you to extend the features and behavior of Modeler. The Script Type property determines the purpose of the Script item:
OnDrop - For a diagram, specifies behavior when an item is dropped on to or moved on a valid diagram type. For an item, specifies behavior when an item is moved or copied to a valid item type in a Modeler pane. See
Overview of extending drop behavior through stereotypes and scripts.
VariantParameter - specifies derivation script for a variability parameter of a Variant or Requires Dependency. See,
Overview of variability parameters.
You can create a Script through the context menu of a Model or Package: Right-click the Model or Project, and select > > > .
You can create a Script through a Stereotype. These Scripts are shown in the Script folder on the Dictionary pane. From a Stereotype's Property Pages:
On the Menu tab, click the New Item button - creates a Script item of type MenuCommand.
On the Toolbar tab, click the New Item button - creates a Script item of type ToolbarCommand.
On the UI Events tab, select the On Drop check box - creates a Script item of type OnDrop.
On the UI Events tab, select the Double Click check box - creates a Script item of type OnDoubleClick.
On the Object Events tab, select the On Delete check box - creates a Script item of type OnDelete.
On the Model Events tab, select the On Open check box - creates a Script item of type OnModelOpen.
On the Model Events tab, select the On Close check box - creates a Script item of type OnModelClose.
You can create a Script through a Tag Definition. These Scripts are shown in the Script folder on the Dictionary pane. From a Tag Definition's Property Pages:
On the Type tab, select the Derived check box - creates a Script item that has no type set.
You can create a Script through a Variant. These Scripts are shown in the Script folder on the Dictionary pane. From a Variant's Property Pages:
On the Parameter tab, select the Derived check box - creates a Script item of type VariantParameter.
On the Validation Script tab, select the Has Script check box - creates a Script item of type VariantParameter.
You can create a Script through a Requires Dependency. These Scripts are shown in the Script folder on the Dictionary pane. From a Requires Dependency's Property Pages:
On the Parameter tab, select the Derived check box - creates a Script item of type VariableElement.
You can create a Script through a Variation Point. These Scripts are shown in the Script folder on the Dictionary pane. From a Variation Point's Property Pages:
On the Validation Script tab, select the Has Script check box - creates a Script item of type VariantParameter.
In the Modeler panes, a short-cut symbol
on the Script's icon indicates that the item is a stub.
To write scripts you require a good working knowledge of the VBScript language, the Modeler Meta Model and the Modeler Automation Interface.
WARNING If you run a script that has errors, those errors can corrupt model data and make Modeler crash.
The following sections provide information about how a Script is used in the model. For more information about a property, click it.
Properties
In addition to the standard properties, a Script has these properties:
These properties apply only when the Script Type is Menu Command or Toolbar Command:
These properties are available when the Script Type is Menu Command:
These properties are available when the Script Type is Toolbar Command:
Owned by
Owns
Dependency - The Dependency is owned jointly by the Script and the other associated item. The access permissions you have to a Dependency are determined by the access permissions of the dependent item.
Defined in these parts of the model
None.
Shown on these diagrams
Can be linked to these dictionary items
A Script is unusual in that it can be linked to Model Item Types, which are not dictionary items or diagrams as such. Linking a Script to a Model Item Type specifies that the Script can be applied to items or diagrams of that type.
Note Like most other items in a Model, a Script can be linked to a Comment.