POST
|
I need to add about 10 fields with different parameters to around 300 shapefiles. Is there any way of doing this and removing the current attribute data for shapefiles? I am using ArcMap 10.0 Basic
... View more
11-02-2018
05:56 AM
|
0
|
3
|
1554
|
POST
|
Morning, Thanks for the help. I ran the code, just copy and pasted. Still got an error. Runtime error <class 'arcgisscripting.ExecuteError'>: ERROR 000622: Failed to execute (Layer To KML). Parameters are not valid. ERROR 000625: layer_output_scale parameter has no default value. Thanks for sending the kmz. The reason I need it to work is that I need to do this quite often with different files Regards Danuta
... View more
02-07-2018
09:57 PM
|
0
|
1
|
560
|
POST
|
Hi, Could you post the script again please. Thank you so much for your help
... View more
02-07-2018
06:52 AM
|
0
|
3
|
560
|
POST
|
Hi, thank you for helping me out. I really suck at scripts. I ran the script and and and ArcMap Drawing Error saying one or more layers failed to draw: lyr: An invalid SQL statement was used. Runtime error <class 'arcgisscripting.ExecuteError'>: ERROR 000622: Failed to execute (Layer To KML). Parameters are not valid. ERROR 000625: layer_output_scale parameter has no default value. Should there be changes in the script. Could you tell me what and I can change them? Really appreciate the help
... View more
02-07-2018
06:10 AM
|
0
|
1
|
1139
|
POST
|
Hi, I have copied the above text into python in arc and I got a runtime error. I am using ArcGIS 10.0 >>> def main(): ... import arcpy ... import os ... arcpy.env.overwriteOutput = True ... ... # settings: edit these ... fc_in = r'C:\Users\Danuta\Desktop\CSS 2016-17\TEST\Agri\Agri_EC_working_data.shp' ... fld_trail = 'AA_area' ... out_folder = r'C:\Users\Danuta\Desktop\CSS 2016-17\TEST' ... ... # create list of unique trail names ... lst_trails = list(set([r[0] for r in arcpy.da.SearchCursor(fc_in, (fld_trail))])) ... ... # loop through trails ... for trail_name in lst_trails: ... fld = arcpy.AddFieldDelimiters(fc_in, fld_trail) ... where ="\"{0}\" = '{1}'".format(fld, trail_name) ... arcpy.MakeFeatureLayer_management(fc_in, "lyr", where) ... kmz_file = os.path.join(out_folder, "{0}.kmz".format(trail_name)) ... arcpy.LayerToKML_conversion("lyr", kmz_file) ... ... if __name__ == '__main__': ... main() ... Runtime error <type 'exceptions.AttributeError'>: 'module' object has no attribute 'da'
... View more
02-07-2018
04:34 AM
|
0
|
4
|
1139
|
POST
|
Thank you for coming back to me. I tried what you said, but absolutely nothing happened. Please could you double check Also should train name not be changed to AA_area? def main(): ... import arcpy ... import os ... arcpy.env.overwriteOutput = True ... ... # settings: edit these ... fc_in = r'C:\Users\Danuta\Desktop\CSS 2016-17\TEST\Agri\Agri_EC_working_data.shp' ... fld_trail = 'AA_area' ... out_folder = r'C:\Users\Danuta\Desktop\CSS 2016-17\TEST' ... ... # create list of unique trail names ... lst_trails = list(set([r[0] for r in arcpy.da.SearchCursor(fc_in, (fld_trail))])) ... ... # loop through trails ... for AA_area in lst_trails: ... fld = arcpy.AddFieldDelimiters(fc_in, fld_trail) ... where ="\"{0}\" = '{1}'".format(fld, trail_name) ... arcpy.MakeFeatureLayer_management(fc_in, "lyr", where) ... kmz_file = os.path.join(out_folder, "{0}.kmz".format(trail_name)) ... arcpy.LayerToKML_conversion("lyr", kmz_file)
... View more
02-07-2018
03:50 AM
|
0
|
7
|
1139
|
POST
|
branched from https://community.esri.com/thread/207867-how-to-automate-selection-and-kml-conversion Hi, I need to do something similar but for areas. However I have arcmap10.0 and I cannot get this script to work. Could you please assist me. I need to select multiple attributes that have the same name in the AA_area field and export them as a Kmz. I then need it to choose the next area and repeat. EG. Alexandia is in the attribute table 10 times under AA_area and I would like it to export all 10 polygons into one kmz (this is a shapefile in need to convert from). I need to do this for all the different areas in the AA_area field. Thank you for your help.
... View more
02-07-2018
01:13 AM
|
0
|
17
|
2401
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|