<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: is it possible to delete a &amp;quot;PICTURE_ELEMENT&amp;quot; from a map document? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/is-it-possible-to-delete-a-quot-picture-element/m-p/1084795#M61908</link>
    <description>&lt;P&gt;Just encountered this same issue in ArcMap 10.7.&amp;nbsp; An alternative to deleting the Picture Element would be to use the&amp;nbsp;&lt;SPAN&gt;elementPositionX, elementPositionY attributes mentioned by&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/126818"&gt;@RandyBurton&lt;/a&gt;&amp;nbsp;and set them to values that move the element off the layout page, e.g.&amp;nbsp; set elementPositionX = -10.0, elementPositionY = -10.0.&amp;nbsp; I'm sure the OP already implemented something similar rather than manually editing 400+ MXDs!&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 02 Aug 2021 01:42:00 GMT</pubDate>
    <dc:creator>Dan_Joyce_OE</dc:creator>
    <dc:date>2021-08-02T01:42:00Z</dc:date>
    <item>
      <title>is it possible to delete a "PICTURE_ELEMENT" from a map document?</title>
      <link>https://community.esri.com/t5/python-questions/is-it-possible-to-delete-a-quot-picture-element/m-p/503677#M39558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;is it possible to delete a "PICTURE_ELEMENT" from a map document?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a map in 10.6 trying to delete a jpeg that's in the map.&lt;/P&gt;&lt;P&gt;Thanks#&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Mar 2019 18:43:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/is-it-possible-to-delete-a-quot-picture-element/m-p/503677#M39558</guid>
      <dc:creator>petegillard</dc:creator>
      <dc:date>2019-03-07T18:43:05Z</dc:date>
    </item>
    <item>
      <title>Re: is it possible to delete a "PICTURE_ELEMENT" from a map document?</title>
      <link>https://community.esri.com/t5/python-questions/is-it-possible-to-delete-a-quot-picture-element/m-p/503678#M39559</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've deleted text elements with arcpy, so it should be possible with something like (untested):&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy
mxd &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mapping&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;MapDocument&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;r&lt;SPAN class="string token"&gt;"C:\Project\Project.mxd"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; elm &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mapping&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ListLayoutElements&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;mxd&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"PICTURE_ELEMENT"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    elm&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;delete&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;# delete all picture elements&lt;/SPAN&gt;
    &lt;SPAN class="comment token"&gt;# or if using name or sourceImage properties&lt;/SPAN&gt;
    &lt;SPAN class="comment token"&gt;# if elm.name == "Photo":&lt;/SPAN&gt;
    &lt;SPAN class="comment token"&gt;# if elm.sourceImage == r"C:\Project\Data\NewPhoto.bmp":&lt;/SPAN&gt;
    &lt;SPAN class="comment token"&gt;#    elm.delete()&lt;/SPAN&gt;

mxd&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;save&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;del&lt;/SPAN&gt; mxd‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See &lt;A href="http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-mapping/pictureelement-class.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;PictureElement&lt;/A&gt;&amp;nbsp;for some information., but it doesn't really discuss .delete().&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 22:06:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/is-it-possible-to-delete-a-quot-picture-element/m-p/503678#M39559</guid>
      <dc:creator>RandyBurton</dc:creator>
      <dc:date>2021-12-11T22:06:12Z</dc:date>
    </item>
    <item>
      <title>Re: is it possible to delete a "PICTURE_ELEMENT" from a map document?</title>
      <link>https://community.esri.com/t5/python-questions/is-it-possible-to-delete-a-quot-picture-element/m-p/503679#M39560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've had some time to do some tests.&amp;nbsp; While there is a delete() option for Text Elements, there is no such option for Picture Elements.&amp;nbsp; However, you can make the image disappear if you set either the width or height to 0.&amp;nbsp; Once it has been set to zero, it does not appear that you can bring the image back by adjusting the height/width.&amp;nbsp; The name, elementPositionX, elementPositionY&amp;nbsp;and imageSource parameters still contain their original values. So this does not appear to be a clean deletion.&amp;nbsp; (If you are working inside ArcMap, you may need to refresh the view to see the changes.)&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;for elm in arcpy.mapping.ListLayoutElements(mxd, "PICTURE_ELEMENT"):
    elm.elementHeight = 0.0  # setting this to 0 will also set elementWidth to 0‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 22:06:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/is-it-possible-to-delete-a-quot-picture-element/m-p/503679#M39560</guid>
      <dc:creator>RandyBurton</dc:creator>
      <dc:date>2021-12-11T22:06:14Z</dc:date>
    </item>
    <item>
      <title>Re: is it possible to delete a "PICTURE_ELEMENT" from a map document?</title>
      <link>https://community.esri.com/t5/python-questions/is-it-possible-to-delete-a-quot-picture-element/m-p/503680#M39561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks,&amp;nbsp; i had tried the '.delete' without much luck. your other suggestion may work. We're re-doing some mxds made by a contractor and need to remove their logo from the maps (can always do it manually, but there are over 400 mxds !)&lt;/P&gt;&lt;P&gt;Thanks again,&lt;/P&gt;&lt;P&gt;Pete&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Mar 2019 12:49:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/is-it-possible-to-delete-a-quot-picture-element/m-p/503680#M39561</guid>
      <dc:creator>petegillard</dc:creator>
      <dc:date>2019-03-11T12:49:03Z</dc:date>
    </item>
    <item>
      <title>Re: is it possible to delete a "PICTURE_ELEMENT" from a map document?</title>
      <link>https://community.esri.com/t5/python-questions/is-it-possible-to-delete-a-quot-picture-element/m-p/1084795#M61908</link>
      <description>&lt;P&gt;Just encountered this same issue in ArcMap 10.7.&amp;nbsp; An alternative to deleting the Picture Element would be to use the&amp;nbsp;&lt;SPAN&gt;elementPositionX, elementPositionY attributes mentioned by&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/126818"&gt;@RandyBurton&lt;/a&gt;&amp;nbsp;and set them to values that move the element off the layout page, e.g.&amp;nbsp; set elementPositionX = -10.0, elementPositionY = -10.0.&amp;nbsp; I'm sure the OP already implemented something similar rather than manually editing 400+ MXDs!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Aug 2021 01:42:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/is-it-possible-to-delete-a-quot-picture-element/m-p/1084795#M61908</guid>
      <dc:creator>Dan_Joyce_OE</dc:creator>
      <dc:date>2021-08-02T01:42:00Z</dc:date>
    </item>
  </channel>
</rss>

