laptop and a wrench

漏洞

The AddJoin function fails to create a join when used in a script tool.

上次发布: March 27, 2023 ArcGIS Pro
漏洞 ID 编号 BUG-000150795
已提交July 14, 2022
上次修改时间October 7, 2024
适用范围ArcGIS Pro
找到的版本2.9.3
操作系统Windows OS
操作系统版本10.0 64 Bit
状态As Designed

附加信息

This is the expected behavior of the Add Join tool. The Add Join tool creates a temporary join that disappears at the end of a session. In a script tool, the join disappears at the conclusion of the script. Refer to, https://pro.arcgis.com/en/pro-app/2.8/tool-reference/data-management/add-join.htm, "The join persists only for the duration of the layer. A layer can be retained by saving the ArcGIS Pro session or by saving it to a layer file using the Save Layer To File tool." To persist the join on a map, set the AddJoin function in the script as a derived output. For example: lyr = arcpy.management.AddJoin(fc, fc_field, joinLayer, joinLayer_field) arcpy.SetParameterAsText(4, lyr) Then, in the script tool properties, in the Parameters section, set Parameter 4 to Type=Derived and Direction=Output to link it to the SetParameterAsText call in the script.

解决办法

  • Use the Add Join geoprocessing tool.
  • Run in the Python window.

重现步骤

漏洞 ID: BUG-000150795

软件:

  • ArcGIS Pro

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

下载 Esri 支持应用程序

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

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项