<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Callout text overlapping in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/callout-text-overlapping/m-p/25242#M669</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Can you post some code that shows how you are constructing and placing the callout element?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 Jul 2011 23:20:15 GMT</pubDate>
    <dc:creator>JeffreyHamblin</dc:creator>
    <dc:date>2011-07-20T23:20:15Z</dc:date>
    <item>
      <title>Callout text overlapping</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/callout-text-overlapping/m-p/25240#M667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Anyone I have any suggestions on how to add some conflict detection for text callouts? I have a custom tool that labels certain features a user has selected. The problem is when these features are close together the labels overlap and must be moved by the user. I am arbitrarily setting an offset for the callouts from the features when creating them so they will display away from the feature. However, I can???t find an easy way to determine if the callout will overlap another callout before placing it on the map.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jul 2011 14:17:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/callout-text-overlapping/m-p/25240#M667</guid>
      <dc:creator>JonathanMeyer</dc:creator>
      <dc:date>2011-07-08T14:17:52Z</dc:date>
    </item>
    <item>
      <title>Re: Callout text overlapping</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/callout-text-overlapping/m-p/25241#M668</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ok, so no help.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How bout can someone help me figure out the extent of the callout balloon text so I can at least try and figure out where these things are or should go on the map.&amp;nbsp; Using QueryBounds on the element it�??s not giving me the extent of the callout text.&amp;nbsp; It appears to be returning something that�??s close to the location of anchor point associated with the callout but not exactly.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jul 2011 19:24:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/callout-text-overlapping/m-p/25241#M668</guid>
      <dc:creator>JonathanMeyer</dc:creator>
      <dc:date>2011-07-20T19:24:13Z</dc:date>
    </item>
    <item>
      <title>Re: Callout text overlapping</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/callout-text-overlapping/m-p/25242#M669</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Can you post some code that shows how you are constructing and placing the callout element?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jul 2011 23:20:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/callout-text-overlapping/m-p/25242#M669</guid>
      <dc:creator>JeffreyHamblin</dc:creator>
      <dc:date>2011-07-20T23:20:15Z</dc:date>
    </item>
    <item>
      <title>Re: Callout text overlapping</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/callout-text-overlapping/m-p/25243#M670</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have simiplified this a little bit to post here but you should be able to get the idea:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; double fromX = centerline.FromPoint.X;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; double fromY = centerline.FromPoint.Y;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ITextElement leftFromTextElement = new TextElementClass();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IElement leftFromElement = leftFromTextElement as IElement;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IElementProperties leftFromProperties = leftFromElement as IElementProperties;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; leftFromProperties.Name = "LF:" + OID.ToString();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; leftFromTextElement.Text = "LF " + LeftAddressFrom.ToString();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ESRI.ArcGIS.Geometry.Point point = new ESRI.ArcGIS.Geometry.Point();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; point.PutCoords(fromX, fromY + mOffset);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; leftFromElement.Geometry = point;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Create text symbology&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IFormattedTextSymbol textSymLeftAlign = new TextSymbol() as IFormattedTextSymbol;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; stdole.IFontDisp fontFrom = textSymLeftAlign.Font;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fontFrom.Size = 8;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; textSymLeftAlign.Font = fontFrom;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; textSymLeftAlign.HorizontalAlignment = esriTextHorizontalAlignment.esriTHALeft;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ICallout callOut = new BalloonCalloutClass();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; textSymLeftAlign.Background = (ITextBackground)callOut;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Set anchor point&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ESRI.ArcGIS.Geometry.Point anchorPTFrom = new ESRI.ArcGIS.Geometry.Point();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; anchorPTFrom.PutCoords(fromX, fromY);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; callOut.AnchorPoint = anchorPTFrom;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; leftFromTextElement.Symbol = textSymLeftAlign;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IGraphicsContainer graphicsContainer = mMxDoc.ActivatedView as IGraphicsContainer;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; graphicsContainer.AddElement(leftFromElement, 0);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; leftFromElement.Activate(mMxDoc.ActivatedView.ScreenDisplay);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; //Testing to see if I can figure out extent of callout graphic&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; IEnvelope elementEnvelope = new EnvelopeClass();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; leftFromElement.QueryBounds(mMxDoc.ActiveView.ScreenDisplay,elementEnvelope);&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jul 2011 11:51:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/callout-text-overlapping/m-p/25243#M670</guid>
      <dc:creator>JonathanMeyer</dc:creator>
      <dc:date>2011-07-21T11:51:52Z</dc:date>
    </item>
    <item>
      <title>Re: Callout text overlapping</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/callout-text-overlapping/m-p/25244#M671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I put your code into a test Add-In and made as few modifications as needed to get it to run (just some constant values and document references):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;

