Tag Info

New answers tagged

3

With cursors and the csv module, this should go pretty quick: import arcpy, csv, time arcpy.env.workspace = <path to gdb> table_list = arcpy.ListTables() csv_out = <path to csv> #Get name of fields from first entry fields = [x.name for x in arcpy.ListFields(table_list[0])] start = time.time() counter = 0 with open(csv_out, "wb") as f: ...


3

Instead of using the same csvfile1 each time, define a variable that depends on the feature class name. For example: fcList = arcpy.ListFeatureClasses() for fc in fcList: csvFileName = 'CSV_{}.csv'.format(fc) # or just = fc + '.csv' for field in arcpy.ListFields(fc): csvwriter(csvFileName,field.name)


0

Here is your code, this will serve your requirements. import webbrowser import os def open_file(directory, filenames): """ open the files in new window """ if os.path.isdir(directory): for dir_file in os.listdir(directory): if dir_file in filenames: webbrowser.open_new(os.path.join(directory, dir_file)) else: ...


0

Try defining the resource first and pulling the layers from it: myResource = cat.get_resources(store='storeName', workspace='workspaceName') layers = cat.get_layers(myResource)


1

It appears as though you have background geoprocessing for your script enabled. Disable background geoprocessing for this tool and try running it again. Additionally, you are introducing an infinite loop in your script. Change your while loop to include the df.time.currentTime += df.time.timeStepInterval snippet: while df.time.currentTime <= ...



Top 50 recent answers are included