Register User Utilities
Run external programs from within the HyperStudy interface, such as within the Directory.
Register user utilities in HyperStudy or by editing the
preferences file.
Register User Utilities in HyperStudy
-
From the menu bar, click .
The Register User Utility dialog opens.
-
Add a user utility.
- Click Add User Utility.
- In the Add dialog, enter a label for the user utility and click OK.
- In the Path column, enter the location of the user utility to be registered.
- Optional: In the Arguments column, enter any arguments for the user utility.
- Click Close to exit the user utility registration.
Register User Utilities by Editing the Preferences File
Register user utilities in the *BeginUserUtilityDefaults section of the preferences_study.mvw file.
-
In a text editor, open the preferences_study.mvw
file.
You can find the preferences_study.mvw file in the HyperWorks installation directory under <install directory>/hw/prefinc/.
-
Search for the syntax *BeginUserUtilityDefaults.
- If you are working with a Windows operating system, append the first list of *RegisterUserUtility statements. Otherwise, you will need to append the second list of *RegisterUserUtility statements.
-
Immediately following the existing *RegisterUserUtility
statements, register further user utilities using the following syntax:
where:*RegisterUserUtility (script_name,"script_label","utility interpreter", "utility path")
- script_name
- Unique name for the utility.
- script_label
- Name used within HyperStudy to reference the
utility.Note: This name must be enclosed in double quotes.
- utility interpreter
- Full path of the interpreter of the utility, including file name and extension.
- utility path
- Full path of the utility, including the file name and extension.
- Save the preferences_study.mvw file.
Example: Register Tcl Script in the Preferences File
In this example, a Tcl script is added to the user utility defaults section of the
preferences_study.mvw file for a Windows operating
system.
*BeginUserUtilityDefaults()
*RegisterUserUtilityScript(u_1,"U1","C:\wish.exe","C:\param.tcl")
*EndUserUtilityDefaults()