Script Tool not showing Extent of Raster in ArcPro

266
3
06-11-2020 09:50 PM
ChristopherSanchez
New Contributor II

I am trying to make a script tool that shows the extent of a raster. The tool runs in ArcPro without an error, but doesn't produce results of the extent of the raster. Is there any line of code I am missing to show the extent of my input raster?

thank you

import arcpy

ws = r"C:\Users\tophe\Documents\ArcGIS\Projects\Programming\rasters"
arcpy.env.workspace = ws
inFC = arcpy.GetParameterAsText(0)


desc = arcpy.Describe(inFC).extent
print(desc)

if __name__=="__main__":
   workspace = r"C:\Users\tophe\Documents\ArcGIS\Projects\Programming\rasters"

0 Kudos
3 Replies
DavidPike
MVP Frequent Contributor

What is it saying? something like GeoprocessingObject?

print(desc.XMin, desc.XMax...

0 Kudos
ChristopherSanchez
New Contributor II

desc = arcpy.Describe(inFC).extent
print(desc.XMin, desc.XMax)

0 Kudos
DavidPike
MVP Frequent Contributor

?

0 Kudos