laptop and a wrench

漏洞

When using the WorkspaceConnectionString Property (CIMStandardDataConnection) to update the source of a feature class within a feature dataset, it updates the source but breaks the source connection (red exclamation point).

ArcGIS Pro
漏洞 ID 编号 BUG-000177160
已提交June 13, 2025
上次修改时间August 11, 2025
适用范围ArcGIS Pro
找到的版本3.2
操作系统Windows OS
操作系统版本11.0 64 bit
状态As Designed

附加信息

Since the CIM data source definition of the existing layer includes a feature dataset, but the new data source does not, it must be omitted from the CIM. One way to achieve this is by creating a new CIM data source object, which will not contain a feature dataset: aprx = arcpy.mp.ArcGISProject('CURRENT') m = aprx.listMaps('Map1')[0] lyr = m.listLayers('*States*')[0] c = lyr.getDefinition('V3') dc = arcpy.cim.CreateCIMObjectFromClassName('CIMStandardDataConnection', 'V3') dc.workspaceConnectionString = r"URL=https://services2.arcgis.com/k4wsDILUIGeQ5HvW/arcgis/rest/services/USAFederalLandsFSNew/FeatureServer" dc.workspaceFactory = "FeatureService" dc.dataset = "0" c.featureTable.dataConnection = dc lyr.setDefinition(c)

解决办法

Since the CIM data source definition of the existing layer includes a feature dataset, but the new data source does not, it must be omitted from the CIM. One way to do this is to create a new CIM data source object, which will not include a feature dataset:

aprx = arcpy.mp.ArcGISProject('CURRENT')

m = aprx.listMaps('Map1')[0]

lyr = m.listLayers('*States*')[0]

c = lyr.getDefinition('V3')

dc = arcpy.cim.CreateCIMObjectFromClassName('CIMStandardDataConnection', 'V3')

dc.workspaceConnectionString = r"URL=https://services2.arcgis.com/k4wsDILUIGeQ5HvW/arcgis/rest/services/USAFederalLandsFSNew/FeatureServer"

dc.workspaceFactory = "FeatureService"

dc.dataset = "0"

c.featureTable.dataConnection = dc

lyr.setDefinition(c)

重现步骤

漏洞 ID: BUG-000177160

软件:

  • ArcGIS Pro

当漏洞状态发生变化时获得通知

下载 Esri 支持应用程序

发现关于本主题的更多内容

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项