Script template for tools tab scripts
This topic provides a template of the empty functions that can be used in a Tools tab script.
You can copy the script template text that follows from this topic to the Tools tab script. If you want single line spacing, copy the following text from this topic to Notepad, and then copy the text from Notepad to Modeler.
Key:
Remarked variable names at the top of the file are available in all functions underneath except where stated.
Remarked variable names immediately above functions are only available in those functions (or subfunctions called).
The comment line '---Context change--- indicates that script is unloaded and reloaded here between function calls - this means that script scoped variables cannot be used to transfer data between functions separated by one of these comment lines, and other methods (such as helper dlls) should be used in the (fairly rare) situation that this is needed.
Option Explicit
'Studio(.DisplayOutputWindowMessage and .ClearOutputWindow)
'Projects
'ActiveProject
'Dictionary
'CurrentScript
'CurrentObject - the dictionary object right clicked
'Script.CurrentSymbol - the symbol right clicked if any
Function Run ToolUI()
RunToolUI=False 'Don't run CommitTool()
RunToolUI=True 'Do run CommitTool()
End Function
Function CommitTool()
CommitTool=False 'Don't commit the transaction
CommitTool=True 'Do commit the transaction
End Function