XML Syntax

All information regarding structure and content of a script collection is defined in one XML file. You can provide multiple XML files, each defining one script collection. If an XML file defining a script collection is located in the directory you specify in VisualApplets under menu Settings -> System Settings -> Paths -> Script Collection, the script collection is displayed in the VisualApplets GUI in the Script Collection pane.

 

Use Collection Name as File Name

 

Make sure you use the same name for the XML file as you specify as collection name in the XML file in tag <ScriptCollection>.

   

Syntax

The syntax of the XML file is the following:

 

The format is defined the in accordance to the following convention:

  • Optional, individual elements are enclosed in square brackets [ ].
  • Syntax elements that are allowed to be non-existent, to be there once or to be there multiple times, are enclosed in curly brackets { }.
  • Syntax (..|..) indicates that one of the provided elements can be stated.
  • Parameter values are stated in italic capital letters.

 

Parameters

The parameters given above (in italic capital letters) you need to fill with the following content:

  • COL_NAME: Name of collection
  • COL_PNG_FILE_PATH: Path to icon file for collection (PNG format, for details see File Requirements). You need to specify the path relative to the XML file.
  • COL_TOOLTIP_TEXT: Text displayed as tooltip information on the collection.
  • CMD_NAME: Name of command.
  • CMD_TOOLTIP_TEXT: Text displayed as tooltip information on the command.
  • CMD_VERSION: Command version in format MAJOR.MINOR (for example, 1.0)
  • TCL_FILE_PATH: Path to the Tcl script that contains the procedure you want to be called by the command. Specify the path relative to the XML file.
  • CMD_PNG_FILE_PATH: Icon file for the command (PNG format, for details see File Requirements). Specify the path relative to the XML file.
  • CMD_CALL: Name of procedure within the Tcl script (or whole Tcl procedure) that is to be called by the command
  • CMD_PARAM: Parameter names (arguments) to be substituted by actual values at command call. Only specify parameter names that are defined in the following <Parameter> tags.
  • PAR_NAME: Parameter name
  • PAR_RANGE_FROM: Start of value range (only for data types int or double)
  • PAR_RANGE_TO: End of value range (only for data types int or double)
  • PAR_RANGE_INC: Step size within the value range (only for data types int or double)
  • PAR_VALUE: Default value for parameter

 

 

 

To display your changes without restarting VisualApplets, right-click into the Script Collection pane and select Rescan Script Collection Directory.

   

Example