POST
|
Hi, thankfully found this thread unfortunately not before wasting a lot of time I ran the hillshade tool and then exported the code to a notebook which failed on the save method as shown AttributeError Traceback (most recent call last)
In [56]:
Line 25: out_raster.save(r"C:\Users\hack\AppData\Local\Temp\ArcGISProTemp24040\Untitled\Default.gdb\HillSha_dem_98
AttributeError: 'Result' object has no attribute 'save Looked at the ESRI sample code for the Hillshade tool and that also shows the .save method Found an ESRI video which also encourages the use of the save method on raster output https://mediaspace.esri.com/media/t/1_dekwby9u Anyway finally got this working import arcpy arcpy.ImportToolbox(r"C:\Program Files\ArcGIS\Pro\Resources\ArcToolBox\toolboxes\Spatial Analyst Tools.tbx") arcpy.env.extent = "1262500 5002500 1263000 5003000" out_raster = arcpy.sa.HillShade( in_raster="dem_8m", azimuth=315, altitude=45, model_shadows="NO_SHADOWS", z_factor=1 ) #the type being returned by this function is a result object SO need to cast the raster to the raster type Raster(out_raster).save(r"C:\Users\hack\AppData\Local\Temp\ArcGISProTemp24040\Untitled\Default.gdb\HillShade_dem") arcpy.Delete_management(Raster(out_raster), '') Hopefully helps someone
... View more
a month ago
|
0
|
0
|
83
|
IDEA
|
A common change request on maps is renaming content in the legend. This layer is often repeated on multiple maps. Create a Find and Replace tool for the TOC window that can update a layer name\heading etc. Allow this to search all maps without requiring them to be open.
... View more
08-04-2022
05:36 PM
|
11
|
0
|
304
|
POST
|
Hi Don, I would like to use the mosaic tool, however I'm getting the following error ; error: no function definition: ESRI_MAP_GETCURRENT ACAD 2021 arcgisforautocad400-2 Any thoughts Thanks Brian cheers
... View more
08-29-2021
10:08 PM
|
0
|
0
|
1115
|
POST
|
I have used aggregate to get around this limit. Use with caution.
... View more
03-11-2019
07:23 PM
|
0
|
0
|
768
|
Title | Kudos | Posted |
---|---|---|
11 | 08-04-2022 05:36 PM |
Online Status |
Offline
|
Date Last Visited |
2 weeks ago
|