2

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***
 MsgBox(pPolyline.Length)
 End If
 pScreenDisplay.FinishDrawing()
 End If
 pTextElement = pFDOGraphicsLayerRead.NextGraphic
Loop

Source: http://forums.esri.com/thread.asp?c=93&f=993&t=275411

Hornbydd
44.9k5 gold badges43 silver badges84 bronze badges
asked Mar 7, 2011 at 21:20

1 Answer 1

3

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

answered Mar 8, 2011 at 6:33
0

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.