<?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: saving/disk space error in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/saving-disk-space-error/m-p/374369#M29555</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the response...so do I only have to put in "CURRENT" within the parenthesis or do I need to add in the file path as well? I'm trying it with just "CURRENT" and it's not going through...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Dec 2012 19:40:24 GMT</pubDate>
    <dc:creator>ChristopherBride</dc:creator>
    <dc:date>2012-12-11T19:40:24Z</dc:date>
    <item>
      <title>saving/disk space error</title>
      <link>https://community.esri.com/t5/python-questions/saving-disk-space-error/m-p/374365#M29551</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;This error has been plaguing my final project for weeks and I really need a solution to it. I am using the code below. It only works when the map is not open. When it is open, I get the following error: &lt;/SPAN&gt;&lt;STRONG&gt;IOError: MapDocObject: Unable to save.&amp;nbsp; Check to make sure you have write access to the specified file and that there is enough space on the storage device to hold your document.&lt;/STRONG&gt;&lt;SPAN&gt; Which is ridiculous because I am using my personal computer and I have a huge hard drive.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;arcpy.workspace = &lt;SPAN style="color: rgba(0, 0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;r"C:\Users\me\Documents\School\GEP662\FinalMaterial\MapData"&lt;/SPAN&gt;
inFC = "HudsonRiverSamplingHyperlinks.shp"
arcpy.MakeFeatureLayer_management(inFC, "HudsonRiverSamplingHyperlinks_layer")
arcpy.ApplySymbologyFromLayer_management("HudsonRiverSamplingHyperlinks_layer", 
&amp;nbsp;&amp;nbsp; "RKSymbologyLayer.lyr")
lyrLayer = arcpy.mapping.Layer("HudsonRiverSamplingHyperlinks_layer")
arcpy.mapping.AddLayer(df, lyrLayer, "AUTO_ARRANGE")
&amp;nbsp;&amp;nbsp; 
mxd.save()

del mxd

print "completed successfully"&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But like I said, when the map is closed, it works fine. This is a problem because i need to create a tool in C# that utilizes the script when the map is open. Should I use saveACopy? Seems like I used that while troubleshooting and it came back with the same error.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(Curtis Price formatted the code, see &lt;/SPAN&gt;&lt;SPAN&gt;&lt;A href="https://community.esri.com/migration-blogpost/1070" target="_blank"&gt;Posting Code blocks in the new GeoNet&lt;/A&gt;​)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 17:19:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/saving-disk-space-error/m-p/374365#M29551</guid>
      <dc:creator>ChristopherBride</dc:creator>
      <dc:date>2021-12-11T17:19:07Z</dc:date>
    </item>
    <item>
      <title>Re: saving/disk space error</title>
      <link>https://community.esri.com/t5/python-questions/saving-disk-space-error/m-p/374366#M29552</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You cannot use mxd.save() while the target map document is open unless you call this from within the mxd using the "current" parameter for the path.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Dec 2012 14:14:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/saving-disk-space-error/m-p/374366#M29552</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2012-12-11T14:14:07Z</dc:date>
    </item>
    <item>
      <title>Re: saving/disk space error</title>
      <link>https://community.esri.com/t5/python-questions/saving-disk-space-error/m-p/374367#M29553</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;You cannot use mxd.save() while the target map document is open unless you call this from within the mxd using the "current" parameter for the path.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Matt - you mean the mxd object was created from the currently open map document, right?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;mxd = arcpy.mapping.MapDocument("CURRENT")
....
mxd.save()
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 17:19:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/saving-disk-space-error/m-p/374367#M29553</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2021-12-11T17:19:10Z</dc:date>
    </item>
    <item>
      <title>Re: saving/disk space error</title>
      <link>https://community.esri.com/t5/python-questions/saving-disk-space-error/m-p/374368#M29554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Matt - you mean the mxd object was created from the currently open map document, right?&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;mxd = arcpy.mapping.MapDocument("CURRENT")
....
mxd.save()
&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes exactly Curtis, sorry if it wasn't clear. I had meant to attach the code you did.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 17:19:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/saving-disk-space-error/m-p/374368#M29554</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2021-12-11T17:19:13Z</dc:date>
    </item>
    <item>
      <title>Re: saving/disk space error</title>
      <link>https://community.esri.com/t5/python-questions/saving-disk-space-error/m-p/374369#M29555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the response...so do I only have to put in "CURRENT" within the parenthesis or do I need to add in the file path as well? I'm trying it with just "CURRENT" and it's not going through...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Dec 2012 19:40:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/saving-disk-space-error/m-p/374369#M29555</guid>
      <dc:creator>ChristopherBride</dc:creator>
      <dc:date>2012-12-11T19:40:24Z</dc:date>
    </item>
    <item>
      <title>Re: saving/disk space error</title>
      <link>https://community.esri.com/t5/python-questions/saving-disk-space-error/m-p/374370#M29556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Thanks for the response...so do I only have to put in "CURRENT" within the parenthesis or do I need to add in the file path as well? I'm trying it with just "CURRENT" and it's not going through...&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You can look at some of the &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//00s30000000r000000"&gt;examples&lt;/A&gt;&lt;SPAN&gt; in the help to get an idea of how to use the arcpy.mapping module.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Dec 2012 19:58:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/saving-disk-space-error/m-p/374370#M29556</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2012-12-11T19:58:59Z</dc:date>
    </item>
  </channel>
</rss>

