Customization > Extensibility Through Profiles, Stereotypes, Tag Definitions and Scripts > Script functions, objects and attributes > Script functions, objects and attributes > Script functions, attributes and objects - double-click scripts
  
Script functions, attributes and objects - double-click scripts
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.
To write scripts you require a good working knowledge of the VBScript language, the Modeler Meta Model and the Modeler Automation Interface.
* 
If you run a script that has errors, those errors can cause Modeler to crash and corrupt Modeler model data.
A Double-Click script can include the following functions. All script must be within one or more of the following functions.
For validating the use of the double-click and interacting with the user (for example, opening selection dialogs and displaying messages), use the RunDoubleClickUI function.
For making updates to the model, use the CommitDoubleClick function.
To open a topic that has a script template for double-click scripts, see Script template for double click script. The script template includes the preceding functions (empty).
These functions are case sensitive and cannot be used in any other scripts.
RunDoubleClickUI Script function - This function is called when the associated item is double-clicked in Modeler.
Use this function to validate the use of the double-click and interact with users. This function is run outside of the Double-Click script transaction, so its script should not make any changes to the Model.
* 
Do not use the RunDoubleClickUI function to make changes to the model, because the user will have to perform a refresh to see the changes, and the changes cannot be undone.
This function can use the following object:
CurrentObject object - is the item that is double-clicked to call the double-click script.
If the RunDoubleClickUI function returns FALSE, the double-click operation is abandoned.
CommitDoubleClick Script function - This function is called after the RunDoubleClickUI function has been called.
Use this function to make updates to the model. This function is run as a transaction, so any changes made by the script are immediately seen in Modeler, and the changes can be undone.
* 
Do not use the CommitDoubleClick function to interact with users, because items in the model will be locked and unavailable to other users while that interaction takes place.
This function can use the following object:
CurrentObject object - is the item that is double-clicked to call the double-click script.
If the CommitDoubleClick function returns FALSE, the double-click operation is abandoned.