My script does not run
Firstly you should confirm that the script is being called correctly. Add the following line to the beginning of the script.
MsgBox "Test"
Run the script again. Modeler should display a message box that contains the text 'Test'.
If the message box is not displayed, the Stereotype or Script item that owns the script has not been set up correctly:
• For Stereotype scripts—Ensure that the Stereotype has been directly applied to the item. To do this, open the item's Property Pages, click the Items tab, and then from the Show Associated list select Stereotypes. If the Stereotype is not listed, click the
Link button, and then link the Stereotype. Note that the Apply to All Objects of Associated Model Item Types option does not apply a Stereotype's scripts to any items.
• For Script Item scripts—Ensure that the type of the item to which you want to apply the Script has been set up as a valid item type. To do this, open the Script's Property Pages, click the Items tab, and then from the Show Associated list select Model Item Types. If the item's type is not listed, click the
Link button, and then link the required model item type.
If the message box is displayed, your script is being run and you should investigate why the script is not producing the results you expect.
• Depending on the script type, your script may have to appear within special functions. If you are using these special functions, confirm that the function names are correct (the function names are case sensitive). For more information about these functions, click
here.
• Check that none of the special functions are returning FALSE. If a special function returns FALSE, the script operation is abandoned.
• To help you debug your script, use message boxes (
MsgBox "<text>"), or send messages to the Modeler output pane (
DisplayOutputWindowMessage "<text>"). Alternatively, you can add your script to a Visual Basic component and debug the script in Visual Basic. For more information about debugging scripts, click
here.
| Modeler does not report script errors that occur in derived tag definitions. |