<?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: Shapefile added using addDataFromPath does not show on map in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/shapefile-added-using-adddatafrompath-does-not/m-p/1293622#M69622</link>
    <description>&lt;LI-CODE lang="python"&gt;aprx.save()&lt;/LI-CODE&gt;</description>
    <pubDate>Fri, 26 May 2023 19:13:35 GMT</pubDate>
    <dc:creator>DavidPike</dc:creator>
    <dc:date>2023-05-26T19:13:35Z</dc:date>
    <item>
      <title>Shapefile added using addDataFromPath does not show on map</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/shapefile-added-using-adddatafrompath-does-not/m-p/1292285#M69474</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;I'm facing an issue regarding the &lt;STRONG&gt;addDataFromPath&lt;/STRONG&gt; method.&lt;/P&gt;&lt;P&gt;I have used it successfully when I was working with a notebook inside my project to add some shapefiles to a map. However, now I need to convert the notebook into a python script and it is not working. When I run the script I get no errors at all but the shapefiles won't show up on the selected map.&lt;/P&gt;&lt;P&gt;Here's how my code looks like:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;project = &amp;lt;project_path&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;aprx&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;arcpy&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;mp&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;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lt;SPAN&gt;arcpy&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&lt;STRONG&gt;MakeFeatureLayer_management&lt;/STRONG&gt; function, but it still did not work.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I have been working with the project opened, but I need a way to may the shapefiles to be added whether to the current project or to another project. I have been using the project path, rather than 'CURRENT' for adding the shapefiles.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 23 May 2023 20:08:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/shapefile-added-using-adddatafrompath-does-not/m-p/1292285#M69474</guid>
      <dc:creator>KarolDuarte</dc:creator>
      <dc:date>2023-05-23T20:08:21Z</dc:date>
    </item>
    <item>
      <title>Re: Shapefile added using addDataFromPath does not show on map</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/shapefile-added-using-adddatafrompath-does-not/m-p/1293622#M69622</link>
      <description>&lt;LI-CODE lang="python"&gt;aprx.save()&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 26 May 2023 19:13:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/shapefile-added-using-adddatafrompath-does-not/m-p/1293622#M69622</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2023-05-26T19:13:35Z</dc:date>
    </item>
    <item>
      <title>Re: Shapefile added using addDataFromPath does not show on map</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/shapefile-added-using-adddatafrompath-does-not/m-p/1294611#M69727</link>
      <description>&lt;P&gt;Thanks!&lt;BR /&gt;In the end, I had removed this part entirely from the code, because I needed it ASAP, but I will give it a new try!&lt;/P&gt;</description>
      <pubDate>Wed, 31 May 2023 17:47:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/shapefile-added-using-adddatafrompath-does-not/m-p/1294611#M69727</guid>
      <dc:creator>KarolDuarte</dc:creator>
      <dc:date>2023-05-31T17:47:28Z</dc:date>
    </item>
  </channel>
</rss>

