arcpy.env.workspace = r'D:\LABSIG\CAU\trabajos_diarios\Pruebas Raster\mbd_proyecto_arbolado.mdb'
entityDataset = arcpy.ListDatasets("arbolado")
featureClass = arcpy.ListFeatureClasses("Arbol_censo", "", entityDataset[0])
image = r'D:/Proyecto Arbolado/C12/C12_657.JPG'
cursor = arcpy.UpdateCursor(featureClass[0])
for row in cursor:
row.setValue("raster_field", image)
cursor.updateRow(row)
arcpy.env.workspace = r'D:\LABSIG\CAU\trabajos_diarios\Pruebas Raster\mbd_proyecto_arbolado.mdb'
entityDataset = arcpy.ListDatasets("arbolado")
featureClass = arcpy.ListFeatureClasses("Arbol_censo", "", entityDataset[0])
image = r'D:/Proyecto Arbolado/C12/C12_657.JPG'
image_blob = open(image,'rb').read()
cursor = arcpy.UpdateCursor(featureClass[0])
for row in cursor:
row.setValue("raster_field", image_blob)
cursor.updateRow(row)Any intent I did with code to load the raster resulted in an error. Since I could not find any documentation on doing this in Python I assume it is not supported.
Xander,
Is this supported in arcpy for ArcGIS Pro? I'm currently looking for a way to update raster fields in FC table with Python.
I have a script that uses the updatecursor to populate a text field with a path to the directory where the rasters are stored. But, what I really need is to update the raster field with the image itself. And apparently you can't use cursors for this. I started a thread the other day:
https://community.esri.com/thread/231019-raster-fields-not-supported-using-cursors