Publishing Scripts to the Ribbon

You can publish a script to create a tool button in the ribbon so that it can be used in any project.

To publish a script:

  1. Write a script.
  2. Click the Publish Script icon. The Publish Script dialog appears.
  3. Enter a Name and Tooltip.
  4. (Optional) Enter Tab name and Group name for script location in the ribbon. Note: Scripts cannot be added to existing Discovery tabs so existing Tab names are not available.
  5. For Icon path, enter a path to the icon, or browse to select the icon.
  6. (Optional) Choose Password-protected copy if you want to hide the script contents.
  7. Click OK.

The tool is added to the chosen Tab and Group on the Ribbon. Once a script is published, it can be edited or removed by selecting the Edit Script or Remove option on the Ribbon if it is not protected.

When publishing scripts, you can choose Password-protected copy to protect the script. When using this option, two files will be saved: a .dscript file in the Published directory, which is editable, and a .pdscript file in the Published\secure directory, which is not editable. The Published directory can be found at <local-drive>\AppData\Roaming\Discovery\Published Scripts and Published\secure is found at <local-drive>\AppData\Roaming\Discovery\Published Scripts\secure.

Protected scripts allow their creators to share the script with others. To use a shared script (either .dscript or .pdscript) you can add it to the Published directory.

Note: Once you publish a script, it will appear on the ribbon in any instance of Discovery on your computer.
Note: Published scripts run in Debug mode when open in the Script editor and Run mode otherwise. Close any published scripts that are open in the Script editor to have them run in Run mode.