<?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: Replicating ArcGIS Pro context with arcpy in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/replicating-arcgis-pro-context-with-arcpy/m-p/1094756#M62234</link>
    <description>&lt;P&gt;I suspect arcpy isn't the place for you.&amp;nbsp; The arcgis module is for web stuff&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/python/" target="_blank"&gt;ArcGIS API for Python | ArcGIS Developer&lt;/A&gt;&amp;nbsp; for basic entry point&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/python/guide/working-with-feature-layers-and-features/" target="_blank"&gt;Using Feature Layers | ArcGIS Developer&lt;/A&gt;&amp;nbsp; examples&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/python/api-reference/" target="_blank"&gt;API Reference for the ArcGIS API for Python — arcgis 1.9 documentation&lt;/A&gt;&amp;nbsp; api documentation&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/Esri/arcgis-python-api" target="_blank"&gt;Esri/arcgis-python-api: Documentation and samples for ArcGIS API for Python (github.com)&lt;/A&gt;&amp;nbsp; github site with example code in the Samples folder.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 02 Sep 2021 00:48:08 GMT</pubDate>
    <dc:creator>DanPatterson</dc:creator>
    <dc:date>2021-09-02T00:48:08Z</dc:date>
    <item>
      <title>Replicating ArcGIS Pro context with arcpy</title>
      <link>https://community.esri.com/t5/python-questions/replicating-arcgis-pro-context-with-arcpy/m-p/1094572#M62232</link>
      <description>&lt;P&gt;I want to automate a workflow I have in ArcGIS Pro using arcpy.&lt;/P&gt;&lt;P&gt;I am running the Near tool against two secured Portal services within ArcGIS Pro. Everything works well when running it through ArcGIS Pro - I simply run the tool and it successfully updates the secured services.&lt;/P&gt;&lt;P&gt;When I try to automate it I copy the Python snippet for the tool. This is where I run into problems. Naturally within the ArcGIS Pro environment, the layer names have a context as they reference a specific layer (with defined definition queries) within a map within a project. When in an isolated Python environment this context is lost along with the Portal connection.&lt;/P&gt;&lt;P&gt;My question is how can I replicate these within a Python environment? I have seen URL's being used as tool inputs, but these don't honor the definition queries, nor do they take care of authentication.&lt;/P&gt;&lt;P&gt;Thanks for any suggestions and insight.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Sep 2021 18:20:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/replicating-arcgis-pro-context-with-arcpy/m-p/1094572#M62232</guid>
      <dc:creator>timbkennedy</dc:creator>
      <dc:date>2021-09-01T18:20:58Z</dc:date>
    </item>
    <item>
      <title>Re: Replicating ArcGIS Pro context with arcpy</title>
      <link>https://community.esri.com/t5/python-questions/replicating-arcgis-pro-context-with-arcpy/m-p/1094756#M62234</link>
      <description>&lt;P&gt;I suspect arcpy isn't the place for you.&amp;nbsp; The arcgis module is for web stuff&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/python/" target="_blank"&gt;ArcGIS API for Python | ArcGIS Developer&lt;/A&gt;&amp;nbsp; for basic entry point&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/python/guide/working-with-feature-layers-and-features/" target="_blank"&gt;Using Feature Layers | ArcGIS Developer&lt;/A&gt;&amp;nbsp; examples&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/python/api-reference/" target="_blank"&gt;API Reference for the ArcGIS API for Python — arcgis 1.9 documentation&lt;/A&gt;&amp;nbsp; api documentation&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/Esri/arcgis-python-api" target="_blank"&gt;Esri/arcgis-python-api: Documentation and samples for ArcGIS API for Python (github.com)&lt;/A&gt;&amp;nbsp; github site with example code in the Samples folder.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Sep 2021 00:48:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/replicating-arcgis-pro-context-with-arcpy/m-p/1094756#M62234</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-09-02T00:48:08Z</dc:date>
    </item>
    <item>
      <title>Re: Replicating ArcGIS Pro context with arcpy</title>
      <link>https://community.esri.com/t5/python-questions/replicating-arcgis-pro-context-with-arcpy/m-p/1095970#M62253</link>
      <description>&lt;P&gt;Thanks Dan - the ArcGIS API for Python analysis tools are pretty limited in comparison to arcpy. The Near tool does exactly what I want.&lt;/P&gt;&lt;P&gt;What I ended up doing was downloading the datasets I needed, running the analysis locally using arcpy, then converting the output to JSON, creating a feature set from that before adding it to the Feature Layer via the ArcGIS API for Python. Appending is not supported with our Enterprise version.&lt;/P&gt;&lt;P&gt;The limitation added complexity that I didn't initially consider, but I got there in the end! It would be great if arcpy could run on secured Feature Layers though - it would have simplified the flow quite a bit.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Sep 2021 15:27:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/replicating-arcgis-pro-context-with-arcpy/m-p/1095970#M62253</guid>
      <dc:creator>timbkennedy</dc:creator>
      <dc:date>2021-09-07T15:27:23Z</dc:date>
    </item>
  </channel>
</rss>

