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


IElementCollection2.Add Method (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (Carto)  

IElementCollection2.Add Method

Adds an element to the collection.

[Visual Basic .NET]
Public Sub Add ( _
    ByVal Element As IElement, _
    [ByVal LinkedFeatureID As Integer], _
    [ByVal AnnotationClassID As Integer], _
    [ByVal Status As esriAnnotationStatus] _
)
[C#]
public void Add (
    IElement Element,
    int LinkedFeatureID,
    int AnnotationClassID,
    esriAnnotationStatus Status
);
[C#]

Optional Values

LinkedFeatureID   Supply 0 as a default value.
AnnotationClassID   Supply -1 as a default value.
Status   Supply esriAnnoStatusPlaced as a default value.
[C++]
HRESULT Add(
  IElement* Element,
  long LinkedFeatureID,
  long AnnotationClassID,
  esriAnnotationStatus Status
);
[C++]

Parameters Element [in]
Element is a parameter of type IElement LinkedFeatureID [in, optional, defaultvalue(0)] LinkedFeatureID is a parameter of type long AnnotationClassID [in, optional, defaultvalue(-1)] AnnotationClassID is a parameter of type long Status [in, optional, defaultvalue(0)]
Status is a parameter of type esriAnnotationStatus

Product Availability

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

See Also

IElementCollection2 Interface