AnsweredAssumed Answered

How to Move Annotation Feature to point feature (x,y) location in ArcObjects (C#.Net)

Question asked by satya_1984 on Jun 7, 2018
Latest reply on Jun 26, 2018 by sonj

Hi All, I want to move annotation feature to point feature (x,y) location in ArcObjects. I tried so many ways, but still my problem not solved, please help me.


IPoint shpPnt = ShpFeature.Shape as IPoint;

IAnnotationFeature pAnnoFeature = AnnoF as IAnnotationFeature;

IAnnotationElement pAnnoElement = pAnnoFeature.Annotation as IAnnotationElement;

IElement pelement = pAnnoElement as IElement;

ISymbolCollectionElement CollElement = pelement as ISymbolCollectionElement;

ITextElement pTextElement = pelement as ITextElement;

ITextSymbol pTextSym = pTextElement.Symbol;

ITransform2D T2d = pelement as ITransform2D;

T2d.Move(shpPnt.X, shpPnt.Y);

pAnnoFeature.Annotation = pelement;

IFeature MovedAnnoFeature = pAnnoFeature as IFeature;

AnnoF.Shape = MovedAnnoFeature.Shape;