<?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: Arcpy.mapping Get the extent of the map elements. in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcpy-mapping-get-the-extent-of-the-map-elements/m-p/485070#M37868</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've been having some real problems with GeoNET and links lately and I'm also getting an error with the link you provided. I'm going to talk with &lt;A href="https://community.esri.com/migrated-users/2034"&gt;Timothy Hales&lt;/A&gt;​ about it tomorrow, but GeoNET appears to really hate when I answer questions from Microsoft Edge on my Windows 10 machine and Safari on my Mac. Typically I have to write my responses, post them, and then edit them a couple of times to get the links to work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 07 Dec 2015 05:26:26 GMT</pubDate>
    <dc:creator>FreddieGibson</dc:creator>
    <dc:date>2015-12-07T05:26:26Z</dc:date>
    <item>
      <title>Arcpy.mapping Get the extent of the map elements.</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-mapping-get-the-extent-of-the-map-elements/m-p/485067#M37865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a Python script that will automatically;&amp;nbsp; export the current MXD to a JPG in the same directory as the MXD, name the JPG the same as the MXD with a date added on, store the path to the MXD in a CSV file (including the requester's name), and optionally open the JPG and/or the file location in with Windows Explorer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to improve the script by ensuring that the output JPG is clipped to all graphic elements.&amp;nbsp; Exporting the JPG clipped to the graphic extent is an option if you export via the &lt;EM&gt;File-Export &lt;/EM&gt;&lt;EM&gt;Map&lt;/EM&gt; menu but there is not a handy way of getting those values in Arcpy.mapping.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know I could iterate through all the map elements and identify the xy min/max values, and I am guessing I could clip the output graphic using the Python Image Library.&lt;/P&gt;&lt;P&gt;Does anyone have a arcpy.mapping solution to limiting the export JPG to the same extent as the map elements and not the same size as the page size?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Oct 2015 17:13:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-mapping-get-the-extent-of-the-map-elements/m-p/485067#M37865</guid>
      <dc:creator>GerryGabrisch</dc:creator>
      <dc:date>2015-10-13T17:13:57Z</dc:date>
    </item>
    <item>
      <title>Re: Arcpy.mapping Get the extent of the map elements.</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-mapping-get-the-extent-of-the-map-elements/m-p/485068#M37866</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should be able to get the position of the element on the page from each element object. For example, if you look on the following page for GraphicElement you'll see that there are elementHeight and elementWidth properties. You could get the anchor for the element from the elementPositionX and elementPositionY, but you'd have to know in advance where the anchor is so that you'd be able to do the needed math to determine the extents of the element on the page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;GraphicElement&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;A href="http://desktop.arcgis.com/en/desktop/latest/analyze/arcpy-mapping/graphicelement-class.htm"&gt;http://desktop.arcgis.com/en/desktop/latest/analyze/arcpy-mapping/graphicelement-class.htm&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 06 Dec 2015 23:20:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-mapping-get-the-extent-of-the-map-elements/m-p/485068#M37866</guid>
      <dc:creator>FreddieGibson</dc:creator>
      <dc:date>2015-12-06T23:20:16Z</dc:date>
    </item>
    <item>
      <title>Re: Arcpy.mapping Get the extent of the map elements.</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-mapping-get-the-extent-of-the-map-elements/m-p/485069#M37867</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;Freddie getting an error with your link... copy this one over&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="http://desktop.arcgis.com/en/desktop/latest/analyze/arcpy-mapping/graphicelement-class.htm" title="http://desktop.arcgis.com/en/desktop/latest/analyze/arcpy-mapping/graphicelement-class.htm"&gt;GraphicElement—Help | ArcGIS for Desktop&lt;/A&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 06 Dec 2015 23:37:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-mapping-get-the-extent-of-the-map-elements/m-p/485069#M37867</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-12-06T23:37:47Z</dc:date>
    </item>
    <item>
      <title>Re: Arcpy.mapping Get the extent of the map elements.</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-mapping-get-the-extent-of-the-map-elements/m-p/485070#M37868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've been having some real problems with GeoNET and links lately and I'm also getting an error with the link you provided. I'm going to talk with &lt;A href="https://community.esri.com/migrated-users/2034"&gt;Timothy Hales&lt;/A&gt;​ about it tomorrow, but GeoNET appears to really hate when I answer questions from Microsoft Edge on my Windows 10 machine and Safari on my Mac. Typically I have to write my responses, post them, and then edit them a couple of times to get the links to work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Dec 2015 05:26:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-mapping-get-the-extent-of-the-map-elements/m-p/485070#M37868</guid>
      <dc:creator>FreddieGibson</dc:creator>
      <dc:date>2015-12-07T05:26:26Z</dc:date>
    </item>
    <item>
      <title>Re: Arcpy.mapping Get the extent of the map elements.</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-mapping-get-the-extent-of-the-map-elements/m-p/485071#M37869</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Grief... they are the two browsers I was using.&amp;nbsp; I will check the html content to see if anything is amiss.&amp;nbsp; In Safari, I just copied and pasted, In Edge, I usually have to highlight some words, then use the link tool to produce the link...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ADDENDUM&lt;/P&gt;&lt;P&gt;Tried to edit my original link... it is broken... here is the contents, parsed for reading... I took out the enclosing &amp;lt; a and &amp;lt; / a stuff&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; href=" http:&amp;nbsp; //desktop.arcgis.com/en/desktop/latest/analyze/arcpy-mapping/graphicelement-class.htm&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and as a link&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://desktop.arcgis.com/en/desktop/latest/analyze/arcpy-mapping/graphicelement-class.htm" title="http://desktop.arcgis.com/en/desktop/latest/analyze/arcpy-mapping/graphicelement-class.htm"&gt;GraphicElement—Help | ArcGIS for Desktop&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Dec 2015 09:12:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-mapping-get-the-extent-of-the-map-elements/m-p/485071#M37869</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-12-07T09:12:45Z</dc:date>
    </item>
    <item>
      <title>Re: Arcpy.mapping Get the extent of the map elements.</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-mapping-get-the-extent-of-the-map-elements/m-p/485072#M37870</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am seeing the same behavior for this link in a test post. I have logged a case with Jive to determine the issue. I think it may have something to do with the added prefix and formatting that Jive does.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fdesktop.arcgis.com%2Fen%2Fdesktop%2Flatest%2Fanalyze%2Farcpy-mapping%2Fgraphicelement-class.htm"&gt;https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fdesktop.arcgis.com%2Fen%2Fdesktop%2Flatest%2Fanalyze%2Farcpy-mapping%2Fgraphicelement-class.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Dec 2015 16:02:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-mapping-get-the-extent-of-the-map-elements/m-p/485072#M37870</guid>
      <dc:creator>TimothyHales</dc:creator>
      <dc:date>2015-12-07T16:02:07Z</dc:date>
    </item>
    <item>
      <title>Re: Arcpy.mapping Get the extent of the map elements.</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-mapping-get-the-extent-of-the-map-elements/m-p/485073#M37871</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So getting back to you Gerry... did you figure it out through all the distraction? &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Dec 2015 14:20:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-mapping-get-the-extent-of-the-map-elements/m-p/485073#M37871</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-12-13T14:20:02Z</dc:date>
    </item>
    <item>
      <title>Re: Arcpy.mapping Get the extent of the map elements.</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-mapping-get-the-extent-of-the-map-elements/m-p/485074#M37872</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dan,&lt;/P&gt;&lt;P&gt;I can get the extent of all the elements in an MXD and I can use those values and the Python Image Library to crop the exported image, but for some unknown reason the clipped output has a few pixels trimmed off of the left and bottom edges of the image. I am not sure of the cause without more investigation.&amp;nbsp; See the example below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="cropTest2.jpg" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/164188_cropTest2.jpg" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jan 2016 15:45:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-mapping-get-the-extent-of-the-map-elements/m-p/485074#M37872</guid>
      <dc:creator>GerryGabrisch</dc:creator>
      <dc:date>2016-01-04T15:45:01Z</dc:date>
    </item>
  </channel>
</rss>

