hwIPreferenceManager SetDefaultPreferenceFile

Sets a preference file as the default preference file.

Syntax

hwIPreferenceManager_handle SetDefaultPreferenceFile prefIndex, menuName, filePath

Application

HyperWorks Tcl

Description

This command sets a preference file as the default preference file.

Inputs

prefIndex
The index (position within the internal list of preference file) of the preference file that you want to set as the default. This index is a zero-based index, meaning the positions start at zero, rather than one. Therefore, the first preference file in the list would have an index of zero; the second would have a one, and so on. If you do not know or do not want to supply the index, a -1 must be input.
menuName
The name of a file menu that you want to set as the default. A null string, “”, can also be input if you do not know or do not want to input the menu name. If the menu name is supplied, it is used to search for a preference file match.
filePath
The filepath of the desired file (within “” or {} if there are spaces in the filepath) that you want to set as the default. A null string, “”, can also be input if you do not know the filepath or do not want to input the filepath. If the filepath is supplied, it is used to search for a preference file match.

Example

hwi GetSessionHandle sess;
sess GetPreferenceManagerHandle pref;
pref SetDefaultPreferenceFile 3 MyFile.mvw c:/MyFile.mvw;

Error

Success (0) or an error message is returned.

Keywords

HyperWorks

Tcl

Preference Manager