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

IElementProperties.CustomProperty Property (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Carto > ESRI.ArcGIS.Carto > Interfaces > IE > IElementProperties Interface > IElementProperties.CustomProperty Property
ArcGIS Developer Help

IElementProperties.CustomProperty Property

Custom property.

[Visual Basic .NET]
Public Property CustomProperty As Object
public object CustomProperty {get; set;}
HRESULT get_CustomProperty(
  Variant* CustomProperty
HRESULT put_CustomProperty(
  VARIANT CustomProperty
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.


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

.NET Samples

Move a graphic along a path in ArcMap