Tuesday 27 June 2017

arcpy - Using Python new line (n) with ArcGIS geoprocessing progress dialog?



I am currently using in my ArcGIS 10.3 toolbox script;


# Get the spatial reference
spatialRef = arcpy.Describe(template).spatialReference.name

#Loop through shapfiles in folder and reproject
for fc in fcList:
fcspatialRef = arcpy.Describe(fc).spatialReference.name
if fcspatialRef != spatialRef:

arcpy.Project_management(fc, outFolder + "\\" + fc, template)

# Print shapefile Project results
arcpy.AddMessage("\n" + fc)

# Return any errors
except:
arcpy.AddMessage(arcpy.GetMessages())

Is there a way to seperate these results in the geoprocessing dialog window by a line spacing because it looks cluttered?



arcpy.AddMessage("\n" + fc)   

kind of works but gets;


Running script Project...


abc.shp


xyz.shp


123.shp


How can I make the list like this please?;


![enter image description here][1]





No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...