public void PerformTest()
{
&amp;nbsp;&amp;nbsp;&amp;nbsp; double fromX = 0;
&amp;nbsp;&amp;nbsp;&amp;nbsp; double fromY = 0;

&amp;nbsp;&amp;nbsp;&amp;nbsp; ITextElement leftFromTextElement = new TextElementClass();
&amp;nbsp;&amp;nbsp;&amp;nbsp; IElement leftFromElement = leftFromTextElement as IElement;
&amp;nbsp;&amp;nbsp;&amp;nbsp; IElementProperties leftFromProperties = leftFromElement as IElementProperties;
&amp;nbsp;&amp;nbsp;&amp;nbsp; leftFromProperties.Name = "LF:" + "TEST";
&amp;nbsp;&amp;nbsp;&amp;nbsp; leftFromTextElement.Text = "Sample text to go in a callout to test gettting the size. " +
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "\r\nThis adds some text on a second line." +
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "\r\nThis adds some text on a third line.";


&amp;nbsp;&amp;nbsp;&amp;nbsp; ESRI.ArcGIS.Geometry.Point point = new ESRI.ArcGIS.Geometry.Point();

&amp;nbsp;&amp;nbsp;&amp;nbsp; point.PutCoords(fromX, fromY + 0);
&amp;nbsp;&amp;nbsp;&amp;nbsp; leftFromElement.Geometry = point;


&amp;nbsp;&amp;nbsp;&amp;nbsp; // Create text symbology
&amp;nbsp;&amp;nbsp;&amp;nbsp; IFormattedTextSymbol textSymLeftAlign = new TextSymbol() as IFormattedTextSymbol;
&amp;nbsp;&amp;nbsp;&amp;nbsp; stdole.IFontDisp fontFrom = textSymLeftAlign.Font;
&amp;nbsp;&amp;nbsp;&amp;nbsp; fontFrom.Size = 8;
&amp;nbsp;&amp;nbsp;&amp;nbsp; textSymLeftAlign.Font = fontFrom;
&amp;nbsp;&amp;nbsp;&amp;nbsp; textSymLeftAlign.HorizontalAlignment = esriTextHorizontalAlignment.esriTHALeft;

&amp;nbsp;&amp;nbsp;&amp;nbsp; ICallout callOut = new BalloonCalloutClass();
&amp;nbsp;&amp;nbsp;&amp;nbsp; textSymLeftAlign.Background = (ITextBackground)callOut;

&amp;nbsp;&amp;nbsp;&amp;nbsp; // Set anchor point
&amp;nbsp;&amp;nbsp;&amp;nbsp; ESRI.ArcGIS.Geometry.Point anchorPTFrom = new ESRI.ArcGIS.Geometry.Point();
&amp;nbsp;&amp;nbsp;&amp;nbsp; anchorPTFrom.PutCoords(fromX, fromY);
&amp;nbsp;&amp;nbsp;&amp;nbsp; callOut.AnchorPoint = anchorPTFrom;


&amp;nbsp;&amp;nbsp;&amp;nbsp; leftFromTextElement.Symbol = textSymLeftAlign;

&amp;nbsp;&amp;nbsp;&amp;nbsp; IGraphicsContainer graphicsContainer = ArcMap.Document.ActivatedView as IGraphicsContainer;
&amp;nbsp;&amp;nbsp;&amp;nbsp; graphicsContainer.AddElement(leftFromElement, 0);
&amp;nbsp;&amp;nbsp;&amp;nbsp; leftFromElement.Activate(ArcMap.Document.ActivatedView.ScreenDisplay);

&amp;nbsp;&amp;nbsp;&amp;nbsp; //Testing to see if I can figure out extent of callout graphic
&amp;nbsp;&amp;nbsp;&amp;nbsp; IEnvelope elementEnvelope = new EnvelopeClass();
&amp;nbsp;&amp;nbsp;&amp;nbsp; leftFromElement.QueryBounds(ArcMap.Document.ActiveView.ScreenDisplay, elementEnvelope);

&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Diagnostics.Debug.WriteLine("Element: " + elementEnvelope.Width + ", " + elementEnvelope.Height);
}
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The output in Page Layout is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Element: 2.85220000000118, 0.530399999999645&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The output in Data View is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Element: 6608.73942823708, 1228.99884448946&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;These look to me to correspond to the width and height of the callout box. Isn't that what you are looking for?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:01:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/callout-text-overlapping/m-p/25244#M671</guid>
      <dc:creator>JeffreyHamblin</dc:creator>
      <dc:date>2021-12-10T21:01:18Z</dc:date>
    </item>
    <item>
      <title>Re: Callout text overlapping</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/callout-text-overlapping/m-p/25245#M672</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I put your code into a test Add-In and made as few modifications as needed to get it to run (just some constant values and document references):&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;

