Annotations created using a custom SDK tool ("CustomToolText") in ArcGIS Pro cannot be edited using the out-of-the-box ArcGIS Pro Feature editing tools. In contrast, annotations created using the default ArcGIS Pro tool ("DefaultToolText") are editable as expected. The screenshot below illustrates the difference in behavior between the two types of annotations.
SampleFeature2
Features ‘CustomToolText1’, ‘CustomToolText2’, ‘CustomToolText3’ are created by custom tools. Used Esri Move tool does not work. Shows the message below.
Feature ‘DefaultToolText1’ created using Create feature from ArcGIS Pro option. Used Esri Move tool works fine. Shows the message below.
We compared the attribute values of both types of annotation features and found no differences. Despite this, the SDK-created annotations remain non-editable.
Has anyone encountered a similar issue or know what might be causing this behavior? Are there specific properties, schema elements, or feature class configurations that need to be set when creating annotation features via the SDK to ensure compatibility with ArcGIS Pro’s editing tools?
Any insights or suggestions would be greatly appreciated!
Code snippet of Custom Tool for creating Annotation:
private void CreateAnnotation(Geometry geometry)
{
QueuedTask.Run(() =>
{
try
{
if (Module1.isModify)
{
if (inspector == null)
{
inspector = new Inspector();
inspector.Load(ModifyAnnotation.pLayer, Module1.objectId);
}
annoProperties.LoadFromTextGraphic(ptextGraphic);
}
else
{
annoProperties.LoadFromTextGraphic(ptextGraphic);
if (inspector == null)
{
var currenttemplate = ArcGIS.Desktop.Editing.Templates.EditingTemplate.Current;
if (currenttemplate == null || geometry == null)
{
if (currenttemplate == null)
MessageBox.Show("select the annotation feature to create point rotate. current template is null.", "create point rotate");
else
MessageBox.Show("invalid geometry.", "create point rotate");
ActiveMapView.ClearSketchAsync();
return;
}
inspector = currenttemplate.Inspector;
}
}
annoProperties.Angle = 0;
annoProperties.Shape = geometry;
annoProperties.SymbolID = _symbolID;
inspector.SetAnnotationProperties(annoProperties);
}
catch (Exception ex)
{
ActiveMapView.ClearSketchAsync();
ptextGraphic = null;
inspector = null;
return;
}
});
}