<?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: Graphics layer: element placement in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/graphics-layer-element-placement/m-p/865796#M4934</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Helen,&lt;/P&gt;&lt;P&gt;You have almost all the logic in &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Once you get the polygon of your feature, you need to get its lower left corner coordinates. Use that for the graphic's shape property.&amp;nbsp; So like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; poly &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; currentRow&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;GetShape&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="keyword token"&gt;var&lt;/SPAN&gt; lowerLeftX &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; poly&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Extent&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;XMin&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; lowerLeftY &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; poly&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Extent&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;YMin&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;‍‍‍
myLabelGraphic&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Shape &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;//Create MapPoint using these coordinates.&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Uma&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 10:45:41 GMT</pubDate>
    <dc:creator>UmaHarano</dc:creator>
    <dc:date>2021-12-12T10:45:41Z</dc:date>
    <item>
      <title>Graphics layer: element placement</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/graphics-layer-element-placement/m-p/865795#M4933</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I'm trying to have an element placed at the bottom left corner of the selected feature but can't figure out how to do it.&amp;nbsp; I can place it at the center of the polygon fine but not at any other positions.&amp;nbsp; Your help is much appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;while (foundCursor.MoveNext())&lt;BR /&gt; {&lt;BR /&gt; using (var row = foundCursor.Current)&lt;BR /&gt; {&lt;BR /&gt; var shape = row as Feature;&lt;BR /&gt; var poly = shape.GetShape() as Polygon;&lt;BR /&gt;myLabelGraphic.Shape = poly.Extent;&lt;BR /&gt;&lt;SPAN&gt;my&lt;/SPAN&gt;&lt;SPAN&gt;LabelGraphic&lt;/SPAN&gt;.Placement = Anchor.BottomLeftCorner;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Sep 2020 06:49:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/graphics-layer-element-placement/m-p/865795#M4933</guid>
      <dc:creator>helenchu</dc:creator>
      <dc:date>2020-09-14T06:49:06Z</dc:date>
    </item>
    <item>
      <title>Re: Graphics layer: element placement</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/graphics-layer-element-placement/m-p/865796#M4934</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Helen,&lt;/P&gt;&lt;P&gt;You have almost all the logic in &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Once you get the polygon of your feature, you need to get its lower left corner coordinates. Use that for the graphic's shape property.&amp;nbsp; So like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; poly &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; currentRow&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;GetShape&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="keyword token"&gt;var&lt;/SPAN&gt; lowerLeftX &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; poly&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Extent&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;XMin&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; lowerLeftY &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; poly&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Extent&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;YMin&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;‍‍‍
myLabelGraphic&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Shape &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;//Create MapPoint using these coordinates.&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Uma&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:45:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/graphics-layer-element-placement/m-p/865796#M4934</guid>
      <dc:creator>UmaHarano</dc:creator>
      <dc:date>2021-12-12T10:45:41Z</dc:date>
    </item>
    <item>
      <title>Re: Graphics layer: element placement</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/graphics-layer-element-placement/m-p/865797#M4935</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/86730" target="_blank"&gt;Uma Harano&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;Line 12 returns an error : graphic shape property can not be null or empty.&amp;nbsp; What did I do wrong?&amp;nbsp; maxPoint is not null.&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; poly &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; shape&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;GetShape&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="keyword token"&gt;var&lt;/SPAN&gt; maxX&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; poly&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Extent&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;MMax&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; maxY&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; poly&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Extent&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;YMax&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
MapPoint maxPoint &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;maxX&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; maxY&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;maxPoint &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="punctuation token"&gt;{&lt;/SPAN&gt;
 myLabelGraphic&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Shape &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; maxPoint&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
 myLabelGraphic&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Placement &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; Anchor&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;CenterPoint&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
 myLabelGraphic&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Text &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; myText&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
 myLabelGraphic&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Symbol &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; myTextSymbol&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;MakeSymbolReference&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;
 graphicsLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;AddElement&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;myLabelGraphic&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;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:45:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/graphics-layer-element-placement/m-p/865797#M4935</guid>
      <dc:creator>helenchu</dc:creator>
      <dc:date>2021-12-12T10:45:44Z</dc:date>
    </item>
    <item>
      <title>Re: Graphics layer: element placement</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/graphics-layer-element-placement/m-p/865798#M4936</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;On line 2, use XMax instead.&amp;nbsp; That should fix the issue.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Uma&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Sep 2020 20:19:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/graphics-layer-element-placement/m-p/865798#M4936</guid>
      <dc:creator>UmaHarano</dc:creator>
      <dc:date>2020-09-15T20:19:41Z</dc:date>
    </item>
    <item>
      <title>Re: Graphics layer: element placement</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/graphics-layer-element-placement/m-p/865799#M4937</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Uma,&lt;/P&gt;&lt;P&gt;Silly me.&amp;nbsp; I was so certain I had XMax there.&amp;nbsp; Thank you very much!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Sep 2020 14:43:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/graphics-layer-element-placement/m-p/865799#M4937</guid>
      <dc:creator>helenchu</dc:creator>
      <dc:date>2020-09-16T14:43:57Z</dc:date>
    </item>
  </channel>
</rss>

