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


IFeatureWorkspaceAnno.CreateAnnotationClass Method (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (GeoDatabase)  

IFeatureWorkspaceAnno.CreateAnnotationClass Method

Creates a new annotation feature class in the workspace.

[Visual Basic .NET]
Public Function CreateAnnotationClass ( _
    ByVal Name As String, _
    ByVal Fields As IFields, _
    ByVal CLSID As UID, _
    ByVal EXTCLSID As UID, _
    ByVal ShapeFieldName As String, _
    ByVal ConfigKeyword As String, _
    ByVal dstFeatureDataset As IFeatureDataset, _
    ByVal srcFeatureClass As IFeatureClass, _
    ByVal annoProperties As Object, _
    ByVal referenceScale As Object, _
    ByVal symbolCollection As Object, _
    ByVal autoCreate As Boolean _
) As IFeatureClass
[C#]
public IFeatureClass CreateAnnotationClass (
    string Name,
    IFields Fields,
    UID CLSID,
    UID EXTCLSID,
    string ShapeFieldName,
    string ConfigKeyword,
    IFeatureDataset dstFeatureDataset,
    IFeatureClass srcFeatureClass,
    object annoProperties,
    object referenceScale,
    object symbolCollection,
    bool autoCreate
);
[C++]
HRESULT CreateAnnotationClass(
  BSTR Name,
  IFields* Fields,
  IUID* CLSID,
  IUID* EXTCLSID,
  BSTR ShapeFieldName,
  BSTR ConfigKeyword,
  IFeatureDataset* dstFeatureDataset,
  IFeatureClass* srcFeatureClass,
  LPUNKNOWN annoProperties,
  LPUNKNOWN referenceScale,
  LPUNKNOWN symbolCollection,
  VARIANT_BOOL autoCreate,
  IFeatureClass** FeatureClass
);
[C++]

Parameters Name [in] Name is a parameter of type BSTR Fields [in]
Fields is a parameter of type IFields CLSID [in]
CLSID is a parameter of type IUID EXTCLSID [in]
EXTCLSID is a parameter of type IUID ShapeFieldName [in] ShapeFieldName is a parameter of type BSTR ConfigKeyword [in] ConfigKeyword is a parameter of type BSTR dstFeatureDataset [in]
dstFeatureDataset is a parameter of type IFeatureDataset srcFeatureClass [in]
srcFeatureClass is a parameter of type IFeatureClass annoProperties [in] annoProperties is a parameter of type LPUNKNOWN referenceScale [in] referenceScale is a parameter of type LPUNKNOWN symbolCollection [in] symbolCollection is a parameter of type LPUNKNOWN autoCreate [in] autoCreate is a parameter of type VARIANT_BOOL FeatureClass [out, retval]
FeatureClass is a parameter of type IFeatureClass

Product Availability

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

Remarks

The CreateAnnotationClass method creates a new annotation feature class that may or may not be feature linked via a relationship class to features in a source feature class (the feature class being annotated).

The CLSID property must be set to esriCarto.AnnotationFeature and the EXTCLSID property must be set to esriCarto.AnnotationFeatureClassExtension. The srcFeatureClass parameter specifies the source feature class and may be set to 0 or Nothing for non-feature linked annotation.

The AnnoProperties parameter specifies the labeling properties to be used for the annotation, and must support the IAnnotateLayerPropertiesCollection interface. The ReferenceScale parameter specifies the reference scale to be used for the annotation. The SymbolCollection parameter specifies the symbols that will be referenced by the annotation elements for the annotation features in this feature class and must support the ISymbolCollection interface.

The autoCreate parameter applies to feature-linked annotation; setting it to True results in a new annotation feature being automatically created when a new feature in the source feature class is created.

See Also

IFeatureWorkspaceAnno Interface