ArcObjects Library Reference (Carto)  

IElementProperties.CustomProperty Property

Custom property.

[Visual Basic .NET]
Public Property CustomProperty As Object
[C#]
public object CustomProperty {get; set;}
[C++]
HRESULT get_CustomProperty(
  VARIANT* CustomProperty
);
[C++]
HRESULT put_CustomProperty(
  VARIANT CustomProperty
);
[C++]

Parameters

CustomProperty [out, retval]   CustomProperty is a parameter of type VARIANT CustomProperty [in]   CustomProperty is a parameter of type VARIANT

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Remarks

CustomProperty is a place for developers to attach custom objects to an element. Previous versions of the software required that the specified variant be of type VT_UNKNOWN, i.e. a reference to an object, but that requirement has since been removed. Now, the CustomProperty can also be a simple type like an integer, double, boolean (VARIANT_BOOL) or a string (BSTR).

When this property is an object reference, the object must implement a persistence interface, so if you write a custom object it must implement IPersistStream or IPersistVariant. As an alternative to writing a custom object, you can use a PropertySet or XMLPropertySet, since they both already implement IPersistStream.

CustomProperty is never used by the core ArcObjects for its own elements, but the core software will expect to find an IPersistStream or IPersistVariant interface when the this property is an object reference, and it is part of an element being retrieved from or stored in an .mxd file.

See Also

IElementProperties Interface