无法在 ArcGIS 和 arcpy 中打印参数

unable to print parameters in ArcGIS and arcpy

我是初学者,在 ArcMap 中创建了一个 python 脚本工具并 运行 打印输入变量。我还在 ArcMap 中打开了 python window。该脚本未打印在 运行 时间输入工具的变量值。请推荐我。

导入 arcpy

fc = arcpy.GetParameterAsText(0)

距离 = arcpy.GetParameterAsText(1)

打印 fc

打印距离

你需要使用 arcpy.AddMessage(fc) 而不是 print(fc)

参考: http://desktop.arcgis.com/en/arcmap/10.3/analyze/arcpy-functions/addmessage.htm