<?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 Help with layout in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/help-with-layout/m-p/1292994#M9860</link>
    <description>&lt;P&gt;I am creating a textbox with a balloon callout inside on a layout.&amp;nbsp; &amp;nbsp;My textbox anchor is the lr corner but it is placing the callout in the ur corner (see attached image).&amp;nbsp; &amp;nbsp;How can i force the callout to the lr?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is a snippet of my code:&lt;/P&gt;&lt;P&gt;// Add notify box&lt;BR /&gt;string notifyTxt = "NOTIFY: XXXX,\r\nXXXXX...";&lt;BR /&gt;Coordinate2D notifyCoord = new Coordinate2D(8.1, 1.2);&lt;BR /&gt;CIMTextSymbol arial10reg = SymbolFactory.Instance.ConstructTextSymbol(ColorFactory.Instance.BlackRGB, 10, "Arial", "Regular");&lt;BR /&gt;var balloonCallout = new CIMBalloonCallout();&lt;BR /&gt;balloonCallout.BalloonStyle = BalloonCalloutStyle.Rectangle;&lt;BR /&gt;var notifyPoly = SymbolFactory.Instance.ConstructPolygonSymbol(SymbolFactory.Instance.ConstructSolidFill(ColorFactory.Instance.CreateRGBColor(225, 225, 225, 100)), SymbolFactory.Instance.ConstructStroke(ColorFactory.Instance.CreateRGBColor(110, 110, 110, 100), 1));&lt;BR /&gt;balloonCallout.BackgroundSymbol = notifyPoly;&lt;BR /&gt;balloonCallout.Margin = new CIMTextMargin&lt;BR /&gt;{&lt;BR /&gt;Left = 6,&lt;BR /&gt;Right = 6,&lt;BR /&gt;Bottom = 6,&lt;BR /&gt;Top = 6&lt;BR /&gt;};&lt;BR /&gt;arial10reg.Callout = balloonCallout;&lt;BR /&gt;//GraphicElement notifyTxtElm = ElementFactory.Instance.CreateTextGraphicElement(layout_local, TextType.PointText, notifyCoord.ToMapPoint(), arial10reg, notifyTxt);&lt;BR /&gt;GraphicElement notifyTxtElm = ElementFactory.Instance.CreateTextGraphicElement(layout_local, TextType.RectangleParagraph, notifyCoord.ToMapPoint(), arial10reg, notifyTxt);&lt;BR /&gt;notifyTxtElm.SetName("Notify Text");&lt;BR /&gt;notifyTxtElm.SetAnchor(Anchor.BottomRightCorner);&lt;BR /&gt;notifyTxtElm.SetX(8.1);&lt;BR /&gt;notifyTxtElm.SetY(1.2);&lt;/P&gt;&lt;P&gt;string NotifyBox = "";&lt;BR /&gt;LayoutProjectItem layoutItem = Project.Current.GetItems&amp;lt;LayoutProjectItem&amp;gt;().FirstOrDefault(item =&amp;gt; item.Name.Equals(newMapName));&lt;BR /&gt;if (layoutItem != null)&lt;BR /&gt;{&lt;BR /&gt;Layout layout = layoutItem.GetLayout();&lt;BR /&gt;if (layout != null)&lt;BR /&gt;{&lt;BR /&gt;foreach (var item in notifyList)&lt;BR /&gt;{&lt;BR /&gt;if ((item.Substring(0, 7) == "NOTIFY:"))&lt;BR /&gt;{&lt;BR /&gt;NotifyBox = item;&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;NotifyBox = NotifyBox + Environment.NewLine + item;&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;ArcGIS.Desktop.Layouts.TextElement txtNotifyElm = layout.FindElement("Notify Text") as ArcGIS.Desktop.Layouts.TextElement;&lt;/P&gt;&lt;P&gt;Geometry geo1 = bLayer.QueryExtent();&lt;BR /&gt;Envelope env = geo1.Extent;&lt;BR /&gt;MapFrame mf = layout.Elements.FirstOrDefault(item =&amp;gt; item.Name.Equals("New Map Frame")) as MapFrame;&lt;BR /&gt;mf.SetCamera(env);&lt;BR /&gt;if (NotifyBox.Length &amp;lt;= &lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt;&lt;BR /&gt;{&lt;BR /&gt;txtNotifyElm.SetVisible(false);&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;TextProperties txtNotifyProperties = new TextProperties(NotifyBox, "Arial", 9, "Bold");&lt;BR /&gt;txtNotifyElm.SetTextProperties(txtNotifyProperties);&lt;BR /&gt;txtNotifyElm.SetLockedAspectRatio(false);&lt;BR /&gt;txtNotifyElm.SetAnchor(Anchor.BottomRightCorner);&lt;BR /&gt;txtNotifyElm.SetX(8.10);&lt;BR /&gt;txtNotifyElm.SetY(1.20);&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 25 May 2023 12:27:09 GMT</pubDate>
    <dc:creator>mstranovsky</dc:creator>
    <dc:date>2023-05-25T12:27:09Z</dc:date>
    <item>
      <title>Help with layout</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/help-with-layout/m-p/1292994#M9860</link>
      <description>&lt;P&gt;I am creating a textbox with a balloon callout inside on a layout.&amp;nbsp; &amp;nbsp;My textbox anchor is the lr corner but it is placing the callout in the ur corner (see attached image).&amp;nbsp; &amp;nbsp;How can i force the callout to the lr?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is a snippet of my code:&lt;/P&gt;&lt;P&gt;// Add notify box&lt;BR /&gt;string notifyTxt = "NOTIFY: XXXX,\r\nXXXXX...";&lt;BR /&gt;Coordinate2D notifyCoord = new Coordinate2D(8.1, 1.2);&lt;BR /&gt;CIMTextSymbol arial10reg = SymbolFactory.Instance.ConstructTextSymbol(ColorFactory.Instance.BlackRGB, 10, "Arial", "Regular");&lt;BR /&gt;var balloonCallout = new CIMBalloonCallout();&lt;BR /&gt;balloonCallout.BalloonStyle = BalloonCalloutStyle.Rectangle;&lt;BR /&gt;var notifyPoly = SymbolFactory.Instance.ConstructPolygonSymbol(SymbolFactory.Instance.ConstructSolidFill(ColorFactory.Instance.CreateRGBColor(225, 225, 225, 100)), SymbolFactory.Instance.ConstructStroke(ColorFactory.Instance.CreateRGBColor(110, 110, 110, 100), 1));&lt;BR /&gt;balloonCallout.BackgroundSymbol = notifyPoly;&lt;BR /&gt;balloonCallout.Margin = new CIMTextMargin&lt;BR /&gt;{&lt;BR /&gt;Left = 6,&lt;BR /&gt;Right = 6,&lt;BR /&gt;Bottom = 6,&lt;BR /&gt;Top = 6&lt;BR /&gt;};&lt;BR /&gt;arial10reg.Callout = balloonCallout;&lt;BR /&gt;//GraphicElement notifyTxtElm = ElementFactory.Instance.CreateTextGraphicElement(layout_local, TextType.PointText, notifyCoord.ToMapPoint(), arial10reg, notifyTxt);&lt;BR /&gt;GraphicElement notifyTxtElm = ElementFactory.Instance.CreateTextGraphicElement(layout_local, TextType.RectangleParagraph, notifyCoord.ToMapPoint(), arial10reg, notifyTxt);&lt;BR /&gt;notifyTxtElm.SetName("Notify Text");&lt;BR /&gt;notifyTxtElm.SetAnchor(Anchor.BottomRightCorner);&lt;BR /&gt;notifyTxtElm.SetX(8.1);&lt;BR /&gt;notifyTxtElm.SetY(1.2);&lt;/P&gt;&lt;P&gt;string NotifyBox = "";&lt;BR /&gt;LayoutProjectItem layoutItem = Project.Current.GetItems&amp;lt;LayoutProjectItem&amp;gt;().FirstOrDefault(item =&amp;gt; item.Name.Equals(newMapName));&lt;BR /&gt;if (layoutItem != null)&lt;BR /&gt;{&lt;BR /&gt;Layout layout = layoutItem.GetLayout();&lt;BR /&gt;if (layout != null)&lt;BR /&gt;{&lt;BR /&gt;foreach (var item in notifyList)&lt;BR /&gt;{&lt;BR /&gt;if ((item.Substring(0, 7) == "NOTIFY:"))&lt;BR /&gt;{&lt;BR /&gt;NotifyBox = item;&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;NotifyBox = NotifyBox + Environment.NewLine + item;&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;ArcGIS.Desktop.Layouts.TextElement txtNotifyElm = layout.FindElement("Notify Text") as ArcGIS.Desktop.Layouts.TextElement;&lt;/P&gt;&lt;P&gt;Geometry geo1 = bLayer.QueryExtent();&lt;BR /&gt;Envelope env = geo1.Extent;&lt;BR /&gt;MapFrame mf = layout.Elements.FirstOrDefault(item =&amp;gt; item.Name.Equals("New Map Frame")) as MapFrame;&lt;BR /&gt;mf.SetCamera(env);&lt;BR /&gt;if (NotifyBox.Length &amp;lt;= &lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt;&lt;BR /&gt;{&lt;BR /&gt;txtNotifyElm.SetVisible(false);&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;TextProperties txtNotifyProperties = new TextProperties(NotifyBox, "Arial", 9, "Bold");&lt;BR /&gt;txtNotifyElm.SetTextProperties(txtNotifyProperties);&lt;BR /&gt;txtNotifyElm.SetLockedAspectRatio(false);&lt;BR /&gt;txtNotifyElm.SetAnchor(Anchor.BottomRightCorner);&lt;BR /&gt;txtNotifyElm.SetX(8.10);&lt;BR /&gt;txtNotifyElm.SetY(1.20);&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 May 2023 12:27:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/help-with-layout/m-p/1292994#M9860</guid>
      <dc:creator>mstranovsky</dc:creator>
      <dc:date>2023-05-25T12:27:09Z</dc:date>
    </item>
  </channel>
</rss>

