com.esri.arcgis.carto
Interface IAnnotationLayer

All Superinterfaces:
Serializable
All Known Implementing Classes:
FDOGraphicsLayer

public interface IAnnotationLayer
extends Serializable

Provides access to members that control the annotation layer.

Remarks

IAnnotationLayer provides a fast mechanism for inserting annotation features into geodatabase annotation feature classes. Insertions performed via this interface are done as low level inserts that bypass polymorphic object insert behavior, therefore no events will be fired.

Adding annotation features or elements should always be done after calling the BeginAddElements method. After the features or elements are inserted, be sure to issue a call to the EndAddElements method.

If inserting annotation elements without attributes, use the DoAddElements method which takes an enumeration of GraphicElement objects. If inserting annotation elements with attributes, use the SetupAttributeConversion method to setup the field mapping between the input features and the target annotation feature class, then call DoAddFeature. DoAddFeature will add the element, the placement polygon shape and populate any attributes that are mapped. DoAddNullElement will add a null element to the feature class. The SetupAttributeConversion method cannot be called from Visual Basic. Instead, use the SetupAttributeConversion2 method on IFDOAttributeConversion to setup the field mapping. Field mapping should be setup after the BeginAddElements method is called.

Product Availability

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


Method Summary
 void beginAddElements()
          Begins a batch process for adding elements to a graphics layer.
 void doAddElements(IElementCollection pElements, int zorder)
          Adds a batch of elements to a graphics layer.
 void doAddFeature(IFeature pFeature, IElement pElement, int zorder, int annotationClassID, int status)
          Adds a feature and its corresponding element to a graphics layer.
 void doAddNullElement(int featureId, int annotationClassID, int status)
          Adds a feature and its corresponding element to a graphics layer.
 void endAddElements()
          Ends the batch process for adding elements to a graphics layer.
 void getAddErrorInfo(String[] errors, String[] filePath)
          The errors and the file and path of the GL*.log file which stores error information when Add is called in batch (using BeginAddElements and EndAddElements).
 IColor getUnplacedAnnotationColor()
          Indicates the color with which unplaced annotation is drawn.
 boolean isDrawUnplacedAnnotation()
          Indicates if unplaced annotation is going to draw.
 void setDrawUnplacedAnnotation(boolean flag)
          Indicates if unplaced annotation is going to draw.
 void setUnplacedAnnotationColorByRef(IColor color)
          Indicates the color with which unplaced annotation is drawn.
 void setupAttributeConversion(int numAttributes, int[] inputCols, int[] outputCols)
          Sets up attribute conversion parameters for batch conversion.
 

Method Detail

beginAddElements

void beginAddElements()
                      throws IOException,
                             AutomationException
Begins a batch process for adding elements to a graphics layer.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setupAttributeConversion

void setupAttributeConversion(int numAttributes,
                              int[] inputCols,
                              int[] outputCols)
                              throws IOException,
                                     AutomationException
Sets up attribute conversion parameters for batch conversion.

Remarks

This method takes the number of fields to match, and and two arrays which define the field mapping. These arrays will have the indexes of the fields from the source feature and the indexes of the matching fields in the target annotation feature class.

This method should be called after calling BeginAddElements. BeginAddElements will reset any attribute conversion setup that was established ,before calling it.

This method cannot be called from Visual Basic, Java, or the .NET languages. Instead, use the SetupAttributeConversion2 interface on IFDOAttributeConversion.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
numAttributes - The numAttributes (in)
inputCols - The inputCols (in)
outputCols - The outputCols (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

doAddFeature

void doAddFeature(IFeature pFeature,
                  IElement pElement,
                  int zorder,
                  int annotationClassID,
                  int status)
                  throws IOException,
                         AutomationException
Adds a feature and its corresponding element to a graphics layer.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
pFeature - A reference to a com.esri.arcgis.geodatabase.IFeature (in)
pElement - A reference to a com.esri.arcgis.carto.IElement (in)
zorder - The zorder (in)
annotationClassID - The annotationClassID (in)
status - A com.esri.arcgis.carto.esriAnnotationStatus constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

doAddElements

void doAddElements(IElementCollection pElements,
                   int zorder)
                   throws IOException,
                          AutomationException
Adds a batch of elements to a graphics layer.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
pElements - A reference to a com.esri.arcgis.carto.IElementCollection (in)
zorder - The zorder (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

endAddElements

void endAddElements()
                    throws IOException,
                           AutomationException
Ends the batch process for adding elements to a graphics layer.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

doAddNullElement

void doAddNullElement(int featureId,
                      int annotationClassID,
                      int status)
                      throws IOException,
                             AutomationException
Adds a feature and its corresponding element to a graphics layer.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
featureId - The featureId (in)
annotationClassID - The annotationClassID (in)
status - A com.esri.arcgis.carto.esriAnnotationStatus constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isDrawUnplacedAnnotation

boolean isDrawUnplacedAnnotation()
                                 throws IOException,
                                        AutomationException
Indicates if unplaced annotation is going to draw.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
The flag
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setDrawUnplacedAnnotation

void setDrawUnplacedAnnotation(boolean flag)
                               throws IOException,
                                      AutomationException
Indicates if unplaced annotation is going to draw.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
flag - The flag (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getUnplacedAnnotationColor

IColor getUnplacedAnnotationColor()
                                  throws IOException,
                                         AutomationException
Indicates the color with which unplaced annotation is drawn.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
A reference to a com.esri.arcgis.display.IColor
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setUnplacedAnnotationColorByRef

void setUnplacedAnnotationColorByRef(IColor color)
                                     throws IOException,
                                            AutomationException
Indicates the color with which unplaced annotation is drawn.

Product Availability

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

Parameters:
color - A reference to a com.esri.arcgis.display.IColor (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getAddErrorInfo

void getAddErrorInfo(String[] errors,
                     String[] filePath)
                     throws IOException,
                            AutomationException
The errors and the file and path of the GL*.log file which stores error information when Add is called in batch (using BeginAddElements and EndAddElements).

Product Availability

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

Parameters:
errors - The errors (out: use single element array)
filePath - The filePath (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.