We need to copy an annotation feature (not feature linked) and move 10 metres.
Two issues:
- A new annotation is drawn behind old one
- A new annotation is not moved
IFeatureClass pFeatCls = pSourceAnnotationFeature.Class as IFeatureClass;
IFeature pNewAnnoFeature = pFeatCls.CreateFeature();
CopyAttributes(pSourceAnnotationFeature, ref pNewAnnoFeature);
IClone pCloneGeometry = (IClone)pSourceAnnotationFeature.Shape;
IGeometry pShapeCopyGeometry = (IGeometry)pCloneGeometry.Clone();
ITransform2D pTransform2D = pShapeCopyGeometry as ITransform2D;
pTransform2D.Move( 10, 0);
pNewAnnoFeature.Shape = pShapeCopyGeometry;
(pNewAnnoFeature as IAnnotationFeature).Annotation.Geometry = pShapeCopyGeometry;
pNewAnnoFeature.Store();
ArcMap.Document.ActiveView.Refresh();