laptop and a wrench

Erro

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
Número de ID do Erro BUG-000177160
EnviadoJune 13, 2025
Última ModificaçãoAugust 11, 2025
Aplica-se àArcGIS Pro
Versão encontrada3.2
Sistema OperacionalWindows OS
Versão do Sistema Operacional11.0 64 bit
StatusAs Designed

Informações Adicionais

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)

Solução Provisória

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)

Etapas para Reproduzir

ID do Erro: BUG-000177160

Software:

  • ArcGIS Pro

Seja notificado quando o status de um erro mudar

Baixe o Aplicativo de Suporte da Esri

Descubra mais sobre este tema

Obtenha ajuda de especialistas do ArcGIS

Entre em contato com Suporte Técnico

Baixe o Aplicativo de Suporte da Esri

Ir para as opções de download