This document is archived and information here might be outdated.  Recommended version.


IARConfiguration.Setting Property (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (PublisherControls)  

IARConfiguration.Setting Property

The configuration setting specified.

[Visual Basic .NET]
Public Function get_Setting ( _
    ByVal sName As String _
) As Object
[Visual Basic .NET]
Public Sub set_Setting ( _
    ByVal sName As String, _
    ByVal pVal As Object _
)
[C#]
public object get_Setting (
    string sName
);
[C#]
public void set_Setting (
    string sName,
    object pVal
);

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Description

To access a setting within an ARConfiguration object use the Setting property by supplying the name of the setting. Setting names are not case sensitive. When updating settings it is important to supply the correct type of value. The settings use the following value types: string, long, double, Boolean. Using incorrect value types may cause a corrupt template that will cause problems when loaded into the ArcReaderControl.

Beware that simply changing a setting value in the ARConfiguration does not guarantee that the ArcReaderControl will automatically pick up the new value, as it may be cached. In order ensure the new setting value is picked up the ARConfiguration must be set back into the ArcReaderControl.

It is possible to add you own settings into a template file using the Setting property. For example, you may store a new setting containing the user�s name and use this setting to customize your application.  Ensure that any new settings you add have names distinct from the settings that are present in a template file by default. Overwriting a setting with a setting with the same name, but a different value type may cause a corrupt template that will cause problems when loaded into the ArcReaderControl.

Errors Returned

2002 800A07D2: The setting does not exist 

Remarks

Caution is required when updating any ARConfiguration settings. Ensure that the setting is updated with the correct value type, otherwise the application you are developing may not run. Ensure any new setting names are distinct from the internal setting names.

[C#]

In C# use the get_Setting and set_Setting methods, as indexed property accessors are not supported.

See Also

IARConfiguration Interface