<?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 Problem with MultiValue MXD Parameter in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/problem-with-multivalue-mxd-parameter/m-p/701717#M23253</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a script that is supposed to automate exporting several map documents. I have it set up as a script tool. The user is prompted to enter a few things, including several MXDs to be exported. I have handled those values as a list and used the 'split' function to separate them:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;mapList = string.split(sys.argv[1],";")&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;After that I have a loop that is supposed to loop through the above list and export the maps. However, when I run the script I get the error: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; &lt;SPAN style="color:&amp;quot;Red&amp;quot;;"&gt;&amp;lt;type 'exceptions.AssertionError'&amp;gt;: Invalid MXD filename.&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The top of the loop looks like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;for map in mapList:
&amp;nbsp;&amp;nbsp;&amp;nbsp; mxd = arcpy.mapping.MapDocument(map)&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I know the rest of the code works, because if I take out the 'map' variable and directly enter the file path of an MXD the script works. I assume it is something blatantly simple, but I just can't figure it out. Any help would be appreciated.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 05:31:00 GMT</pubDate>
    <dc:creator>JohnStephens</dc:creator>
    <dc:date>2021-12-12T05:31:00Z</dc:date>
    <item>
      <title>Problem with MultiValue MXD Parameter</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/problem-with-multivalue-mxd-parameter/m-p/701717#M23253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a script that is supposed to automate exporting several map documents. I have it set up as a script tool. The user is prompted to enter a few things, including several MXDs to be exported. I have handled those values as a list and used the 'split' function to separate them:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;mapList = string.split(sys.argv[1],";")&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;After that I have a loop that is supposed to loop through the above list and export the maps. However, when I run the script I get the error: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; &lt;SPAN style="color:&amp;quot;Red&amp;quot;;"&gt;&amp;lt;type 'exceptions.AssertionError'&amp;gt;: Invalid MXD filename.&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The top of the loop looks like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;for map in mapList:
&amp;nbsp;&amp;nbsp;&amp;nbsp; mxd = arcpy.mapping.MapDocument(map)&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I know the rest of the code works, because if I take out the 'map' variable and directly enter the file path of an MXD the script works. I assume it is something blatantly simple, but I just can't figure it out. Any help would be appreciated.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 05:31:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/problem-with-multivalue-mxd-parameter/m-p/701717#M23253</guid>
      <dc:creator>JohnStephens</dc:creator>
      <dc:date>2021-12-12T05:31:00Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with MultiValue MXD Parameter</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/problem-with-multivalue-mxd-parameter/m-p/701718#M23254</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I have a script that is supposed to automate exporting several map documents.&amp;nbsp; I have it set up as a script tool.&amp;nbsp; The user is prompted to enter a few things, including several MXDs to be exported.&amp;nbsp; I have handled those values as a list and used the 'split' function to separate them:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;mapList = string.split(sys.argv[1],";")&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;After that I have a loop that is supposed to loop through the above list and export the maps.&amp;nbsp; However, when I run the script I get the error: &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The top of the loop looks like this:&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;for map in mapList:
&amp;nbsp;&amp;nbsp;&amp;nbsp; mxd = arcpy.mapping.MapDocument(map)&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;I know the rest of the code works, because if I take out the 'map' variable and directly enter the file path of an MXD the script works.&amp;nbsp; I assume it is something blatantly simple, but I just can't figure it out.&amp;nbsp; Any help would be appreciated.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;John,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm now having very much the same problem. Although, my code did work once. It seems it failed to work every time since. Did you ever find a solution?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 05:31:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/problem-with-multivalue-mxd-parameter/m-p/701718#M23254</guid>
      <dc:creator>deleted-user-1T_bOHag6M8d</dc:creator>
      <dc:date>2021-12-12T05:31:02Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with MultiValue MXD Parameter</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/problem-with-multivalue-mxd-parameter/m-p/701719#M23255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
