Hi Gaston,In theory it is not very difficult to transform the code from an "arcpy.da" search cursor to the "arcpy" cursor. The problem is that the arcpy.SearchCursor does not seem to support raster fields. The arcpy.da method that works:import arcpy, os
output_path = r'C:\Forum\Raster attribute\output'
fc = r'C:\Forum\Raster attribute\test.gdb\rasatt01'
fld_raster = 'Raster'
fld_name = 'Name'
flds = (fld_raster, fld_name)
with arcpy.da.SearchCursor(fc, flds) as cursor:
for row in cursor:
filename = "{0}.tif".format(row[1])
row[0].save(os.path.join(output_path, filename))
The arcpy method that doesn't work:import arcpy, os
output_path = r'C:\Forum\Raster attribute\output'
fc = r'C:\Forum\Raster attribute\test.gdb\rasatt01'
fld_raster = 'Raster'
fld_name = 'Name'
cursor = arcpy.SearchCursor(fc)
for row in cursor:
filename = "{0}.tif".format(row.getValue(fld_name))
row.getValue(fld_raster).save(os.path.join(output_path, filename))
del cursor, row
This will throw an error "AttributeError: 'NoneType' object has no attribute 'save'".You might be interested in a similar thread regarding Blob fields and Raster fields:http://forums.arcgis.com/threads/108402-How-to-load-image-to-Raster-attribute-field-with-python?p=38...Kind regards, Xander