<?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 Trying to Create Feature Class - Error Executing Function in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/trying-to-create-feature-class-error-executing/m-p/76387#M2681</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm working on a project of converting a csv table into ArcMap readable shapefiles. I have set parameters for the Create Feature Class tool, but am getting an "error executing function" message (error 999999). I've tried setting different parameters(I'm using default parameters which I indicate with #), but keep getting this message. I also created an xy event layer before running Create Feature ClassAny other ideas?&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;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
data = []
inFile = open(inputFile, 'r')
outFile = open(outputFile, 'w')

count = 0
for n in range(6):
&amp;nbsp;&amp;nbsp;&amp;nbsp; count = count + 1
&amp;nbsp;&amp;nbsp;&amp;nbsp; line = inFile.readline()

while line:
&amp;nbsp;&amp;nbsp;&amp;nbsp; count = count + 1
&amp;nbsp;&amp;nbsp;&amp;nbsp; line = inFile.readline()
&amp;nbsp;&amp;nbsp;&amp;nbsp; print 'Row', count, 'line info=', line[:72]
&amp;nbsp;&amp;nbsp;&amp;nbsp; lineList = line.split(',')
&amp;nbsp;&amp;nbsp;&amp;nbsp; newList = lineList[:72]
&amp;nbsp;&amp;nbsp;&amp;nbsp; print 'line info =', newList&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; newLine = ','.join(newList)
&amp;nbsp;&amp;nbsp;&amp;nbsp; newLine = newLine + '\n'
&amp;nbsp;&amp;nbsp;&amp;nbsp; formatLine = newLine.replace("/","_")
&amp;nbsp;&amp;nbsp;&amp;nbsp; outFile.write(formatLine) 

table = outputFile
in_x_field = "LongitudeNAD83"
in_y_field = "LatitudeNAD83"
out_layer = "xyLayer.lyr"
spatial_reference = arcpy.SpatialReference("Coordinate Systems/Geographic Coordinate Systems/North America/NAD 1983.prj")
arcpy.MakeXYEventLayer_management(table, in_x_field, in_y_field, out_layer, spatial_reference)

out_path = os.path.dirname(outputFile)
out_name = outputFile[:-4] + ".shp"
geometry_type = "POINT"
spatial_reference = arcpy.SpatialReference("Coordinate Systems/Geographic Coordinate Systems/North America/NAD 1983.prj")
arcpy.CreateFeatureclass_management(out_path, out_name, geometry_type, "#", "#", "#", spatial_reference, "#", "#", "#", "#")
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 26 Apr 2013 20:47:20 GMT</pubDate>
    <dc:creator>MikeVann</dc:creator>
    <dc:date>2013-04-26T20:47:20Z</dc:date>
    <item>
      <title>Trying to Create Feature Class - Error Executing Function</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/trying-to-create-feature-class-error-executing/m-p/76387#M2681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm working on a project of converting a csv table into ArcMap readable shapefiles. I have set parameters for the Create Feature Class tool, but am getting an "error executing function" message (error 999999). I've tried setting different parameters(I'm using default parameters which I indicate with #), but keep getting this message. I also created an xy event layer before running Create Feature ClassAny other ideas?&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;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
data = []
inFile = open(inputFile, 'r')
outFile = open(outputFile, 'w')

count = 0
for n in range(6):
&amp;nbsp;&amp;nbsp;&amp;nbsp; count = count + 1
&amp;nbsp;&amp;nbsp;&amp;nbsp; line = inFile.readline()

while line:
&amp;nbsp;&amp;nbsp;&amp;nbsp; count = count + 1
&amp;nbsp;&amp;nbsp;&amp;nbsp; line = inFile.readline()
&amp;nbsp;&amp;nbsp;&amp;nbsp; print 'Row', count, 'line info=', line[:72]
&amp;nbsp;&amp;nbsp;&amp;nbsp; lineList = line.split(',')
&amp;nbsp;&amp;nbsp;&amp;nbsp; newList = lineList[:72]
&amp;nbsp;&amp;nbsp;&amp;nbsp; print 'line info =', newList&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; newLine = ','.join(newList)
&amp;nbsp;&amp;nbsp;&amp;nbsp; newLine = newLine + '\n'
&amp;nbsp;&amp;nbsp;&amp;nbsp; formatLine = newLine.replace("/","_")
&amp;nbsp;&amp;nbsp;&amp;nbsp; outFile.write(formatLine) 

table = outputFile
in_x_field = "LongitudeNAD83"
in_y_field = "LatitudeNAD83"
out_layer = "xyLayer.lyr"
spatial_reference = arcpy.SpatialReference("Coordinate Systems/Geographic Coordinate Systems/North America/NAD 1983.prj")
arcpy.MakeXYEventLayer_management(table, in_x_field, in_y_field, out_layer, spatial_reference)

out_path = os.path.dirname(outputFile)
out_name = outputFile[:-4] + ".shp"
geometry_type = "POINT"
spatial_reference = arcpy.SpatialReference("Coordinate Systems/Geographic Coordinate Systems/North America/NAD 1983.prj")
arcpy.CreateFeatureclass_management(out_path, out_name, geometry_type, "#", "#", "#", spatial_reference, "#", "#", "#", "#")
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Apr 2013 20:47:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/trying-to-create-feature-class-error-executing/m-p/76387#M2681</guid>
      <dc:creator>MikeVann</dc:creator>
      <dc:date>2013-04-26T20:47:20Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to Create Feature Class - Error Executing Function</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/trying-to-create-feature-class-error-executing/m-p/76388#M2682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Mike,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I believe the problem is with your 'out_name' variable.&amp;nbsp; You are setting this to a full path, i.e "C:\Temp\XY.shp".&amp;nbsp; The tool requires that you simply specify the Feature Class/Shapefile Name, i.e. "XY.shp".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Try setting the out_name variable to the following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;out_name = outputFile.split("\\")[-1][:-4] + ".shp"&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Apr 2013 12:19:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/trying-to-create-feature-class-error-executing/m-p/76388#M2682</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2013-04-29T12:19:07Z</dc:date>
    </item>
  </channel>
</rss>

