Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I extract the geometry of a line callout and the border of an annotation featureclass in ArcGIS desktop. I want to transfert those to a separate featureclass.

I'm able to get the Anchor point of the callout, but it's not enough for my needs.

I have try to use following code, but it doesn't return nothing. In the code, I try to get a polyline, but I've also try to get a polygon with the same results. I'm using ArcMap version 9.3 but I also tried with 10 and I have same results. Quite strange also that the method QueryBoundary on IQueryGeometry says at run-time that it's not implemented!

Dim pActiveView As IActiveView = pMap
Dim pScreenDisplay As IScreenDisplay = pActiveView.ScreenDisplay
Dim pDisplayTransform As IDisplayTransformation = pScreenDisplay.DisplayTransformation

Dim pFDOGraphicsLayer As IFDOGraphicsLayer = pMap.Layer(0)   'The Annotation featureclass
Dim pFDOGraphicsLayerRead As IFDOGraphicsLayerRead = pFDOGraphicsLayer

pFDOGraphicsLayerRead.StartGeneratingGraphics(Nothing, pScreenDisplay, True, True, False)

Dim pTextElement As ITextElement = pFDOGraphicsLayerRead.NextGraphic

Do Until pTextElement Is Nothing
      Dim pFormattedTextSymbol As IFormattedTextSymbol = pTextElement.Symbol
      Dim pTextBackground As ITextBackground = pFormattedTextSymbol.Background

      If TypeOf pTextBackground Is ILineCallout And pTextBackground IsNot Nothing Then
            Dim pLineCallout As ILineCallout = pTextBackground
            Dim pQueryGeometry As ESRI.ArcGIS.Display.IQueryGeometry = pLineCallout
            Dim pElement As IElement = pTextElement
            Dim pPointGeometry As IGeometry = pElement.Geometry
            pScreenDisplay.StartDrawing(pScreenDisplay.WindowDC, ScreenDisplay.ActiveCache)
            Dim pPolyline As IPolyline = New Polyline

            pPolyline = pQueryGeometry.GetGeometry(pScreenDisplay.WindowDC, DisplayTransform, pPointGeometry)

            If pPolyline IsNot Nothing Then      
               'At this point the polyline is always nothing***
            End If

        End If
    pTextElement = pFDOGraphicsLayerRead.NextGraphic


Any input would be of great help.

share|improve this question
up vote 1 down vote accepted

The leader line geometry of a LineCallout is generated during draw and is not exposed for access/modification. SimpleLineCallouts allow for custom line geometries.

share|improve this answer
Ok, it's not the ideal answer, but thanks, I will stop searching! But it's strange the function "GetGeometry" exist. Thanks! – jeb Mar 9 '11 at 16:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.