Hi all!
IF I wanted to run this same script across many tables with x y coordinates how would I go about doing that? I have to automate the process. I have the script set up as this
>>> import arcpy
>>> from arcpy import env
>>> env.workspace = "C:/Users/Anne/Desktop/Python/final"
>>> arcpy.ListTables()
[u'AB10_.dbf', u'AB11_.dbf', u'AB15_.dbf', u'CFHMS_.dbf', u'CFMHN_.dbf', u'FA_.dbf', u'HSFHome_.dbf', u'HSFVAN_.dbf', u'KF18_.dbf', u'KF1W_.dbf', u'LASA_.dbf', u'MB_HAck_.dbf', u'PCM10_.dbf', u'PMB28_.dbf', u'pmc9_.dbf', u'SHROCK_.dbf', u'simo09_.dbf', u'SIMO94_.dbf', u'SP150_.dbf', u'sp42_.dbf', u'T13East_.dbf', u'T13West_.dbf', u'TB53_.dbf', u'TB63_.dbf', u'WSFBOW_.dbf', u'WSFDALLAS_.dbf']
>>> tblist = arcpy.ListTables()
>>> tb = tblist
>>> xc = "Lat"
>>> yc = "long"
>>> out_layer = "pointlayer"
>>> saved_layer = r"C:/Users/Anne/Desktop/Python/final"
>>> spRef = r"Coordinate Systems\Geographic Coordinate System\World\WGS 1984"
>>> for tablelist in tblist:
... arcpy.MakeXYEventLayer_management(tblist, xc, yc, out_layer, spRef)
... print arcpy.GetCount_management(out_layer)
...
And that is the error message I get.
Should I be doing something else to the table list?
I may be in the wrong place, but I really need help 🙂
Runtime error
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\management.py", line 6348, in MakeXYEventLayer
raise e
RuntimeError: Object: Error in executing tool
>>>