<?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: Add lyr layer via code in ArcGIS Pro 3 in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/add-lyr-layer-via-code-in-arcgis-pro-3/m-p/1414724#M11423</link>
    <description>&lt;P&gt;Yes please!!&amp;nbsp; I'll send you a direct message . . .&lt;/P&gt;</description>
    <pubDate>Wed, 24 Apr 2024 14:07:52 GMT</pubDate>
    <dc:creator>DanNarsavage_IDWR</dc:creator>
    <dc:date>2024-04-24T14:07:52Z</dc:date>
    <item>
      <title>Add lyr layer via code in ArcGIS Pro 3</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/add-lyr-layer-via-code-in-arcgis-pro-3/m-p/1237968#M9147</link>
      <description>&lt;P&gt;Is it possible to add a layer file (.lyr) to the active map using code in Pro 3?&amp;nbsp; My Pro 2 code does not work in 3.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Dec 2022 20:09:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/add-lyr-layer-via-code-in-arcgis-pro-3/m-p/1237968#M9147</guid>
      <dc:creator>JonathanDewalt</dc:creator>
      <dc:date>2022-12-05T20:09:34Z</dc:date>
    </item>
    <item>
      <title>Re: Add lyr layer via code in ArcGIS Pro 3</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/add-lyr-layer-via-code-in-arcgis-pro-3/m-p/1238024#M9148</link>
      <description>&lt;P&gt;Did you see the &lt;A href="https://github.com/esri/arcgis-pro-sdk/wiki/ProConcepts-3.0-Migration-Guide#map-layout-and-layer-files-and-packages" target="_self"&gt;Map, Layout, and Layer Files and Packages&lt;/A&gt; section of the 3.0 Migration Guide?&lt;/P&gt;</description>
      <pubDate>Mon, 05 Dec 2022 22:18:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/add-lyr-layer-via-code-in-arcgis-pro-3/m-p/1238024#M9148</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2022-12-05T22:18:55Z</dc:date>
    </item>
    <item>
      <title>Re: Add lyr layer via code in ArcGIS Pro 3</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/add-lyr-layer-via-code-in-arcgis-pro-3/m-p/1238041#M9149</link>
      <description>&lt;P&gt;This will work for lyrx files.&amp;nbsp; &amp;nbsp;Lyr file are from ArcGIS Desktop so i am not sure if 3.0 will still load those.&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;protected override async void OnClick()
{
  string url = @"c:\temp\Acme Service Roads.lpkx";  // load layer file

  Uri uri = new Uri(url);
  await QueuedTask.Run(() =&amp;gt; LayerFactory.Instance.CreateLayer(uri, MapView.Active.Map));
}&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 05 Dec 2022 23:30:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/add-lyr-layer-via-code-in-arcgis-pro-3/m-p/1238041#M9149</guid>
      <dc:creator>Wolf</dc:creator>
      <dc:date>2022-12-05T23:30:29Z</dc:date>
    </item>
    <item>
      <title>Re: Add lyr layer via code in ArcGIS Pro 3</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/add-lyr-layer-via-code-in-arcgis-pro-3/m-p/1399183#M11264</link>
      <description>&lt;P&gt;To be sure, Pro 3.x &lt;EM&gt;&lt;STRONG&gt;will&lt;/STRONG&gt;&lt;/EM&gt; do the appropriate thing with a .LYR file that I drag onto a map. But the &lt;A href="https://github.com/Esri/arcgis-pro-sdk/wiki/ProSnippets-MapAuthoring#create-layer-from-a-lyrx-file" target="_self"&gt;Pro SDK steps for adding a LYRX file&lt;/A&gt; do not support LYR files (throws `System.Runtime.InteropServices.COMException (0x80004005): Could not determine encoding`).&amp;nbsp; We're trying to transition our users from an ArcMap add-in to a Pro add-in, and we are hoping to skip the step of converting all those LYRs to LYRXs until after the transition is complete (so we can skip supporting twice the amount of layer files during the transition). I'll reply to my own post here if I find a way to do this, but I'd appreciate any guidance anyone might have.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Mar 2024 18:10:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/add-lyr-layer-via-code-in-arcgis-pro-3/m-p/1399183#M11264</guid>
      <dc:creator>DanNarsavage_IDWR</dc:creator>
      <dc:date>2024-03-21T18:10:44Z</dc:date>
    </item>
    <item>
      <title>Re: Add lyr layer via code in ArcGIS Pro 3</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/add-lyr-layer-via-code-in-arcgis-pro-3/m-p/1414510#M11413</link>
      <description>&lt;P&gt;Are you still looking how to load lyr files? I have a custom layer manager add-in I could send your way to try out. &amp;nbsp;If it does what you want, I can pull out the code for you.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2024 02:34:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/add-lyr-layer-via-code-in-arcgis-pro-3/m-p/1414510#M11413</guid>
      <dc:creator>JonathanDewalt</dc:creator>
      <dc:date>2024-04-24T02:34:04Z</dc:date>
    </item>
    <item>
      <title>Re: Add lyr layer via code in ArcGIS Pro 3</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/add-lyr-layer-via-code-in-arcgis-pro-3/m-p/1414724#M11423</link>
      <description>&lt;P&gt;Yes please!!&amp;nbsp; I'll send you a direct message . . .&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2024 14:07:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/add-lyr-layer-via-code-in-arcgis-pro-3/m-p/1414724#M11423</guid>
      <dc:creator>DanNarsavage_IDWR</dc:creator>
      <dc:date>2024-04-24T14:07:52Z</dc:date>
    </item>
  </channel>
</rss>

