I have been working on this script tool in ArcGIS Pro. The following code is what I got so far to create a tool in ArcGIS Pro, connected to the script, that takes parameters from users (initially, the geodatabase filename) and shows the report that lists the feature classes it contains to the console on the screen.
import arcpy import os arcpy.env.workspace = arcpy.GetParameterAsText(0) featureclasses = arcpy.ListFeatureClasses() for fc in featureclasses: arcpy.AddMessage(fc)
Now, for my next step, I am trying to add a code that gives users the option for showing the report on the screen or creating a text file.
What function do I need to do this?