public void PerformTest()
{
&amp;nbsp;&amp;nbsp;&amp;nbsp; double fromX = 0;
&amp;nbsp;&amp;nbsp;&amp;nbsp; double fromY = 0;

&amp;nbsp;&amp;nbsp;&amp;nbsp; ITextElement leftFromTextElement = new TextElementClass();
&amp;nbsp;&amp;nbsp;&amp;nbsp; IElement leftFromElement = leftFromTextElement as IElement;
&amp;nbsp;&amp;nbsp;&amp;nbsp; IElementProperties leftFromProperties = leftFromElement as IElementProperties;
&amp;nbsp;&amp;nbsp;&amp;nbsp; leftFromProperties.Name = "LF:" + "TEST";
&amp;nbsp;&amp;nbsp;&amp;nbsp; leftFromTextElement.Text = "Sample text to go in a callout to test gettting the size. " +
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "\r\nThis adds some text on a second line." +
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "\r\nThis adds some text on a third line.";


&amp;nbsp;&amp;nbsp;&amp;nbsp; ESRI.ArcGIS.Geometry.Point point = new ESRI.ArcGIS.Geometry.Point();

&amp;nbsp;&amp;nbsp;&amp;nbsp; point.PutCoords(fromX, fromY + 0);
&amp;nbsp;&amp;nbsp;&amp;nbsp; leftFromElement.Geometry = point;


&amp;nbsp;&amp;nbsp;&amp;nbsp; // Create text symbology
&amp;nbsp;&amp;nbsp;&amp;nbsp; IFormattedTextSymbol textSymLeftAlign = new TextSymbol() as IFormattedTextSymbol;
&amp;nbsp;&amp;nbsp;&amp;nbsp; stdole.IFontDisp fontFrom = textSymLeftAlign.Font;
&amp;nbsp;&amp;nbsp;&amp;nbsp; fontFrom.Size = 8;
&amp;nbsp;&amp;nbsp;&amp;nbsp; textSymLeftAlign.Font = fontFrom;
&amp;nbsp;&amp;nbsp;&amp;nbsp; textSymLeftAlign.HorizontalAlignment = esriTextHorizontalAlignment.esriTHALeft;

&amp;nbsp;&amp;nbsp;&amp;nbsp; ICallout callOut = new BalloonCalloutClass();
&amp;nbsp;&amp;nbsp;&amp;nbsp; textSymLeftAlign.Background = (ITextBackground)callOut;

&amp;nbsp;&amp;nbsp;&amp;nbsp; // Set anchor point
&amp;nbsp;&amp;nbsp;&amp;nbsp; ESRI.ArcGIS.Geometry.Point anchorPTFrom = new ESRI.ArcGIS.Geometry.Point();
&amp;nbsp;&amp;nbsp;&amp;nbsp; anchorPTFrom.PutCoords(fromX, fromY);
&amp;nbsp;&amp;nbsp;&amp;nbsp; callOut.AnchorPoint = anchorPTFrom;


&amp;nbsp;&amp;nbsp;&amp;nbsp; leftFromTextElement.Symbol = textSymLeftAlign;

&amp;nbsp;&amp;nbsp;&amp;nbsp; IGraphicsContainer graphicsContainer = ArcMap.Document.ActivatedView as IGraphicsContainer;
&amp;nbsp;&amp;nbsp;&amp;nbsp; graphicsContainer.AddElement(leftFromElement, 0);
&amp;nbsp;&amp;nbsp;&amp;nbsp; leftFromElement.Activate(ArcMap.Document.ActivatedView.ScreenDisplay);

&amp;nbsp;&amp;nbsp;&amp;nbsp; //Testing to see if I can figure out extent of callout graphic
&amp;nbsp;&amp;nbsp;&amp;nbsp; IEnvelope elementEnvelope = new EnvelopeClass();
&amp;nbsp;&amp;nbsp;&amp;nbsp; leftFromElement.QueryBounds(ArcMap.Document.ActiveView.ScreenDisplay, elementEnvelope);

&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Diagnostics.Debug.WriteLine("Element: " + elementEnvelope.Width + ", " + elementEnvelope.Height);
}
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;The output in Page Layout is:&lt;BR /&gt;Element: 2.85220000000118, 0.530399999999645&lt;BR /&gt;&lt;BR /&gt;The output in Data View is:&lt;BR /&gt;Element: 6608.73942823708, 1228.99884448946&lt;BR /&gt;&lt;BR /&gt;These look to me to correspond to the width and height of the callout box. Isn't that what you are looking for?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If you go to the coordinates returned for upper left/right, lower left/right on the elementEnvelope they aren't the four points of the callout box.&amp;nbsp; They aren't even close.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:01:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/callout-text-overlapping/m-p/25245#M672</guid>
      <dc:creator>JonathanMeyer</dc:creator>
      <dc:date>2021-12-10T21:01:20Z</dc:date>
    </item>
    <item>
      <title>Re: Callout text overlapping</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/callout-text-overlapping/m-p/25246#M673</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Running same test code as before. The corner location coordinates are correct in Layout View:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Element Size: 2.85220000000118, 0.530399999999645&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; UpperLeft:-0.0694000000003143, 0.436700000000201&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; LowerLeft:-0.0694000000003143, -0.0936999999994441&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; UpperRight:2.78280000000086, 0.436700000000201&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; LowerRight:2.78280000000086, -0.0936999999994441&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I added this to get the spatial ref and corners:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
