Programming with Reflection

image\rwnprg32.gif SaveSettings method


Syntax object.SaveSettings Filename, [Type], [IfFileExists]



Save the current settings to a file.

For example, this statement saves a settings file called Test.r2w to the current directory, overwriting any existing files of the same name. The file extension indicates that this is a Reflection for UNIX and OpenVMS settings file.

Session.SaveSettings "Test.r2w", rcSettings, rcOverwrite

Click the Example link below to see an example of how to save an updated version of the current settings file.


Filename Argument Type: String
Specifies a name for the settings file. Use one of the following extensions if you want the file to appear in Reflection's Open Settings dialog box:


Settings Type


Complete Reflection for HP settings file


Complete Reflection for UNIX and OpenVMS settings file


Complete Reflection for ReGIS Graphics settings file


Keyboard and mouse settings


Toolbar settings


Color settings


Hotspot and hotlist settings


Menu settings


Connection settings

 The file is saved to the current directory unless you provide path information.

Type Argument Type: Enumeration
Specifies what type of settings to save. The default is rcSettings. The possible values are:


 Save all Reflection settings.


 Save the color settings.


 Save the connection settings.


 Save the hotspot settings.


 Save the keyboard mapping settings.


 Save the menu settings.


 Save the toolbar settings.


 Creates a settings update file by saving settings that have been changed from the default.

IfFileExists Argument Type: Enumeration
Specifies what to do if the file exists. The default is rcCancel. The possible values are:


 Generates an error if the file already exists.


 Prompts the user to either cancel or overwrite the file.


 Overwrites the existing file.


rcErrOperationFailed This error is returned if the settings cannot be saved for any reason, including user cancellation.


image\jump.gif Example

image\jump.gif Keyword Index

image\popup.gif Reflection products that use this command

image\popup.gif Related Topics