Programming with Reflection

image\rwnprg32.gif SaveSettings method

 

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

 

Description

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.

Arguments

Filename Argument Type: String
Required
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:

Extension

Settings Type

.r1w

Complete Reflection for HP settings file

.r2w

Complete Reflection for UNIX and OpenVMS settings file

.r4w

Complete Reflection for ReGIS Graphics settings file

.rkm

Keyboard and mouse settings

.rtb

Toolbar settings

.rcc

Color settings

.rhs

Hotspot and hotlist settings

.rmu

Menu settings

.rco

Connection settings

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

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

 rcSettings

 Save all Reflection settings.

 rcColors

 Save the color settings.

 rcConnection

 Save the connection settings.

 rcHotspots

 Save the hotspot settings.

 rcKeymap

 Save the keyboard mapping settings.

 rcMenuMap

 Save the menu settings.

 rcToolbar

 Save the toolbar settings.

 rcSettingsUpdate

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

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

 rcCancel

 Generates an error if the file already exists.

 rcAskUser

 Prompts the user to either cancel or overwrite the file.

 rcOverwrite

 Overwrites the existing file.

Errors

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