<?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: Copy Features Snag in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/copy-features-snag/m-p/263175#M20294</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Did you try these steps?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/EN/ARCGISDESKTOP/10.0/HELP/index.html#//00vp0000000n000210.htm"&gt;http://help.arcgis.com/EN/ARCGISDESKTOP/10.0/HELP/index.html#//00vp0000000n000210.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does the file name already exist?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Apr 2011 14:35:56 GMT</pubDate>
    <dc:creator>MathewCoyle</dc:creator>
    <dc:date>2011-04-12T14:35:56Z</dc:date>
    <item>
      <title>Copy Features Snag</title>
      <link>https://community.esri.com/t5/python-questions/copy-features-snag/m-p/263174#M20293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Greetings,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm writing a basic snap to line script that goes something like this...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;## Snap to Line

# import modules
import arcpy, os, sys
from arcpy import env

# grab user inputs
env.workspace = arcpy.GetParameterAsText(0)
snapLine = arcpy.GetParameterAsText(1)
snapType = arcpy.GetParameterAsText(2)
snapDistance = arcpy.GetParameterAsText(3)
fcBackupDir = arcpy.GetParameterAsText(4)

# define variables
fcList = arcpy.ListFeatureClasses()

# make backup copies of features
for fc in fcList:
 fcBackupName = fcBackupDir + fc
 arcpy.CopyFeatures_management(fc, fcBackupName)
 
# set snapping environment
snapEnv1 = [snapLine, snapeType, snapDistance]

# snap to line
for fc in fcList:
 arcpy.Snap_edit(fc, [snapEnv1])&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;...and I keep getting an error saying...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Runtime error &amp;lt;class 'arcgisscripting.ExecuteError'&amp;gt;: ERROR 000210: Cannot create output C:\GIS\Base\NHD\SGBD\Raw_Shapefiles\Bank_P.shp Failed to execute (CopyFeatures). &lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does this have to do with a schema lock? Is my directory syntax off? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks so much,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;DR&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:54:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copy-features-snag/m-p/263174#M20293</guid>
      <dc:creator>DuncanRager</dc:creator>
      <dc:date>2021-12-11T12:54:20Z</dc:date>
    </item>
    <item>
      <title>Re: Copy Features Snag</title>
      <link>https://community.esri.com/t5/python-questions/copy-features-snag/m-p/263175#M20294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Did you try these steps?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/EN/ARCGISDESKTOP/10.0/HELP/index.html#//00vp0000000n000210.htm"&gt;http://help.arcgis.com/EN/ARCGISDESKTOP/10.0/HELP/index.html#//00vp0000000n000210.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does the file name already exist?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Apr 2011 14:35:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copy-features-snag/m-p/263175#M20294</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2011-04-12T14:35:56Z</dc:date>
    </item>
    <item>
      <title>Re: Copy Features Snag</title>
      <link>https://community.esri.com/t5/python-questions/copy-features-snag/m-p/263176#M20295</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I did see that article. The backup workspace is different, and I tried different names and all came up with the same error.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Apr 2011 14:38:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copy-features-snag/m-p/263176#M20295</guid>
      <dc:creator>DuncanRager</dc:creator>
      <dc:date>2011-04-12T14:38:22Z</dc:date>
    </item>
    <item>
      <title>Re: Copy Features Snag</title>
      <link>https://community.esri.com/t5/python-questions/copy-features-snag/m-p/263177#M20296</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Fixed it. Turned out to be a syntax error in my snapping environment... I used "snapeType" instead of "snapType".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I guess that's why you're supposed to use Try Except statements.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Apr 2011 15:05:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copy-features-snag/m-p/263177#M20296</guid>
      <dc:creator>DuncanRager</dc:creator>
      <dc:date>2011-04-12T15:05:36Z</dc:date>
    </item>
  </channel>
</rss>

