| 不具合 ID 番号 |
BUG-000176407 |
| 送信されました | May 13, 2025 |
| 最終更新日 | June 25, 2025 |
| 適用対象 | ArcGIS Pro |
| 見つかったバージョン | 3.4 |
| オペレーティング システム | Windows OS |
| オペレーティング システムのバージョン | 11.0 64 bit |
| ステータス | Known Limit
開発チームによる確認後に、この問題が、Esri の管理の範囲外にあるソフトウェアの既知の制限に関するものであると判断されました。 問題の「参考情報」セクションに、さらに詳細な説明が示されていることがあります。
|
参考情報
This is a workflow better suited to the Cartographic Information Model (CIM). For example, this will update the data source from geodatabase to feature service and the UI will properly update as well:
aprx = arcpy.mp.ArcGISProject('CURRENT')
m = aprx.listMaps('Map')[0]
lyr = m.listLayers()[0]
c = lyr.getDefinition('V3')
dc = c.featureTable.dataConnection
dc.workspaceConnectionString = "URL=https://services.arcgis.com/Wl7Y1m92PbjtJs5n/arcgis/rest/services/None/FeatureServer"
dc.workspaceFactory = "FeatureService"
dc.dataset = "0"
lyr.setDefinition(c)
Refer to these documentations: https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/updatingandfixingdatasources.htm#:~:text=%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20ConPropsWithJoins(cp)-,Updating%20data%20sources%20using%20the%20CIM,-Starting%20with%20ArcGIS, https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/updatingandfixingdatasources.htm#:~:text=Using%20the%20CIM%20to%20change%20a%20layer%27s%20dataset and https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/python-cim-access.htm for more information.
対処法
This is a workflow better suited to the Cartographic Information Model (CIM). For example, this will update the data source from geodatabase to feature service and the UI will properly update as well:
aprx = arcpy.mp.ArcGISProject('CURRENT')
m = aprx.listMaps('Map')[0]
lyr = m.listLayers()[0]
c = lyr.getDefinition('V3')
dc = c.featureTable.dataConnection
dc.workspaceConnectionString = "URL=https://services.arcgis.com/Wl7Y1m92PbjtJs5n/arcgis/rest/services/None/FeatureServer"
dc.workspaceFactory = "FeatureService"
dc.dataset = "0"
lyr.setDefinition(c)
再現の手順