Script package examples
This section provides practical examples that demonstrate how to use the script package to:
- Control which editor opens for specific component types
- Integrate external engineering tools
- Optimize upload, backup, and comparison workflows
Use these examples as templates and adapt them to your environment.
How to use these examples
-
Save the script file in the Server scripting directory for automatic update of client so it becomes available on all UserClient installations.
-
Assign the script to the corresponding event in the Script management module in the AdminClient (for example, Before compare, After upload).
-
Adjust paths, parameters, and commands to match your configuration.
General examples
ScriptBeforeCompare
This script automatically unpacks ZIP files before comparison so that their contents can be compared.
To use this script, copy the script file to the Server scripting directory for automatic update of client.
Script:
ScriptAfterUpload
This script triggers a warning output if after the comparison no differences were found.
To use this script, copy the script file to the Server scripting directory for automatic update of client.
Script:
ScriptBeforeUpload
This script executes a ping command to a controller before an upload job to verify that the controller is reachable.
To use this script, copy the script file to the Server scripting directory for automatic update of client.
Script:
Function ScriptBeforeUpload
{
/////////////////////////////////////////////////
// ping has three parameters:
// Ip: <IP> mandatory
// Loop: <Number of repeats> optional, default = 1
// Sleep: <Milliseconds waiting time after a ping> optional, default = 0
ping Ip:$vdog::uploadjob->5002 loop:3 sleep:3000
/////////////////////////////////////////////////
}
Related topics