laptop and a wrench

Erro

The result of the Add Join tool is not available in a map of the ArcGIS Pro project after running this method outside of ArcGIS Pro.

ArcGIS Pro
Número de ID do Erro BUG-000167270
EnviadoMay 7, 2024
Última ModificaçãoMay 21, 2025
Aplica-se àArcGIS Pro
Versão encontrada3.2.2
Sistema OperacionalWindows OS
Versão do Sistema Operacional10.0 64 Bit
StatusWill Not Be Addressed

Informações Adicionais

This is already fixed in ArcGIS Pro 3.3 and above. There are multiple workarounds available for 3.2.2. Workarounds: 1. Use the Validate Join tool before the Add Join tool in the python script. 2. Use CopyFeatures to save the result to a new feature class. 3. Save the Join to a lyrx file then add the lyrx file to the map with arcpy.mp Map.AddLayer.

Solução Provisória

There are three workarounds for this defect:

1) Using the Validate Join tool ( https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/validate-join.htm) before the line of the Add Join tool and running the Python script. 

 

arcpy.management.ValidateJoin(in_layer_or_view=first_layer, in_field=" ", join_table=second_layer, join_field=" ")

 

Thus, the whole Python script is as follows:

 

# import ArcPy library

import arcpy

 

# access ArcGIS Pro project and the first map of the project

aprx = arcpy.mp.ArcGISProject('path to ArcGIS Pro Project')

my_map = aprx.listMaps()[0]

 

# access the two newly created feature classes 

first_lyr = my_map.listLayers()[0]

second_lyr = my_map.listLayers()[1]

 

# validate join

arcpy.management.ValidateJoin(in_layer_or_view=first_layer, in_field=" ", join_table=second_layer, join_field=" ")

 

# use AddJoin() method to join the two feature classes 

add_join_result = arcpy.management.AddJoin(in_layer_or_view=first_lyr, in_field=" ", join_table=second_lyr, join_field=" ", join_type="KEEP_ALL")

print(add_join_result)

 

# save ArcGIS Pro project

aprx.save()

2) Using Python environments of ArcGIS Pro 3.3 or ArcGIS Server 11.3.

3) Using the CopyFeatures() tool to save the result of join in a new feature class.

Etapas para Reproduzir

ID do Erro: BUG-000167270

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