Tag Info

Hot 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: ...


2

I adapted the solution to move / shift points point into a certain direction (angle) and a given distance. Looks like: def shiftXYCoordinates(shape,angle,distance): point = shape.getPart(0) point.Y += distance * math.cos(math.radians(angle)) point.X += distance * math.sin(math.radians(angle)) return point and be called like shiftXYCoordinates(!SHAPE!, ...


1

Have you tried looking at the help file? Its all written here, sample code at the end shows a simple loop which you can easily adapt to change the layer property definitionQuery.


1

I can see 2 issues in you script: You're missing the second join_field parameter in arcpy.JoinField_management. Refer to the tool's page for the correct syntax: JoinField_management (in_data, in_field, join_table, join_field, {fields}) If you work with shapefiles and dbf tables, you should add the .shp or .dbf extension to your inputs. For example your ...



Only top voted, non community-wiki answers of a minimum length are eligible