<?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: When will the ArcGIS Pro SDK allow access to the Graphics layer? in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/when-will-the-arcgis-pro-sdk-allow-access-to-the/m-p/844127#M3994</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jeremy,&lt;/P&gt;&lt;P&gt;You can use the &lt;A href="http://pro.arcgis.com/en/pro-app/sdk/api-reference/#topic9965.html" rel="nofollow noopener noreferrer" target="_blank"&gt;AddOverlay &lt;/A&gt;method to display a graphic on a 2D map by providing a geometry and a symbol.&lt;/P&gt;&lt;P&gt;This method is available from either the MapView or a MapTool.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following example displays the vertices of a selected polyline as a graphic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; protected override void OnClick()
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Run on MCT
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; QueuedTask.Run(() =&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //get selected polyline
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var selectedFeatures = ArcGIS.Desktop.Mapping.MapView.Active.Map.GetSelection();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var insp = new ArcGIS.Desktop.Editing.Attributes.Inspector();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; insp.Load(selectedFeatures.Keys.First(), selectedFeatures.Values.First());
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var polyLine = insp.Shape as ArcGIS.Core.Geometry.Polyline;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //mp builder
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var multiPointBuilder = new ArcGIS.Core.Geometry.MultipointBuilder();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; multiPointBuilder.Add(polyLine.Points);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //add overlay
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var markerSymbol = ArcGIS.Desktop.Mapping.SymbolFactory.ConstructMarker(ColorFactory.Red, 11.0, SimpleMarkerStyle.Diamond);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var ptSymbol = SymbolFactory.ConstructPointSymbol(markerSymbol);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var vertexGraphics = MapView.Active.AddOverlay(multiPointBuilder.ToGeometry(), ptSymbol.MakeSymbolReference());
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //vertexGraphics.Dispose(); //to clear the overlay
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that this works differently from the ArcMap graphics container as the graphic is referenced by the returned IDisposable variable. This is usually managed within the lifetime of a tool.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 10:20:45 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2021-12-12T10:20:45Z</dc:date>
    <item>
      <title>When will the ArcGIS Pro SDK allow access to the Graphics layer?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/when-will-the-arcgis-pro-sdk-allow-access-to-the/m-p/844126#M3993</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Having temporary elements on a map is a nice light-weight tool for users to add meaning to what they are looking at. Often, these need to be more sophisticated than simple Map Notes:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/ideas/10410" target="_blank"&gt;https://community.esri.com/ideas/10410&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it on the roadmap to allow developers access to the Pro graphics layer? Or, to an isolated graphics layer that is filled with 3rd party elements?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jun 2021 08:49:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/when-will-the-arcgis-pro-sdk-allow-access-to-the/m-p/844126#M3993</guid>
      <dc:creator>JeremyBridges</dc:creator>
      <dc:date>2021-06-22T08:49:51Z</dc:date>
    </item>
    <item>
      <title>Re: When will the ArcGIS Pro SDK allow access to the Graphics layer?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/when-will-the-arcgis-pro-sdk-allow-access-to-the/m-p/844127#M3994</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jeremy,&lt;/P&gt;&lt;P&gt;You can use the &lt;A href="http://pro.arcgis.com/en/pro-app/sdk/api-reference/#topic9965.html" rel="nofollow noopener noreferrer" target="_blank"&gt;AddOverlay &lt;/A&gt;method to display a graphic on a 2D map by providing a geometry and a symbol.&lt;/P&gt;&lt;P&gt;This method is available from either the MapView or a MapTool.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following example displays the vertices of a selected polyline as a graphic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; protected override void OnClick()
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Run on MCT
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; QueuedTask.Run(() =&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //get selected polyline
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var selectedFeatures = ArcGIS.Desktop.Mapping.MapView.Active.Map.GetSelection();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var insp = new ArcGIS.Desktop.Editing.Attributes.Inspector();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; insp.Load(selectedFeatures.Keys.First(), selectedFeatures.Values.First());
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var polyLine = insp.Shape as ArcGIS.Core.Geometry.Polyline;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //mp builder
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var multiPointBuilder = new ArcGIS.Core.Geometry.MultipointBuilder();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; multiPointBuilder.Add(polyLine.Points);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //add overlay
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var markerSymbol = ArcGIS.Desktop.Mapping.SymbolFactory.ConstructMarker(ColorFactory.Red, 11.0, SimpleMarkerStyle.Diamond);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var ptSymbol = SymbolFactory.ConstructPointSymbol(markerSymbol);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var vertexGraphics = MapView.Active.AddOverlay(multiPointBuilder.ToGeometry(), ptSymbol.MakeSymbolReference());
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //vertexGraphics.Dispose(); //to clear the overlay
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that this works differently from the ArcMap graphics container as the graphic is referenced by the returned IDisposable variable. This is usually managed within the lifetime of a tool.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:20:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/when-will-the-arcgis-pro-sdk-allow-access-to-the/m-p/844127#M3994</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-12T10:20:45Z</dc:date>
    </item>
    <item>
      <title>Re: When will the ArcGIS Pro SDK allow access to the Graphics layer?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/when-will-the-arcgis-pro-sdk-allow-access-to-the/m-p/844128#M3995</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have added&amp;nbsp; a marker symbol with this code but how to I programmatically label the symbol or create a popup with information on the map? for example, I want to label the point with "Latitude = 38.12345, Longitude = -97.65432"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jul 2016 21:42:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/when-will-the-arcgis-pro-sdk-allow-access-to-the/m-p/844128#M3995</guid>
      <dc:creator>DuaneWhistle</dc:creator>
      <dc:date>2016-07-12T21:42:48Z</dc:date>
    </item>
    <item>
      <title>Re: When will the ArcGIS Pro SDK allow access to the Graphics layer?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/when-will-the-arcgis-pro-sdk-allow-access-to-the/m-p/844129#M3996</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is a screen shot of how I want the symbol and label to look.&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/211465_pastedImage_1.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jul 2016 22:04:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/when-will-the-arcgis-pro-sdk-allow-access-to-the/m-p/844129#M3996</guid>
      <dc:creator>DuaneWhistle</dc:creator>
      <dc:date>2016-07-12T22:04:56Z</dc:date>
    </item>
    <item>
      <title>Re: When will the ArcGIS Pro SDK allow access to the Graphics layer?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/when-will-the-arcgis-pro-sdk-allow-access-to-the/m-p/844130#M3997</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Its not currently possible to add text as graphics. There is no ETA on when that might be available.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jul 2016 23:54:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/when-will-the-arcgis-pro-sdk-allow-access-to-the/m-p/844130#M3997</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2016-07-15T23:54:22Z</dc:date>
    </item>
  </channel>
</rss>

