The Apply Symbology From Layer tool does not work when used in a Python script from the toolbox in ArcGIS Pro 3.2.2.
上次发布: August 28, 2019ArcGIS Pro
漏洞 ID 编号
BUG-000119907
已提交
February 7, 2019
上次修改时间
March 4, 2024
适用范围
ArcGIS Pro
找到的版本
2.3
服务器平台
Windows OS
客户端平台
10.0 64 Bit
状态
Will Not Be Addressed
开发团队已考虑过该问题或请求,并决定不会解决该问题。 问题的“其他信息”部分可能包含进一步说明。
附加信息
To fix this issue:
1. After adding the arcpy.ApplySymbologyFromLayer_management(layer, lyrfile) Python command, add the arcpy.SetParameterAsText(2, layer) parameter.
2. Save the script.
3. ArcGIS Pro > Catalog Pane > Toolbox > Right click Script > Properties.
4. Properties Window > Parameter Tab > Add a new parameter of type Layer, and set it to derived output Documenation: https://pro.arcgis.com/en/pro-app/arcpy/geoprocessing_and_python/setting-script-tool-parameters.htm#GUID-59C4A61C-AC33-4BA3-8453-AC8328E34453.
解决办法
After adding the arcpy.ApplySymbologyFromLayer_management(layer, lyrfile) Python command, add the arcpy.SetParameterAsText(2, layer) parameter.
Save the script.
In ArcGIS Pro, navigate to the Catalog pane and click Toolbox.
Right-click the script and click Properties.
In the Properties window, select the Parameter tab. Add a new parameter of the Layer type, and configure the parameters based on ArcGIS Pro: Setting script tool parameters.