System.Diagnostics.Debug.WriteLine("&amp;nbsp; SpatialReference: " + (leftFromTextElement as IGraphicElement).SpatialReference.Name);
System.Diagnostics.Debug.WriteLine("&amp;nbsp; UpperLeft:" + elementEnvelope.UpperLeft.X + ", " + elementEnvelope.UpperLeft.Y);
System.Diagnostics.Debug.WriteLine("&amp;nbsp; LowerLeft:" + elementEnvelope.LowerLeft.X + ", " + elementEnvelope.LowerLeft.Y);
System.Diagnostics.Debug.WriteLine("&amp;nbsp; UpperRight:" + elementEnvelope.UpperRight.X + ", " + elementEnvelope.UpperRight.Y);
System.Diagnostics.Debug.WriteLine("&amp;nbsp; LowerRight:" + elementEnvelope.LowerRight.X + ", " + elementEnvelope.LowerRight.Y);
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In Data View :&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Element Size: 6608.73942823708, 1228.99884448946&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; SpatialReference: NAD_1983_StatePlane_California_VI_FIPS_0406_Feet&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; UpperLeft:-160.905063271523, 1011.83200590312&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; LowerLeft:-160.905063271523, -217.16683858633&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; UpperRight:6447.83436496556, 1011.83200590312&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; LowerRight:6447.83436496556, -217.16683858633&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Using the Go To XY (set to Feet like the SR), and it located the corners correctly.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:01:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/callout-text-overlapping/m-p/25246#M673</guid>
      <dc:creator>JeffreyHamblin</dc:creator>
      <dc:date>2021-12-10T21:01:23Z</dc:date>
    </item>
    <item>
      <title>Re: Callout text overlapping</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/callout-text-overlapping/m-p/25247#M674</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Running same test code as before. The corner location coordinates are correct in Layout View:&lt;BR /&gt;&lt;BR /&gt;Element Size: 2.85220000000118, 0.530399999999645&lt;BR /&gt;&amp;nbsp; UpperLeft:-0.0694000000003143, 0.436700000000201&lt;BR /&gt;&amp;nbsp; LowerLeft:-0.0694000000003143, -0.0936999999994441&lt;BR /&gt;&amp;nbsp; UpperRight:2.78280000000086, 0.436700000000201&lt;BR /&gt;&amp;nbsp; LowerRight:2.78280000000086, -0.0936999999994441&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I added this to get the spatial ref and corners:&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
