PRIMER 22.1

Showing a Custom Tool Button for Scripts

Showing a Custom Tool Button for Scripts

As well as showing scripts in the script tree it may also be convenient to add a custom tool button to quickly enable you to run specific scripts. This can be controlled by the preferences

primer*custom_tools_name
primer*custom_tools_script_directory

If the custom_tools_script_directory preference is given then PRIMER will show a new tool button next to the quickfind button. By default the text shown on the button will be the name of the specified directory but the custom_tools_name preference can be used to change the text. As normal these preferences can be defined in the $OA_ADMIN, $OA_INSTALL and/or $OA_HOME directories. PRIMER will search each of the specified directories for scripts adding to the list.
Preference locking can be used as necessary to restrict users from adding their own directories.

For example with the preferences:

primer*custom_tools_name: Arup
primer*custom_tools_script_directory: C:\test\Arup_scripts

PRIMER will show buttons for the scripts in directory C:\test\Arup_scripts and show buttons in the popup for each script found. The name: comment at the top of the script can be used to change the text shown on the button