Skip to main content
Title edit.
Link
TomazicM
  • 27k
  • 23
  • 31
  • 42

How to delete Deleting Picture Element using ArcPy in ArcGIS 10.3 Desktop?

naming; English usage
Source Link
Vince
  • 20.3k
  • 16
  • 48
  • 65

How to delete Picture Element using arcpyArcPy in ArcGIS 10.3 desktopDesktop?

I tryI'm trying to delete a Picture Element from 45 MXD'sMXDs. thisThis code is a start for me:

import arcpy
from arcpy import env

env.workspace = r"G:\PROJECTS\landuse\gis"
for mxdname in arcpy.ListFiles("*.mxd"):
    mxd = arcpy.mapping.MapDocument(
                r"G:\PROJECTS\landuse\gis\\" + mxdname)
    for elm in arcpy.mapping.ListLayoutElements(mxd,"PICTURE_ELEMENT"):
        if elm.name == "F:\GIS\practical_shapefile\notes\aer1_logo1.jpg":
            elm.sourceImage =r"F:\GIS\practical_shapefile\general\esd_logo1.jpg"
            mxd.save()
del mxd

i redI read:

but didn't find any hint how to do it.

How to delete Picture Element using arcpy in ArcGIS 10.3 desktop?

I try to delete Picture Element from 45 MXD's. this code is a start for me:

import arcpy
from arcpy import env

env.workspace = r"G:\PROJECTS\landuse\gis"
for mxdname in arcpy.ListFiles("*.mxd"):
    mxd = arcpy.mapping.MapDocument(
                r"G:\PROJECTS\landuse\gis\\" + mxdname)
    for elm in arcpy.mapping.ListLayoutElements(mxd,"PICTURE_ELEMENT"):
        if elm.name == "F:\GIS\practical_shapefile\notes\aer1_logo1.jpg":
            elm.sourceImage =r"F:\GIS\practical_shapefile\general\esd_logo1.jpg"
            mxd.save()
del mxd

i red:

but didn't find any hint how to do it.

How to delete Picture Element using ArcPy in ArcGIS 10.3 Desktop?

I'm trying to delete a Picture Element from 45 MXDs. This code is a start for me:

import arcpy
from arcpy import env

env.workspace = r"G:\PROJECTS\landuse\gis"
for mxdname in arcpy.ListFiles("*.mxd"):
    mxd = arcpy.mapping.MapDocument(
                r"G:\PROJECTS\landuse\gis\\" + mxdname)
    for elm in arcpy.mapping.ListLayoutElements(mxd,"PICTURE_ELEMENT"):
        if elm.name == "F:\GIS\practical_shapefile\notes\aer1_logo1.jpg":
            elm.sourceImage =r"F:\GIS\practical_shapefile\general\esd_logo1.jpg"
            mxd.save()
del mxd

I read:

but didn't find any hint how to do it.

Source Link
newGIS
  • 4.1k
  • 4
  • 46
  • 94

How to delete Picture Element using arcpy in ArcGIS 10.3 desktop?

I try to delete Picture Element from 45 MXD's. this code is a start for me:

import arcpy
from arcpy import env

env.workspace = r"G:\PROJECTS\landuse\gis"
for mxdname in arcpy.ListFiles("*.mxd"):
    mxd = arcpy.mapping.MapDocument(
                r"G:\PROJECTS\landuse\gis\\" + mxdname)
    for elm in arcpy.mapping.ListLayoutElements(mxd,"PICTURE_ELEMENT"):
        if elm.name == "F:\GIS\practical_shapefile\notes\aer1_logo1.jpg":
            elm.sourceImage =r"F:\GIS\practical_shapefile\general\esd_logo1.jpg"
            mxd.save()
del mxd

i red:

but didn't find any hint how to do it.