System.Diagnostics.Debug.WriteLine("&amp;nbsp; SpatialReference: " + (leftFromTextElement as IGraphicElement).SpatialReference.Name);
System.Diagnostics.Debug.WriteLine("&amp;nbsp; UpperLeft:" + elementEnvelope.UpperLeft.X + ", " + elementEnvelope.UpperLeft.Y);
System.Diagnostics.Debug.WriteLine("&amp;nbsp; LowerLeft:" + elementEnvelope.LowerLeft.X + ", " + elementEnvelope.LowerLeft.Y);
System.Diagnostics.Debug.WriteLine("&amp;nbsp; UpperRight:" + elementEnvelope.UpperRight.X + ", " + elementEnvelope.UpperRight.Y);
System.Diagnostics.Debug.WriteLine("&amp;nbsp; LowerRight:" + elementEnvelope.LowerRight.X + ", " + elementEnvelope.LowerRight.Y);
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;In Data View :&lt;BR /&gt;Element Size: 6608.73942823708, 1228.99884448946&lt;BR /&gt;&amp;nbsp; SpatialReference: NAD_1983_StatePlane_California_VI_FIPS_0406_Feet&lt;BR /&gt;&amp;nbsp; UpperLeft:-160.905063271523, 1011.83200590312&lt;BR /&gt;&amp;nbsp; LowerLeft:-160.905063271523, -217.16683858633&lt;BR /&gt;&amp;nbsp; UpperRight:6447.83436496556, 1011.83200590312&lt;BR /&gt;&amp;nbsp; LowerRight:6447.83436496556, -217.16683858633&lt;BR /&gt;&lt;BR /&gt;Using the Go To XY (set to Feet like the SR), and it located the corners correctly.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Ok yes I agree the code you have works and is returning the 4 corners.&amp;nbsp; However, try changing your offset value for Y on the leftFromElement.Geometry to something other then 0.&amp;nbsp; This way the actual callout appears away from the anchor point and will show the tail of the callout.&amp;nbsp; Then see if the returned coordinates match the corners of the box.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:01:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/callout-text-overlapping/m-p/25247#M674</guid>
      <dc:creator>JonathanMeyer</dc:creator>
      <dc:date>2021-12-10T21:01:26Z</dc:date>
    </item>
    <item>
      <title>Re: Callout text overlapping</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/callout-text-overlapping/m-p/25248#M675</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Ok yes I agree the code you have works and is returning the 4 corners.&amp;nbsp; However, try changing your offset value for Y on the leftFromElement.Geometry to something other then 0.&amp;nbsp; This way the actual callout appears away from the anchor point and will show the tail of the callout.&amp;nbsp; Then see if the returned coordinates match the corners of the box.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yeah, it looks like it returns the envelope surrounding the anchor and the balloon -- which makes sense since the element includes both.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Have you tried ITextBackground.QueryBoundary? Since the background is the ballooncallout, it seems like that should work. I don't have time to test it at the moment...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jul 2011 19:50:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/callout-text-overlapping/m-p/25248#M675</guid>
      <dc:creator>JeffreyHamblin</dc:creator>
      <dc:date>2011-07-21T19:50:25Z</dc:date>
    </item>
    <item>
      <title>Re: Callout text overlapping</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/callout-text-overlapping/m-p/25249#M676</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Yeah, it looks like it returns the envelope surrounding the anchor and the balloon -- which makes sense since the element includes both.&lt;BR /&gt;&lt;BR /&gt;Have you tried ITextBackground.QueryBoundary? Since the background is the ballooncallout, it seems like that should work. I don't have time to test it at the moment...&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;No, I'll give that a shot tomorrow see if it works.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jul 2011 21:11:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/callout-text-overlapping/m-p/25249#M676</guid>
      <dc:creator>JonathanMeyer</dc:creator>
      <dc:date>2011-07-21T21:11:34Z</dc:date>
    </item>
    <item>
      <title>Re: Callout text overlapping</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/callout-text-overlapping/m-p/25250#M677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It seems like ITextBackground.QueryBoundary should work but I'm getting an empty geometry returned.&amp;nbsp; I appreciate all the help by the way.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jul 2011 12:46:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/callout-text-overlapping/m-p/25250#M677</guid>
      <dc:creator>JonathanMeyer</dc:creator>
      <dc:date>2011-07-22T12:46:50Z</dc:date>
    </item>
    <item>
      <title>Re: Callout text overlapping</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/callout-text-overlapping/m-p/25251#M678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;It seems like ITextBackground.QueryBoundary should work but I'm getting an empty geometry returned.&amp;nbsp; I appreciate all the help by the way.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I got the same thing (empty geometry) using:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;

