Customization > Extensibility Through Profiles, Stereotypes, Tag Definitions and Scripts > Script functions, objects and attributes > Script functions, objects and attributes > Script functions, attributes and objects - derivation scripts for tag definitions
  
Script functions, attributes and objects - derivation scripts for tag definitions
In addition to the standard Modeler automation interface functions, objects and attributes, there are special functions, objects and attributes you can use in the scripts of Stereotypes and Script items. For general information about extensibility scripts, including information about the Studio, Projects, ActiveProject and Dictionary objects that are available in most script functions, see Script functions, attributes and objects - overview.
Note that you cannot use the Studio object in a derivation script.
* 
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 cause Modeler to crash and corrupt Modeler model data.
A Tag Definition's Derivation Script can include the following script attributes:
Script.AddResultObject script attribute - for a reference tag definition, adds an item to the results of a derived tag definition. Example code:
Dim derivedItem
Set derivedItem = CurrentObject.Item("Class")
Script.AddResultObject(derivedItem)
Script.AddResultObjects script attribute - for a reference tag definition, adds a collection of items to the results of a derived tag definition. Example code:
Script.AddResultObjects(CurrentObject.Items("CLASS"))
CurrentObject object - is the item to which the Tag Definition has been applied.
Script.Result script attribute - for non-reference tag definitions, sets the result of a derived tag definition.
* 
A Derivation Script must not make any changes to a Model.