<?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: addin in 10.1 - locking errors while appending - quick fix? in Developers Questions</title>
    <link>https://community.esri.com/t5/developers-questions/addin-in-10-1-locking-errors-while-appending-quick/m-p/526844#M3594</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The following code is within a while loop, thanks for investigating!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if (blnFirstCounty == true)&lt;/P&gt;&lt;P&gt;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp; // get ref to local_mcd_muni layer if it already exists&lt;/P&gt;&lt;P&gt;&amp;nbsp; IFeatureLayer lObjLocalMcdMuniFL =&amp;nbsp; Utilities.FindFeatureLayer(OutputLayerName, lObjMxDoc);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if (lObjLocalMcdMuniFL == null)&lt;/P&gt;&lt;P&gt;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp; // LocalMcdMuni layer does not exist, create it using this county &lt;/P&gt;&lt;P&gt;&amp;nbsp; WriteToLog(lObjLogFile, "Exporting " + lObjFinalLocalMuniFL.getName() + " to " + OutputLayerName );&lt;/P&gt;&lt;P&gt;&amp;nbsp; Utilities.ExportFeaturesToShape(lObjFinalLocalMuniFL, OutputLayerName, Utilities.ShapeFileOutputPath, null);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; // Add the layer to the map&lt;/P&gt;&lt;P&gt;&amp;nbsp; WriteToLog(lObjLogFile, "Adding " + lObjFinalLocalMuniFL.getName() + " to the map." );&lt;/P&gt;&lt;P&gt;&amp;nbsp; Utilities.AddShapeFile(OutputLayerName, Utilities.ShapeFileOutputPath, lObjArcApp);&lt;/P&gt;&lt;P&gt;&amp;nbsp; //JOptionPane.showMessageDialog(null, "exported " + OutputLayerName);&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp; else&lt;/P&gt;&lt;P&gt;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp; // LocalMcdMuni layer does exist, append this county to it. &lt;/P&gt;&lt;P&gt;&amp;nbsp; WriteToLog(lObjLogFile, "Appending " + lObjFinalLocalMuniFL.getName() + " to " + OutputLayerName);&lt;/P&gt;&lt;P&gt;&amp;nbsp; Utilities.GeoProcess(lObjFinalLocalMuniFL.getName().concat(".shp"), OutputLayerName.concat(".shp"), Utilities.ShapeFileOutputPath, "", "", "Append");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp; blnFirstCounty = false;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp; else&lt;/P&gt;&lt;P&gt;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp; // This is not the 1st county, so append it to the master layer&lt;/P&gt;&lt;P&gt;&amp;nbsp; WriteToLog(lObjLogFile, "Appending " + lObjFinalLocalMuniFL.getName() + " to " + OutputLayerName);&lt;/P&gt;&lt;P&gt;&amp;nbsp; Utilities.GeoProcess(lObjFinalLocalMuniFL.getName().concat(".shp"), OutputLayerName.concat(".shp"), Utilities.ShapeFileOutputPath, "", "", "Append");&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; // Clean up temp files / layers&lt;/P&gt;&lt;P&gt;&amp;nbsp; Utilities.RemoveLayer(strExplodeLayer, lObjMxDoc);&lt;/P&gt;&lt;P&gt;&amp;nbsp; Utilities.DeleteShapeFile(Utilities.ShapeFileOutputPath, strExplodeLayer);&lt;/P&gt;&lt;P&gt;&amp;nbsp; Utilities.RemoveLayer(strMuniMcdIdentiryLayerName, lObjMxDoc);&lt;/P&gt;&lt;P&gt;&amp;nbsp; Utilities.DeleteShapeFile(Utilities.ShapeFileOutputPath, strMuniMcdIdentiryLayerName);&lt;/P&gt;&lt;P&gt;&amp;nbsp; Utilities.RemoveLayer(lObjFinalLocalMuniFL.getName(), lObjMxDoc);&lt;/P&gt;&lt;P&gt;&amp;nbsp; Utilities.DeleteShapeFile(Utilities.ShapeFileOutputPath, lObjFinalLocalMuniFL.getName());&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 05 Jun 2015 19:07:03 GMT</pubDate>
    <dc:creator>AnthonyZifer</dc:creator>
    <dc:date>2015-06-05T19:07:03Z</dc:date>
    <item>
      <title>addin in 10.1 - locking errors while appending - quick fix?</title>
      <link>https://community.esri.com/t5/developers-questions/addin-in-10-1-locking-errors-while-appending-quick/m-p/526842#M3592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i inherited some java code (using eclipse) for an addin that appends files together - in 10.0 the addin worked, now in 10.1 i get locking errors while appending.&amp;nbsp; Is there a quick code fix for that?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jun 2015 14:56:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/addin-in-10-1-locking-errors-while-appending-quick/m-p/526842#M3592</guid>
      <dc:creator>AnthonyZifer</dc:creator>
      <dc:date>2015-06-05T14:56:51Z</dc:date>
    </item>
    <item>
      <title>Re: addin in 10.1 - locking errors while appending - quick fix?</title>
      <link>https://community.esri.com/t5/developers-questions/addin-in-10-1-locking-errors-while-appending-quick/m-p/526843#M3593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anthony,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm thinking we'd need to see your code to be able to fully interpret what may be causing your locking issues. Many things could be at play here, especially with all the changes from 10 to 10.1.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jun 2015 15:24:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/addin-in-10-1-locking-errors-while-appending-quick/m-p/526843#M3593</guid>
      <dc:creator>ToddBlanchette</dc:creator>
      <dc:date>2015-06-05T15:24:15Z</dc:date>
    </item>
    <item>
      <title>Re: addin in 10.1 - locking errors while appending - quick fix?</title>
      <link>https://community.esri.com/t5/developers-questions/addin-in-10-1-locking-errors-while-appending-quick/m-p/526844#M3594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The following code is within a while loop, thanks for investigating!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if (blnFirstCounty == true)&lt;/P&gt;&lt;P&gt;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp; // get ref to local_mcd_muni layer if it already exists&lt;/P&gt;&lt;P&gt;&amp;nbsp; IFeatureLayer lObjLocalMcdMuniFL =&amp;nbsp; Utilities.FindFeatureLayer(OutputLayerName, lObjMxDoc);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if (lObjLocalMcdMuniFL == null)&lt;/P&gt;&lt;P&gt;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp; // LocalMcdMuni layer does not exist, create it using this county &lt;/P&gt;&lt;P&gt;&amp;nbsp; WriteToLog(lObjLogFile, "Exporting " + lObjFinalLocalMuniFL.getName() + " to " + OutputLayerName );&lt;/P&gt;&lt;P&gt;&amp;nbsp; Utilities.ExportFeaturesToShape(lObjFinalLocalMuniFL, OutputLayerName, Utilities.ShapeFileOutputPath, null);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; // Add the layer to the map&lt;/P&gt;&lt;P&gt;&amp;nbsp; WriteToLog(lObjLogFile, "Adding " + lObjFinalLocalMuniFL.getName() + " to the map." );&lt;/P&gt;&lt;P&gt;&amp;nbsp; Utilities.AddShapeFile(OutputLayerName, Utilities.ShapeFileOutputPath, lObjArcApp);&lt;/P&gt;&lt;P&gt;&amp;nbsp; //JOptionPane.showMessageDialog(null, "exported " + OutputLayerName);&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp; else&lt;/P&gt;&lt;P&gt;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp; // LocalMcdMuni layer does exist, append this county to it. &lt;/P&gt;&lt;P&gt;&amp;nbsp; WriteToLog(lObjLogFile, "Appending " + lObjFinalLocalMuniFL.getName() + " to " + OutputLayerName);&lt;/P&gt;&lt;P&gt;&amp;nbsp; Utilities.GeoProcess(lObjFinalLocalMuniFL.getName().concat(".shp"), OutputLayerName.concat(".shp"), Utilities.ShapeFileOutputPath, "", "", "Append");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp; blnFirstCounty = false;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp; else&lt;/P&gt;&lt;P&gt;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp; // This is not the 1st county, so append it to the master layer&lt;/P&gt;&lt;P&gt;&amp;nbsp; WriteToLog(lObjLogFile, "Appending " + lObjFinalLocalMuniFL.getName() + " to " + OutputLayerName);&lt;/P&gt;&lt;P&gt;&amp;nbsp; Utilities.GeoProcess(lObjFinalLocalMuniFL.getName().concat(".shp"), OutputLayerName.concat(".shp"), Utilities.ShapeFileOutputPath, "", "", "Append");&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; // Clean up temp files / layers&lt;/P&gt;&lt;P&gt;&amp;nbsp; Utilities.RemoveLayer(strExplodeLayer, lObjMxDoc);&lt;/P&gt;&lt;P&gt;&amp;nbsp; Utilities.DeleteShapeFile(Utilities.ShapeFileOutputPath, strExplodeLayer);&lt;/P&gt;&lt;P&gt;&amp;nbsp; Utilities.RemoveLayer(strMuniMcdIdentiryLayerName, lObjMxDoc);&lt;/P&gt;&lt;P&gt;&amp;nbsp; Utilities.DeleteShapeFile(Utilities.ShapeFileOutputPath, strMuniMcdIdentiryLayerName);&lt;/P&gt;&lt;P&gt;&amp;nbsp; Utilities.RemoveLayer(lObjFinalLocalMuniFL.getName(), lObjMxDoc);&lt;/P&gt;&lt;P&gt;&amp;nbsp; Utilities.DeleteShapeFile(Utilities.ShapeFileOutputPath, lObjFinalLocalMuniFL.getName());&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jun 2015 19:07:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/addin-in-10-1-locking-errors-while-appending-quick/m-p/526844#M3594</guid>
      <dc:creator>AnthonyZifer</dc:creator>
      <dc:date>2015-06-05T19:07:03Z</dc:date>
    </item>
  </channel>
</rss>