IPolygon poly = new PolygonClass();
textSymLeftAlign.Background.QueryBoundary(ArcMap.Document.ActiveView.ScreenDisplay.get_CacheMemDC(0),
&amp;nbsp;&amp;nbsp;&amp;nbsp; ArcMap.Document.ActiveView.ScreenDisplay.DisplayTransformation as ITransformation,
&amp;nbsp;&amp;nbsp;&amp;nbsp; poly);
System.Diagnostics.Debug.WriteLine("Background: " + poly.Envelope.Width + ", " + poly.Envelope.Height);
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Looking at the object model, there is another to try: IQueryGeometry.QueryEnvelope. Implemented by BalloonCallout.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I wish I could be more direct help, but I'm trying to figure this one out too. Hopefully we'll nail it in the end.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:01:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/callout-text-overlapping/m-p/25251#M678</guid>
      <dc:creator>JeffreyHamblin</dc:creator>
      <dc:date>2021-12-10T21:01:28Z</dc:date>
    </item>
    <item>
      <title>Re: Callout text overlapping</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/callout-text-overlapping/m-p/25252#M679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Well... I spent some time with IQueryGeometry.QueryEnvelope and keep getting "method or operation not implemented".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would think there is a way to get the balloon callout's envelope directly, but if you can't get it to work -- or if someone else doesn't jump into this thread with the solution&amp;nbsp; -- I found a cludgy way to get it: First place the element without an anchor and get the bounds of the callout. Then add the anchor.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
public void PerformTest()
{

&amp;nbsp;&amp;nbsp;&amp;nbsp; double fromX = 0;
&amp;nbsp;&amp;nbsp;&amp;nbsp; double fromY = 0;

&amp;nbsp;&amp;nbsp;&amp;nbsp; ITextElement textElement = new TextElementClass();
&amp;nbsp;&amp;nbsp;&amp;nbsp; IElement element = textElement as IElement;
&amp;nbsp;&amp;nbsp;&amp;nbsp; IElementProperties elementProperties = element as IElementProperties;

&amp;nbsp;&amp;nbsp;&amp;nbsp; textElement.Text = "Sample text to go in a callout to test getting the size. " +
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "\r\nThis adds some text on a second line." +
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "\r\nThis adds some text on a third line.";


&amp;nbsp;&amp;nbsp;&amp;nbsp; ESRI.ArcGIS.Geometry.Point point = new ESRI.ArcGIS.Geometry.Point();

&amp;nbsp;&amp;nbsp;&amp;nbsp; double offSetX = 0;
&amp;nbsp;&amp;nbsp;&amp;nbsp; double offSetY = 0;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (ArcMap.Document.ActivatedView is IPageLayout)
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // inches, page layout units
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; offSetX = 0.5;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; offSetY = 1;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; else
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // feet. This worked for my test map's scale.
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; offSetX = 800;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; offSetY = 1500;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }

