使用Annotation的API功能。Annotation 的API功能位于ArcGIS.Core.dll中。Annotation API通常与地理数据库、地图创作和编辑结合使用。ArcGIS.Core.dll
ArcGIS.Core.Data.map API中的几乎所有方法都应该在MCT上调用。
一、Annotation featureclass
1、从GeodatabaseGeodatabase数据库获取
1)、通过要素类名称
using (AnnotationFeatureClass annoFeatureClass =geodatabase.OpenDataset<AnnotationFeatureClass>("AnnotationFeatureClassName"))
{
}
2)通过注记要素类的ID
using (AnnotationFeatureClass annoFeatureClass =
geodatabase.OpenDataset<AnnotationFeatureClass>("1"))
{
}
2、从地图加载图层获取
1)、通过AnnotationLayer获取
ArcGIS.Desktop.Mapping.Layer selectedLayer = MapView.Active.GetSelectedLayers().FirstOrDefault();
if (selectedLayer is ArcGIS.Desktop.Mapping.AnnotationLayer)
{
using (Table table = (selec