The updateConnectionProperties does not successfully update the source information on layers in the .aprx files when using dictionaries as to or from the connection properties.
上次发布: May 14, 2019ArcGIS Pro
漏洞 ID 编号
BUG-000122282
已提交
May 9, 2019
上次修改时间
June 5, 2024
适用范围
ArcGIS Pro
找到的版本
2.3.2
操作系统
Windows OS
操作系统版本
2016 64 Bit
状态
Will Not Be Addressed
开发团队已考虑过该问题或请求,并决定不会解决该问题。 问题的“其他信息”部分可能包含进一步说明。
附加信息
when resourcing from one sql server database to another, the feature class name changes as well. Do something like this (looping through all the layers in the project):```lyr = m.listLayers()[0]cp = lyr.connectionPropertiescp['connection_info']['database'] = 'gdb1071en'cp['dataset'] = cp['dataset'].replace('gdb1061en', 'gdb1071en')lyr.updateConnectionProperties(lyr.connectionProperties, cp)```Also keep in mind that when using dictionaries in UpdateConnectionProperties, it works like a find and replace operation of common key/value pairs. See the following topic for more info: [https://pro.arcgis.com/en/pro-app/arcpy/mapping/updatingandfixingdatasources.htm](https://pro.arcgis.com/en/pro-app/arcpy/mapping/updatingandfixingdatasources.htm)