&amp;nbsp;&amp;nbsp;&amp;nbsp; // Set the location of the callout balloon (lower-left corner of text)
&amp;nbsp;&amp;nbsp;&amp;nbsp; point.PutCoords(fromX + offSetX, fromY + offSetY);
&amp;nbsp;&amp;nbsp;&amp;nbsp; element.Geometry = point;


&amp;nbsp;&amp;nbsp;&amp;nbsp; // Create text symbology
&amp;nbsp;&amp;nbsp;&amp;nbsp; IFormattedTextSymbol formattedTextSymbol = new TextSymbol() as IFormattedTextSymbol;
&amp;nbsp;&amp;nbsp;&amp;nbsp; stdole.IFontDisp fontFrom = formattedTextSymbol.Font;
&amp;nbsp;&amp;nbsp;&amp;nbsp; fontFrom.Size = 8;
&amp;nbsp;&amp;nbsp;&amp;nbsp; formattedTextSymbol.Font = fontFrom;
&amp;nbsp;&amp;nbsp;&amp;nbsp; formattedTextSymbol.HorizontalAlignment = esriTextHorizontalAlignment.esriTHALeft;

&amp;nbsp;&amp;nbsp;&amp;nbsp; ICallout callOut = new BalloonCalloutClass();
&amp;nbsp;&amp;nbsp;&amp;nbsp; formattedTextSymbol.Background = (ITextBackground)callOut;

&amp;nbsp;&amp;nbsp;&amp;nbsp; textElement.Symbol = formattedTextSymbol;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; IGraphicsContainer graphicsContainer = ArcMap.Document.ActivatedView as IGraphicsContainer;

&amp;nbsp;&amp;nbsp;&amp;nbsp; // Add the callout element without a leader to an anchor point
&amp;nbsp;&amp;nbsp;&amp;nbsp; graphicsContainer.AddElement(element, 0);

&amp;nbsp;&amp;nbsp;&amp;nbsp; // Get the bounds of callout envelope for just the balloon
&amp;nbsp;&amp;nbsp;&amp;nbsp; IEnvelope elementEnvelope = new EnvelopeClass();
&amp;nbsp;&amp;nbsp;&amp;nbsp; element.QueryBounds(ArcMap.Document.ActiveView.ScreenDisplay, elementEnvelope);

&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Diagnostics.Debug.WriteLine("Element (Before Anchor): " + elementEnvelope.Width + ", " + elementEnvelope.Height);
&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Diagnostics.Debug.WriteLine("&amp;nbsp; SpatialReference: " + (textElement as IGraphicElement).SpatialReference.Name);
&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Diagnostics.Debug.WriteLine("&amp;nbsp; UpperLeft:" + elementEnvelope.UpperLeft.X + ", " + elementEnvelope.UpperLeft.Y);
&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Diagnostics.Debug.WriteLine("&amp;nbsp; LowerLeft:" + elementEnvelope.LowerLeft.X + ", " + elementEnvelope.LowerLeft.Y);
&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Diagnostics.Debug.WriteLine("&amp;nbsp; UpperRight:" + elementEnvelope.UpperRight.X + ", " + elementEnvelope.UpperRight.Y);
&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Diagnostics.Debug.WriteLine("&amp;nbsp; LowerRight:" + elementEnvelope.LowerRight.X + ", " + elementEnvelope.LowerRight.Y);

