GetGraphicOutline Method (AnnotationFeature)
Get the Outline Geometry for an Annotation
var annoLayer = MapView.Active.Map.GetLayersAsFlattenedList()
.OfType<AnnotationLayer>().FirstOrDefault();
if (annoLayer == null)
return;
QueuedTask.Run(() =>
{
//get the first annotation feature...
//...assuming at least one feature gets selected
using (var fc = annoLayer.GetFeatureClass())
{
using (var rc = fc.Search())
{
rc.MoveNext();
using (var af = rc.Current as AnnotationFeature)
{
var outline_geom = af.GetGraphicOutline();
//TODO - use the outline...
//Note:
//var graphic = annoFeature.GetGraphic();
//gets the CIMTextGraphic...
}
}
}
});
Target Platforms: Windows 11, Windows 10
ArcGIS Pro version: 3 or higher.