This method sets the value of a specified layer objects property. . You can set a constant value (e.g., set “LineColor” to “0xFF00FF”), or a classification XML.
Classification XML is used for persistence of a classification which is defined in the TerraExplorer Pro GUI. When a classification is defined using the Field By Attribute dialog box, you can use GetValue to retrieve an XML that defines this classification. See: “Feature Layers” chapter in the User Manual.
HRESULT SetValue(
[in] BSTR Name,
[in] PropertyValueType propValType,
[in] VARIANT Value)
Parameters:
Name – A string value. The name of the property to be set. The parameter can be a name of any property field as it appears in the Layer properties sheet in TerraExplorer (e.g., “Line Color”).
propValType – An enum determining how the value parameter is interpreted. The PropertyValueType enum can use any of the following values:
PROPERTY_VALUE = 0
Property value or expression.
PROPERTY_CLASSIFICATION = 1
Classification XML.
Value – The value to be assigned to the property as defined in the propValType parameter. This parameter can be any of the following:
The type expected for the specified property. For example, for “Line Color” pass a long type value.
A valid expression encapsulated in “<” and “>” marks, as defined in the user manual. See: “Feature Layers” chapter of the User Manual.
An XML string, see method’s description.
Return Values:
The return value obtained from the returned HRESULT can be one of the following:
Return value |
Meaning |
S_OK |
Success. |
E_FAIL |
Catastrophic failure. |