&amp;nbsp;&amp;nbsp;&amp;nbsp; // Set the leader anchor point
&amp;nbsp;&amp;nbsp;&amp;nbsp; ESRI.ArcGIS.Geometry.Point anchorPTFrom = new ESRI.ArcGIS.Geometry.Point();
&amp;nbsp;&amp;nbsp;&amp;nbsp; anchorPTFrom.PutCoords(fromX, fromY);
&amp;nbsp;&amp;nbsp;&amp;nbsp; callOut.AnchorPoint = anchorPTFrom;

&amp;nbsp;&amp;nbsp;&amp;nbsp; // Must re-assign this or leader to anchor is not created on map and querybounds
&amp;nbsp;&amp;nbsp;&amp;nbsp; // returns same value as before
&amp;nbsp;&amp;nbsp;&amp;nbsp; textElement.Symbol = formattedTextSymbol;

&amp;nbsp;&amp;nbsp;&amp;nbsp; // Get the bounds of the entire callout envelope surrounding balloon and leader
&amp;nbsp;&amp;nbsp;&amp;nbsp; element.QueryBounds(ArcMap.Document.ActiveView.ScreenDisplay, elementEnvelope);

&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Diagnostics.Debug.WriteLine("Element (After Anchor): " + elementEnvelope.Width + ", " + elementEnvelope.Height);
&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Diagnostics.Debug.WriteLine("&amp;nbsp; SpatialReference: " + (textElement as IGraphicElement).SpatialReference.Name);
&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Diagnostics.Debug.WriteLine("&amp;nbsp; UpperLeft:" + elementEnvelope.UpperLeft.X + ", " + elementEnvelope.UpperLeft.Y);
&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Diagnostics.Debug.WriteLine("&amp;nbsp; LowerLeft:" + elementEnvelope.LowerLeft.X + ", " + elementEnvelope.LowerLeft.Y);
&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Diagnostics.Debug.WriteLine("&amp;nbsp; UpperRight:" + elementEnvelope.UpperRight.X + ", " + elementEnvelope.UpperRight.Y);
&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Diagnostics.Debug.WriteLine("&amp;nbsp; LowerRight:" + elementEnvelope.LowerRight.X + ", " + elementEnvelope.LowerRight.Y);
}
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:01:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/callout-text-overlapping/m-p/25252#M679</guid>
      <dc:creator>JeffreyHamblin</dc:creator>
      <dc:date>2021-12-10T21:01:31Z</dc:date>
    </item>
    <item>
      <title>Re: Callout text overlapping</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/callout-text-overlapping/m-p/25253#M680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thats the same thing I was seeing Friday.&amp;nbsp; I figured I wasn't calling it correctly and was going to look at it again today.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jul 2011 11:27:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/callout-text-overlapping/m-p/25253#M680</guid>
      <dc:creator>JonathanMeyer</dc:creator>
      <dc:date>2011-07-25T11:27:22Z</dc:date>
    </item>
    <item>
      <title>Re: Callout text overlapping</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/callout-text-overlapping/m-p/25254#M681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Did anyone figure this thing out yet?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have balloon callouts that I just cannot get the shape for.&amp;nbsp; I've tried everything and nothing works.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Aug 2011 20:38:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/callout-text-overlapping/m-p/25254#M681</guid>
      <dc:creator>kyleknoche</dc:creator>
      <dc:date>2011-08-04T20:38:28Z</dc:date>
    </item>
    <item>
      <title>Re: Callout text overlapping</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/callout-text-overlapping/m-p/25255#M682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Did anyone figure this thing out yet?&lt;BR /&gt;&lt;BR /&gt;I have balloon callouts that I just cannot get the shape for.&amp;nbsp; I've tried everything and nothing works.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I ended up giving up and using the Maplex extension for what I needed to do.&amp;nbsp; Everything I tried ended up returning an empty geometry or method not implemented. One would think this should be possible but it's sure not documented anywhere.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If anyone does figure it out I also would be interested to know for future use.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Aug 2011 11:27:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/callout-text-overlapping/m-p/25255#M682</guid>
      <dc:creator>JonathanMeyer</dc:creator>
      <dc:date>2011-08-05T11:27:18Z</dc:date>
    </item>
  </channel>
</rss>

