<?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 Accessing Map Document Properties via arcpy.mapping in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/accessing-map-document-properties-via-arcpy/m-p/715629#M55525</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hey folks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am trying to access the Map Document properties through the arcpy.mapping.MapDocuments module. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My issue is, I lose the original information in the fields in the Map Document properties window (File --&amp;gt; Map Document properties...) I am trying to read and write the "Author" of the map. I have set a script to loop through a series of mxd's, make some changes and then SaveACopy to a 9.3 version. Everytime it saves the copy, I lose all the Map Document Properties (ie Author, Title, Summary, etc) In the saved document, those fields turn blank.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have attempted to try to write to those fields to populate the information I want, but I'm at a wall. When the script opens the mxd's through the loop, I set it to print the mxd.author. That works fine. It prints the authors name, but when I open the mxd after the script has finished, this field is blank. I'm not sure if it gets lost when I use the "SaveACopy" method. Any suggestions?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
# Import arcpy module
import arcpy
import os
import glob

folderPath = r"\\Chip\FolderRedirections\John.Doe\Desktop\Test"
&amp;nbsp;&amp;nbsp;&amp;nbsp; for filename in glob.glob(os.path.join(folderPath, "*.mxd")):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "Editing", filename
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mxd = arcpy.mapping.MapDocument(filename)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # This print statement works. I get the return value of mxd.author
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print mxd.author
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mxd.saveACopy(filename + "_93.mxd", '9.3') 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; del mxd

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #After I SaveACopy, I lose the "author" properties information in the new mxd

&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 May 2011 17:48:51 GMT</pubDate>
    <dc:creator>MikeMacRae</dc:creator>
    <dc:date>2011-05-09T17:48:51Z</dc:date>
    <item>
      <title>Accessing Map Document Properties via arcpy.mapping</title>
      <link>https://community.esri.com/t5/python-questions/accessing-map-document-properties-via-arcpy/m-p/715629#M55525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hey folks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am trying to access the Map Document properties through the arcpy.mapping.MapDocuments module. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My issue is, I lose the original information in the fields in the Map Document properties window (File --&amp;gt; Map Document properties...) I am trying to read and write the "Author" of the map. I have set a script to loop through a series of mxd's, make some changes and then SaveACopy to a 9.3 version. Everytime it saves the copy, I lose all the Map Document Properties (ie Author, Title, Summary, etc) In the saved document, those fields turn blank.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have attempted to try to write to those fields to populate the information I want, but I'm at a wall. When the script opens the mxd's through the loop, I set it to print the mxd.author. That works fine. It prints the authors name, but when I open the mxd after the script has finished, this field is blank. I'm not sure if it gets lost when I use the "SaveACopy" method. Any suggestions?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
# Import arcpy module
import arcpy
import os
import glob

folderPath = r"\\Chip\FolderRedirections\John.Doe\Desktop\Test"
&amp;nbsp;&amp;nbsp;&amp;nbsp; for filename in glob.glob(os.path.join(folderPath, "*.mxd")):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "Editing", filename
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mxd = arcpy.mapping.MapDocument(filename)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # This print statement works. I get the return value of mxd.author
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print mxd.author
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mxd.saveACopy(filename + "_93.mxd", '9.3') 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; del mxd

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #After I SaveACopy, I lose the "author" properties information in the new mxd

&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 May 2011 17:48:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/accessing-map-document-properties-via-arcpy/m-p/715629#M55525</guid>
      <dc:creator>MikeMacRae</dc:creator>
      <dc:date>2011-05-09T17:48:51Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Map Document Properties via arcpy.mapping</title>
      <link>https://community.esri.com/t5/python-questions/accessing-map-document-properties-via-arcpy/m-p/715630#M55526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Apparently this is a bug in the "Save A Copy" function. I contacted ESRI and now they are waiting to hear from Redlands.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would suggest using "Save a Copy" tosave your .mxd's first off, and then reopen those copies and process on them.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Mike&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 May 2011 14:32:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/accessing-map-document-properties-via-arcpy/m-p/715630#M55526</guid>
      <dc:creator>MikeMacRae</dc:creator>
      <dc:date>2011-05-13T14:32:57Z</dc:date>
    </item>
  </channel>
</rss>

