Public Member Functions | List of all members
ScriptObject Class Reference

ScriptObject class wraps a post calculation script that is stored in the project.
These scripts are run automatically when the results are loaded.
The class can be called from Study class.
. More...

Public Member Functions

bool IsDisabled ()
 Returns True if the script is disabled. Disabled scripts are not run automatically.
 
bool IsValid ()
 Returns True if an object is valid. More...
 
String Language ()
 Returns the language used for the script, Python, VBScript or JScript.
 
void Read (String &filename)
 Loads a file and sets the contents into the script object.
 
void Run ()
 Executes the script. More...
 
String ScriptText ()
 Returns the text of the script.
 
void SetDisabled (bool isDisabled)
 Specifies the script's disabled flag. A disabled script is not run automatically. More...
 
void SetLanguage (String &language)
 Specifies the language for the script. Should be either Python, VBScript or JScript. More...
 
void SetPropertiesScriptText (String &text)
 Specifies the parameter setting script text. This is the script that will be run. More...
 
void SetText (String &text)
 Specifies the script text. This is the script that will be run. More...
 
void SetTitle (String &title)
 Specifies the title of the script. This title appears in the treeview. More...
 
String Title ()
 Returns the title of the script object.
 

Detailed Description

ScriptObject class wraps a post calculation script that is stored in the project.
These scripts are run automatically when the results are loaded.
The class can be called from Study class.
.

Example of calling the class object:

app.GetCurrentStudy().GetPostCalculationScript(0)

Member Function Documentation

bool ScriptObject::IsValid ( )

Returns True if an object is valid.

Returns
Whether or not the ScriptObject objects in the list are valid
void ScriptObject::Run ( )

Executes the script.

Attention
disabled scripts will not be run.
void ScriptObject::SetDisabled ( bool  isDisabled)

Specifies the script's disabled flag. A disabled script is not run automatically.

Parameters
isDisabled
1 : Invalid
0 : Valid
void ScriptObject::SetLanguage ( String &  language)

Specifies the language for the script. Should be either Python, VBScript or JScript.

Parameters
languageScript language name
Python
VBScript
JScript
void ScriptObject::SetPropertiesScriptText ( String &  text)

Specifies the parameter setting script text. This is the script that will be run.

Parameters
textParameter script text
void ScriptObject::SetText ( String &  text)

Specifies the script text. This is the script that will be run.

Parameters
textScript text
void ScriptObject::SetTitle ( String &  title)

Specifies the title of the script. This title appears in the treeview.

Parameters
titleScript title