IApplication.ExecuteScript Method
Namespace: NextDesign.Desktop
Description
Loads and executes the specified script file.
Identifies the scripting language from the extension of the specified script file.
- ".cs" or ".csx": Executes as a CSharp script.
- ".py": Executes as a Python script.
In V5.0, an exception is thrown if a file with an extension other than those listed above is specified.
Argument
| Name | Type | Description |
|---|---|---|
| scriptPath | string | Absolute path to the script file |
| scriptParams | IScriptParams | Script parameters |
Return value
- object
Exception
| Name | Exception Class | Description |
|---|---|---|
| Invalid Argument | ExtensionArgumentException | When null is specified for the script file path When an extension not supported by the script file path is specified |
| File Not Found | ExtensionFileNotFoundException | When a path where the file does not exist is specified for the script file path |
| Script Execution Failed | ExtensionScriptException | When script execution fails (InnerException allows access to the exception that caused the failure) |