for map in mapList:
&amp;nbsp;&amp;nbsp;&amp;nbsp; print 'Map Document: %s' % map
&amp;nbsp;&amp;nbsp;&amp;nbsp; mxd = arcpy.mapping.MapDocument(map)
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then you get the name of the troublesome map document, which should help you solving your problem.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 05:31:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/problem-with-multivalue-mxd-parameter/m-p/701719#M23255</guid>
      <dc:creator>NiklasNorrthon</dc:creator>
      <dc:date>2021-12-12T05:31:05Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with MultiValue MXD Parameter</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/problem-with-multivalue-mxd-parameter/m-p/701720#M23256</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am having the same problem and I have tried to use multiple map documents to see if the name is the issue. It throws the same error every time. So why can't I get an mxd name from the value table containing full paths to mxd's?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ok my problem occurred when I grabbed the values out of the table, they were delimited with ' '.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Mar 2011 02:30:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/problem-with-multivalue-mxd-parameter/m-p/701720#M23256</guid>
      <dc:creator>MichaelFedak</dc:creator>
      <dc:date>2011-03-02T02:30:50Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with MultiValue MXD Parameter</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/problem-with-multivalue-mxd-parameter/m-p/701721#M23257</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I am having the same problem and I have tried to use multiple map documents to see if the name is the issue. It throws the same error every time. So why can't I get an mxd name from the value table containing full paths to mxd's?&lt;BR /&gt;&lt;BR /&gt;Ok my problem occurred when I grabbed the values out of the table, they were delimited with ' '.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks, that solved my problem, the ' ' appended to the ends, took hours to figure out what was wrong.&amp;nbsp; Now I have to wonder why ESRI decided that apostrophes should be appended to string values. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Items directly from the TOC "do not exist" all because of the ' ' , I can understand if they were from some other location, but this is straight out of the TOC.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We are not amused ESRI...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;(wheres the 'duh ESRI' smiley?)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 May 2011 00:16:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/problem-with-multivalue-mxd-parameter/m-p/701721#M23257</guid>
      <dc:creator>GroundHogg</dc:creator>
      <dc:date>2011-05-11T00:16:19Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with MultiValue MXD Parameter</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/problem-with-multivalue-mxd-parameter/m-p/701722#M23258</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I wrote a script to create thumbnails of each mxd in a directory which works fine, but I want it to also walk through subdirectories - I am getting a Assertion Error (below). I've looked through the help but can't figure out whats wrong.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Code attached.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;best,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Reading mxd files from P:\2011\Job_031_TownPlanning_SeriesProduction\Working\mxd\B&amp;amp;L\2\Ver1
11
2\11_TownPlanning_B&amp;amp;L_Overlay_Ver2_Kuranda.mxd &amp;lt;geoprocessing Map object object at 0x15DE25E0&amp;gt;
Created thumbnail for 2\10_TownPlanning_B&amp;amp;L_Overlay_Ver2_MtMalloy.mxd
Traceback (most recent call last):
&amp;nbsp; File "P:\2011\Job_031_TownPlanning_SeriesProduction\Working\mxd\B&amp;amp;L\2\Ver1\MakeThumbnails-TB.py", line 25, in &amp;lt;module&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; mapDoc=arcpy.mapping.MapDocument(mapDocs)
&amp;nbsp; File "C:\Program Files\ArcGIS\Desktop10.0\arcpy\arcpy\arcobjects\mixins.py", line 443, in __init__
&amp;nbsp;&amp;nbsp;&amp;nbsp; assert (os.path.isfile(mxd) or (mxd.lower() == "current")), gp.getIDMessage(89004, "Invalid MXD filename")
AssertionError: Invalid MXD filename.&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 05:31:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/problem-with-multivalue-mxd-parameter/m-p/701722#M23258</guid>
      <dc:creator>George_ChandeepCorea</dc:creator>
      <dc:date>2021-12-12T05:31:08Z</dc:date>
    </item>
  </channel>
</rss>

