<?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: ArcGIS Pro 3 Update Connection Properties in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcgis-pro-3-update-connection-properties/m-p/1307155#M68187</link>
    <description>&lt;P&gt;To provide formatting&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/python-blog/code-formatting-the-community-version/ba-p/1007633" target="_blank"&gt;Code formatting ... the Community Version - Esri Community&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Did you see the code examples in...&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/updatingandfixingdatasources.htm" target="_blank"&gt;Updating and fixing data sources—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;and in the CIM&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/layer-class.htm" target="_blank"&gt;Layer—ArcGIS Pro | Documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 11 Jul 2023 07:46:54 GMT</pubDate>
    <dc:creator>DanPatterson</dc:creator>
    <dc:date>2023-07-11T07:46:54Z</dc:date>
    <item>
      <title>ArcGIS Pro 3 Update Connection Properties</title>
      <link>https://community.esri.com/t5/python-questions/arcgis-pro-3-update-connection-properties/m-p/1307142#M68186</link>
      <description>&lt;P&gt;Hi Community,&lt;/P&gt;&lt;P&gt;I have seen numerous threads on this process but seemingly all the results I have found I have come up empty to where the last user posted a few months ago and was resulting to manually changing data.&lt;BR /&gt;&lt;A href="https://community.esri.com/t5/arcgis-api-for-python-questions/updating-data-source-in-arcgis-pro-project-with/td-p/802811/page/3" target="_blank" rel="noopener"&gt;https://community.esri.com/t5/arcgis-api-for-python-questions/updating-data-source-in-arcgis-pro-project-with/td-p/802811/page/3&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I have code that worked perfectly fine in Pro 2.9.6, However with the upgrade to 3 a lot of headaches are being caused.&lt;/P&gt;&lt;P&gt;I have a process that creates new features, populates a FGDB and then "should" re-path to the new data in the new FGDB. Obviously the variables below are defined in prior code.&lt;BR /&gt;&lt;BR /&gt;# Update the layer path to the newly created data.&lt;/P&gt;&lt;P&gt;for lyr in mf.map.listLayers():&lt;BR /&gt;cp = lyr.connectionProperties # Returns a python dictionary of connection properties.&lt;BR /&gt;if lyr.name == "Lines":&lt;BR /&gt;arcpy.AddMessage("Updating source for %s to %s" %(lyr.name,out_Lines))&lt;BR /&gt;cp['dataset'] = out_Lines&lt;BR /&gt;cp['connection_info'] = {'database': str(gdbPathFinal)}&lt;BR /&gt;lyr.updateConnectionProperties(lyr.connectionProperties,cp,True,True)&lt;BR /&gt;if lyr.name == "Polygons":&lt;BR /&gt;arcpy.AddMessage("Updating source for %s" %(lyr.name))&lt;BR /&gt;cp['dataset'] = out_Poly&lt;BR /&gt;cp['connection_info'] = {'database': str(gdbPathFinal)}&lt;BR /&gt;lyr.updateConnectionProperties(lyr.connectionProperties,cp,True,True)&lt;BR /&gt;# Pan the map to the output. Maintaining current scale.&amp;nbsp;&lt;BR /&gt;mf.panToExtent(mf.getLayerExtent(lyr)) #Set dataframe extent.&lt;BR /&gt;if lyr.name == "Points":&lt;BR /&gt;arcpy.AddMessage("Updating source for %s" %(lyr.name))&lt;BR /&gt;cp['dataset'] = out_Points&lt;BR /&gt;cp['connection_info'] = {'database': str(gdbPathFinal)}&lt;BR /&gt;lyr.updateConnectionProperties(lyr.connectionProperties,cp,True,True)&lt;/P&gt;&lt;P&gt;It fails on the&amp;nbsp;"cp = lyr.connectionProperties # Returns a python dictionary of connection properties."&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;AttributeError: The attribute 'connectionProperties' is not supported on this instance of Layer.&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;Has the layer properties configuration changed between versions?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Is someone able to shed some light why this will not work in ArcGIS Pro 3 as I havent been able to find specific documentation referring to any changes in this methodology between 2.9.x an 3&lt;/P&gt;&lt;P&gt;Apologies if this is a simple fix!&lt;BR /&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jul 2023 04:26:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgis-pro-3-update-connection-properties/m-p/1307142#M68186</guid>
      <dc:creator>GeoNZ</dc:creator>
      <dc:date>2023-07-11T04:26:30Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Pro 3 Update Connection Properties</title>
      <link>https://community.esri.com/t5/python-questions/arcgis-pro-3-update-connection-properties/m-p/1307155#M68187</link>
      <description>&lt;P&gt;To provide formatting&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/python-blog/code-formatting-the-community-version/ba-p/1007633" target="_blank"&gt;Code formatting ... the Community Version - Esri Community&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Did you see the code examples in...&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/updatingandfixingdatasources.htm" target="_blank"&gt;Updating and fixing data sources—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;and in the CIM&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/layer-class.htm" target="_blank"&gt;Layer—ArcGIS Pro | Documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jul 2023 07:46:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgis-pro-3-update-connection-properties/m-p/1307155#M68187</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2023-07-11T07:46:54Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Pro 3 Update Connection Properties</title>
      <link>https://community.esri.com/t5/python-questions/arcgis-pro-3-update-connection-properties/m-p/1309152#M68190</link>
      <description>&lt;P&gt;Make sure to filter out Group and Basemap layers before trying to replace datasources.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2023 15:59:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgis-pro-3-update-connection-properties/m-p/1309152#M68190</guid>
      <dc:creator>AlfredBaldenweck</dc:creator>
      <dc:date>2023-07-18T15:59:41Z</dc:date>
    </item>
  </channel>
</rss>

