<?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: How to get 'envelope' from layout GraphicElement in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-get-envelope-from-layout-graphicelement/m-p/845913#M4065</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Brennan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This was a great question and certainly generated some good discussion within our team.&amp;nbsp; May I ask why you want the "&lt;SPAN style="background-color: #ffffff;"&gt;actual bounds of the element within the page&lt;/SPAN&gt;"?&amp;nbsp; My assumption is that you want to position the element relative to other elements or other coordinates on the page.&amp;nbsp; If we were to build a helper function&amp;nbsp;that required less gymnastics that the code above, what is it exactly you need?&amp;nbsp; Is it simply a polygon/extent?&amp;nbsp; Maybe a r/o .getPageEnvelope(). Or is it&amp;nbsp;a list of x/y min/max values you need to perform the appropriate shifts on the page.&amp;nbsp; Below is an alternative script that does something very similar to the code above.&amp;nbsp; I don't need to create a geometry if I have the stats below to perform my positional adjustments.&amp;nbsp; But equally difficult is shifting an element on the layout based on the anchor position.&amp;nbsp; Granted the math is easier but there are 8 positions to take into account.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Again, if you could help recommend the exact function that would help with your workflow we might be able to add that capability into a future API.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jeff - Layout Team&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;      Layout layout = LayoutView.Active.Layout;
      await QueuedTask.Run(() =&amp;gt;
      {
        //Reference text element and preserve original settings
        TextElement txtElm = layout.FindElement("Text") as TextElement;
        Double xMin = txtElm.GetX(), xMax = txtElm.GetX();
        Double yMin = txtElm.GetY(), yMax = txtElm.GetY();
        Anchor orig_anchor = txtElm.GetAnchor();

        //Iterate through each anchor position and preserve min/max values
        var values = Enum.GetValues(typeof(Anchor));
        foreach (Anchor val in values)
        {
          txtElm.SetAnchor(val);
          if (txtElm.GetX() &amp;lt; xMin) { xMin = txtElm.GetX(); }
          if (txtElm.GetY() &amp;lt; yMin) { yMin = txtElm.GetY(); }
          if (txtElm.GetX() &amp;gt; xMax) { xMax = txtElm.GetX(); }
          if (txtElm.GetY() &amp;gt; yMax) { yMax = txtElm.GetY(); }
        }
        txtElm.SetAnchor(orig_anchor);  //Need to set back to original location

        //The following just creates a visual representation of the graphic
        Envelope env = EnvelopeBuilder.CreateEnvelope(xMin, yMin, xMax, yMax, null);
        CIMStroke lineStroke = SymbolFactory.Instance.ConstructStroke(ColorFactory.Instance.BlackRGB, 1, SimpleLineStyle.DashDotDot);
        LayoutElementFactory.Instance.CreatePolygonGraphicElement(layout, env, SymbolFactory.Instance.ConstructPolygonSymbol(ColorFactory.Instance.RedRGB, SimpleFillStyle.Null, lineStroke));
        });&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 10:22:37 GMT</pubDate>
    <dc:creator>JeffBarrette</dc:creator>
    <dc:date>2021-12-12T10:22:37Z</dc:date>
    <item>
      <title>How to get 'envelope' from layout GraphicElement</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-get-envelope-from-layout-graphicelement/m-p/845911#M4063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to programmatically determine the bounds (in layout/page coordinates) of a layout element. I see that there are methods like GetX(), GetWidth(), GetY(), GetHeight() on a GraphicElement, but the graphic element may not actually be positioned within (x,y) through (x+width, y+height). For instance, if you create a text graphic element using a CIMTextSymbol whose rotation is set to 90°, the reported width of the resulting element will be greater than the reported height, even though the element is rotated such that it is much taller than it is wide. These methods seem to be returning the size of the element before rotation is applied. I am hoping to get the actual bounds of the element within the page, much like you could get the envelope of a polygon within a map. I could probably use GetRotation() and GetAnchor() along with the X, Y, width, and height to calculate the actual bounds of the element, but I don't trust that rotation is the only other variable that is affecting the actual position and size of the element in the layout. Is there a convenient way to get the 'envelope' for any given GraphicElement in a layout?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Brennan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Feb 2020 16:43:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-get-envelope-from-layout-graphicelement/m-p/845911#M4063</guid>
      <dc:creator>BrennanJohnson</dc:creator>
      <dc:date>2020-02-22T16:43:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to get 'envelope' from layout GraphicElement</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-get-envelope-from-layout-graphicelement/m-p/845912#M4064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The best way to get the bounding envelope of the graphic element is to:&lt;/P&gt;&lt;P&gt;* Construct a polygon using the X, Y, Width and Height of the element.&lt;/P&gt;&lt;P&gt;* Rotate the polygon with the element's rotation angle.&lt;/P&gt;&lt;P&gt;* Use the "Extent" property on the polygon to get the "envelope" extent.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is some code that does this -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;QueuedTask&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Run&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; layout &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; Project&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Current&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GetItems&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;LayoutProjectItem&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;FirstOrDefault&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;GetLayout&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; element &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; layout&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Elements&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;OfType&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;GraphicElement&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;FirstOrDefault&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;element &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;null&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        &lt;SPAN class="comment token"&gt;//Get the element's X, Y, Width and height&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; x &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; element&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;GetX&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; y &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; element&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;GetY&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; width &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; element&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;GetWidth&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; height &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; element&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;GetHeight&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

        &lt;SPAN class="comment token"&gt;//Create a polygon using the Graphic elements X, Y, Width and Height.&lt;/SPAN&gt;
        MapPoint pt1 &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; MapPointBuilder&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;CreateMapPoint&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;x&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; y&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;//Anchor pt - lower left&lt;/SPAN&gt;
        MapPoint pt2 &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; MapPointBuilder&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;CreateMapPoint&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;x &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; width&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; y&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;//lower right&lt;/SPAN&gt;
        MapPoint pt3 &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; MapPointBuilder&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;CreateMapPoint&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;x &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; width&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; y &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; height &lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="comment token"&gt;//upper right&lt;/SPAN&gt;
        MapPoint pt4 &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; MapPointBuilder&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;CreateMapPoint&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;x&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; y &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; height&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="comment token"&gt;//upper left&lt;/SPAN&gt;

        List&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;MapPoint&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; list &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;List&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;MapPoint&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt; pt1&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; pt2&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; pt3&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; pt4 &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

        Polygon polygon &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; PolygonBuilder&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;CreatePolygon&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;list&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;null&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

        &lt;SPAN class="comment token"&gt;//Rotate the polygon by the same angle the graphic element is rotated by&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; polygonRotate &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; GeometryEngine&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Instance&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Rotate&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;polygon&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; pt1&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; element&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;GetRotation&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;Math&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;PI &lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;180&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; Polygon&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;//Angle should be in radians.&lt;/SPAN&gt;

        &lt;SPAN class="comment token"&gt;//Use polygonRotate to get the bounds of the rotated text element&lt;/SPAN&gt;
        System&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Diagnostics&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Debug&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;WriteLine&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;$&lt;SPAN class="string token"&gt;"Width: {polygonRotate.Extent.Width}, Height: {polygonRotate.Extent.Height}"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

        &lt;SPAN class="comment token"&gt;//Create another graphic element that envelops the original element&lt;/SPAN&gt;
        Envelope env &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; polygonRotate&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Extent&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        CIMStroke lineStroke &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; SymbolFactory&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Instance&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;ConstructStroke&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;ColorFactory&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Instance&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;BlackRGB&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; SimpleLineStyle&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;DashDotDot&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        LayoutElementFactory&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Instance&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;CreatePolygonGraphicElement&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;layout&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; env&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; SymbolFactory&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Instance&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;ConstructPolygonSymbol&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;ColorFactory&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Instance&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;RedRGB&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; SimpleFillStyle&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Null&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; lineStroke&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

      &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:22:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-get-envelope-from-layout-graphicelement/m-p/845912#M4064</guid>
      <dc:creator>UmaHarano</dc:creator>
      <dc:date>2021-12-12T10:22:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to get 'envelope' from layout GraphicElement</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-get-envelope-from-layout-graphicelement/m-p/845913#M4065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Brennan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This was a great question and certainly generated some good discussion within our team.&amp;nbsp; May I ask why you want the "&lt;SPAN style="background-color: #ffffff;"&gt;actual bounds of the element within the page&lt;/SPAN&gt;"?&amp;nbsp; My assumption is that you want to position the element relative to other elements or other coordinates on the page.&amp;nbsp; If we were to build a helper function&amp;nbsp;that required less gymnastics that the code above, what is it exactly you need?&amp;nbsp; Is it simply a polygon/extent?&amp;nbsp; Maybe a r/o .getPageEnvelope(). Or is it&amp;nbsp;a list of x/y min/max values you need to perform the appropriate shifts on the page.&amp;nbsp; Below is an alternative script that does something very similar to the code above.&amp;nbsp; I don't need to create a geometry if I have the stats below to perform my positional adjustments.&amp;nbsp; But equally difficult is shifting an element on the layout based on the anchor position.&amp;nbsp; Granted the math is easier but there are 8 positions to take into account.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Again, if you could help recommend the exact function that would help with your workflow we might be able to add that capability into a future API.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jeff - Layout Team&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;      Layout layout = LayoutView.Active.Layout;
      await QueuedTask.Run(() =&amp;gt;
      {
        //Reference text element and preserve original settings
        TextElement txtElm = layout.FindElement("Text") as TextElement;
        Double xMin = txtElm.GetX(), xMax = txtElm.GetX();
        Double yMin = txtElm.GetY(), yMax = txtElm.GetY();
        Anchor orig_anchor = txtElm.GetAnchor();

        //Iterate through each anchor position and preserve min/max values
        var values = Enum.GetValues(typeof(Anchor));
        foreach (Anchor val in values)
        {
          txtElm.SetAnchor(val);
          if (txtElm.GetX() &amp;lt; xMin) { xMin = txtElm.GetX(); }
          if (txtElm.GetY() &amp;lt; yMin) { yMin = txtElm.GetY(); }
          if (txtElm.GetX() &amp;gt; xMax) { xMax = txtElm.GetX(); }
          if (txtElm.GetY() &amp;gt; yMax) { yMax = txtElm.GetY(); }
        }
        txtElm.SetAnchor(orig_anchor);  //Need to set back to original location

        //The following just creates a visual representation of the graphic
        Envelope env = EnvelopeBuilder.CreateEnvelope(xMin, yMin, xMax, yMax, null);
        CIMStroke lineStroke = SymbolFactory.Instance.ConstructStroke(ColorFactory.Instance.BlackRGB, 1, SimpleLineStyle.DashDotDot);
        LayoutElementFactory.Instance.CreatePolygonGraphicElement(layout, env, SymbolFactory.Instance.ConstructPolygonSymbol(ColorFactory.Instance.RedRGB, SimpleFillStyle.Null, lineStroke));
        });&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:22:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-get-envelope-from-layout-graphicelement/m-p/845913#M4065</guid>
      <dc:creator>JeffBarrette</dc:creator>
      <dc:date>2021-12-12T10:22:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to get 'envelope' from layout GraphicElement</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-get-envelope-from-layout-graphicelement/m-p/845914#M4066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jeff,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your assumption is basically correct: I am allowing a user to set the font styling they desire, and at runtime, I am generating layout elements to display data with that selected styling. After generating these layout elements, I want to ensure that they are placed within a given area on the page and that they do not overlap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I basically just want an Envelope-style object (although I wouldn't care if it was an actual Envelope) in which I can check the X and Y mins and maxes and get back values that correspond to the page coordinates. I would then be able to ignore any kind of rotation that the user decided to apply to text objects and simply look at the bounds of the generated element.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found that paragraph text can work as an alternative, since you can directly specify the envelope that the text must be drawn within, but there are cases where it would be convenient to create point text instead. I appreciate the code snippets and will test those out in the meantime.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Brennan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Feb 2020 18:24:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-get-envelope-from-layout-graphicelement/m-p/845914#M4066</guid>
      <dc:creator>BrennanJohnson</dc:creator>
      <dc:date>2020-02-27T18:24:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to get 'envelope' from layout GraphicElement</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-get-envelope-from-layout-graphicelement/m-p/845915#M4067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We added a new method at ArcGIS Pro 2.6 called Element.GetBounds([bool rotated = false]) that will return either the unrotated or rotated envelope for an element.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;      Layout layout &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; LayoutView&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Active&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Layout&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
      &lt;SPAN class="keyword token"&gt;await&lt;/SPAN&gt; QueuedTask&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Run&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;
      &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
        &lt;SPAN class="comment token"&gt;//Reference text element and get rotated and unrotated envelope&lt;/SPAN&gt;
        TextElement txtElm &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; layout&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;FindElement&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Text"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; TextElement&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        Envelope bounds &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; txtElm&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;GetBounds&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;false&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        Envelope rot_bounds &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; txtElm&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;GetBounds&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;true&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

        &lt;SPAN class="comment token"&gt;//Draw both envelopes on layout&lt;/SPAN&gt;
        CIMStroke lineStroke1 &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; SymbolFactory&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Instance&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;ConstructStroke&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;ColorFactory&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Instance&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;BlackRGB&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; SimpleLineStyle&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;DashDotDot&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        CIMStroke lineStroke2 &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; SymbolFactory&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Instance&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;ConstructStroke&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;ColorFactory&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Instance&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;RedRGB&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; SimpleLineStyle&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;DashDotDot&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        LayoutElementFactory&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Instance&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;CreatePolygonGraphicElement&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;layout&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; bounds&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; SymbolFactory&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Instance&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;ConstructPolygonSymbol&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;ColorFactory&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Instance&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;RedRGB&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; SimpleFillStyle&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Null&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; lineStroke1&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        LayoutElementFactory&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Instance&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;CreatePolygonGraphicElement&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;layout&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; rot_bounds&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; SymbolFactory&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Instance&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;ConstructPolygonSymbol&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;ColorFactory&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Instance&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;RedRGB&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; SimpleFillStyle&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Null&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; lineStroke2&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
      &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;IMG alt="" class="jive-emoji image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/487590_Capture.JPG" /&gt;&lt;/P&gt;&lt;P&gt;Jeff - Layout Team&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:22:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-get-envelope-from-layout-graphicelement/m-p/845915#M4067</guid>
      <dc:creator>JeffBarrette</dc:creator>
      <dc:date>2021-12-12T10:22:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to get 'envelope' from layout GraphicElement</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-get-envelope-from-layout-graphicelement/m-p/845916#M4068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.esri.com/migrated-users/3200"&gt;Jeff Barrette&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the update. That method will be convenient to have.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After working more with text in layouts there are a few more utility methods/options that would be critical to what I'm trying to do, and which I'd expect would be extremely useful to users in general. In order of importance:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1) Option for paragraph text to both wrap to new lines and shrink font size automatically.&lt;/STRONG&gt; Currently, the text automatically wraps to new lines, but when it reaches the bottom of its envelope, it gets cut off and shows an ellipsis symbol. It would be extremely nice to set some 'AutoShrink' property to 'true' and have the text automatically wrap to new lines and then shrink the font size until all of the text fits within the allotted envelope. Or, instead of having a boolean setting, a particularly useful way that this option could be implemented would be to have an property on the paragraph text like 'OverflowBehavior' that has some underlying enumeration of choices like 'ShowEllipsis', 'ShrinkFont', 'ExpandEnvelopeHorizontally', 'ExpandEnvelopeVertically'. In this way, a user could control exactly how the text should look without worrying about it being truncated.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2)&lt;/STRONG&gt; It would be great to have the same &lt;STRONG&gt;GetBounds() method for paragraph text&lt;/STRONG&gt; as you just added for point text, which would return the actual bounds of the drawn text. For instance, I may create a 6" X 6" envelope to draw my paragraph text in, but the text itself ends up being drawn in a 6" X 1.1" space, the GetBounds() method would return the 6" X 1.1" envelope. Currently, if you check the bounds on a paragraph text object, it simply gives you back the original envelope...you have no way to tell how much space is actually occupied by the text. In a situation like mine, where I am trying to arrange multiple text elements with dynamically generated text in a layout such that it takes up as little space as possible,&amp;nbsp;it would be tremendously helpful to know the bounds of the drawn text on the screen.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;3)&lt;/STRONG&gt; &lt;STRONG&gt;Property on paragraph text that says whether or not the text overflowed its envelope.&lt;/STRONG&gt; There is apparently no way to tell whether or not the text overflowed other than visually looking at the layout, where the tiny ellipsis indicator is shown. In my case, I am dynamically creating text elements from code, and want to prevent the ellipsis from ever appearing. Arc Pro obviously has access to this property, since it is showing the ellipsis in response, but there is apparently no way to access it from the API.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The&amp;nbsp;underlying problem that all three of these issues address is this: I have the ability to draw paragraph text, but there is no way to ensure programmatically that the text fits within the specified envelope. I also have no way to check how much space the text is actually taking up, and therefore cannot optimize the placement of the text within the layout.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I really appreciate your continued efforts to improve the API and hope you consider adding at least one the suggestions above.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again,&lt;/P&gt;&lt;P&gt;Brennan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Apr 2020 16:19:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-get-envelope-from-layout-graphicelement/m-p/845916#M4068</guid>
      <dc:creator>BrennanJohnson</dc:creator>
      <dc:date>2020-04-08T16:19:43Z</dc:date>
    </item>
  </channel>
</rss>

