A site-package created by Esri to expose ArcObjects to Python.

learn more… | top users | synonyms (1)

2
votes
0answers
59 views

Arcpy cannot connect to SDE on PostgreSQL with 32-bit version

So I've been banging my head against a wall for awhile with this one. I recently setup an SDE database in Postgres, and all seemed good. I am able to connect to it from both ArcMap and ArcCatalog, ...
1
vote
0answers
27 views

How do I make arcpy exclude frozen / off layers while importing a DWG file?

I'm attempting to update existing GIS feature classes (SDE) using master AutoCAD files but end up importing ALL features present in the AutoCAD drawing regardless of the visibility settings (frozen / ...
0
votes
1answer
51 views

Check In/Out of ArcEditor Licence

I'm having issues with some scripts that import an arc editor licence to run (similar to the example given on this page http://resources.arcgis.com/en/help/main/10.1/index.html#//002z0000000z000000), ...
0
votes
1answer
39 views

table update w/ cursor geometry conflict

I'm creating a table using arcpy with a list of results (stored in 2d lists) following an update to some features. This can sometimes include geometry, so I've attempted to substitute those for a ...
0
votes
1answer
42 views

add feature class by a Checkbox python

sorry for the changes but this is the overview of my problem I'm using 10.2.2 arcgis I have a geodatabase that every day enter new feature class I want to create a tool that lists all the feature ...
4
votes
1answer
75 views

Deleting geodatabases that are more than one week old?

I am using ArcGIS Desktop 10.0 and Python 2.6.6 and am trying to make an update script to copy the geodatabase to a backup folder with the date as part of the name, got that to work. Then export ...
0
votes
1answer
39 views

Add checkbox python tool

I'm using 10.2.2 arcgis I have the following script import arcpy mxd = arcpy.mapping.MapDocument ("CURRENT") df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0] addLayer = ...
2
votes
2answers
149 views

Select the most recent date from a table using Python/arcpy

Given a dataset with a date field, how would I select the row with the most recent date using Python or ArcPy?
0
votes
1answer
21 views

Error in MultipleRingBuffer_analysis in python

I'm trying to use Value table in python to do a multiple ring buffer in ArcGIS 10.1 and I'm getting the following error: ExecuteError: Failed to execute. Parameters are not valid. ERROR 000735: ...
1
vote
0answers
29 views

XY coordinate data cleansing - search split and append not co mingling

My first question posted is for a project that stemmed from my current work where the data entered had some minor coordinate issues but to the extent of the data not being able to import more than 50% ...
0
votes
2answers
60 views

Understanding EOL while scanning string literal from Reclassify in ArcPy?

I'm trying to reclassify a raster using a Python script. I know I can just use the tool in ArcMap, but I want to start understanding the code behind it. Can anyone tell me why this doesn't work ...
0
votes
0answers
57 views

Is there a faster alternative to arcpy spatial join?

I am wondering if there is a more efficient method than using arcpy spatial join in python. I am currently using intersect and closest methods (including a near distance field) so would need ...
1
vote
1answer
75 views

why does arcpy function work in ArcMap python window but not from stand-alone script?

So I think I'm running into a data/schema lock issue, but I have no idea how to tell, or how to fix it for that matter. Here's the setup: I have this chain of gp functions: #extract elevations to ...
0
votes
1answer
69 views

Adding Maximum and Minimum Latitude and Longitude as features in ArcGIS for Desktop?

I have an Excel file with the coordinates (Latitude/Longitude) for an area. The file contains the coordinate of two corners in the latitude/longitude format. How can we do to use Python to iterate ...
0
votes
0answers
16 views

What's a python script to get count of attributes in feature class? [duplicate]

I would like to count the number of attributes in my feature class with python.
2
votes
1answer
77 views

How can I extract the data showed in Version Changes before reconcile/post process?

I want to make a script in python to extract the data about version changes before make the reconcile/post process. Is that possible? I trying to avoid use C# or VB script.
4
votes
2answers
119 views

Selecting points on one side of the road

I am a newby in python scripting in GIS. I have 2 shapefile: first one with roads and second one with points that contains address number and street name. I want to select these points from right ...
1
vote
1answer
264 views

import arcgisscripting gives ImportError: DLL load failed: %1 is not a valid Win32 application

i am trying to import arcgisscripting and getting following error. Traceback (most recent call last): File "<pyshell#0>", line 1, in <module> import arcgisscripting ImportError: DLL ...
0
votes
1answer
40 views

How to generate histograms of multiple fields?

I have a large shapefile and I'm trying to automate a process to generate histograms of several fields with the MakeGraph tool, but I'm receiving the following error. class ...
2
votes
3answers
87 views

Insert layer file to MXDs with multiple data frames using ArcPy?

I have 4 mxd's and I want to insert layer file to each mxd with position in the TOC. Each mxd has 3 and more data frame. I don't know why it does't work. I'm trying this code: import arcpy,os,sys ...
2
votes
3answers
89 views

Remove layer file from MXDs with multiple data frames using ArcPy?

I have a bunch of mxd's and I want to remove layer file from them. Each mxd has 2 and more data frame. I don't know why it does not remove. I'm trying this code: import arcpy,os,sys,string import ...
1
vote
1answer
387 views

ArcMap “One or more layers failed to draw: An invalid SQL statement was used”

I created a model involving the tool Make XY Event Layer because I want to plot latitude and longitude points in CSV file columns. The model runs without errors and appears to have plotted the points ...
0
votes
0answers
66 views

Python script suddenly freezes and start to consume memory

I have a Python 2.7 script that generates multiple polygons around certain polygon (see picture). The meaning is determinate the effectivity of windbreaks. I don't know if my solution for this problem ...
3
votes
0answers
127 views

SetNull in Python script for Arcgis assign 0 value

I am writing a script in Python where I assign to few Tiff defined in a function as inputRaster a NoData value as follows: whereClauseSetNull = "VALUE > 100" outSetNull = SetNull(inputRaster, ...
1
vote
1answer
56 views

Change Data Source of Raster Layer Added to Map Display? Unexpected default

I have a script that I'm using to generate raster maps and automatically add them to the map display, but when they are added they are sourced to a temporary location. I use the same code for ...
2
votes
2answers
103 views

ArcGIS 10.2 : How to prompt a “parameter window” during the execution of a script tool (or model)

I am pretty new to ArcGis and ArcPy, so I apologize if my question seems straightforward. However, I have been looking on the web for quite a while and didn't find any answer so far. I am using ArcGis ...
1
vote
1answer
223 views

ArcPy SearchCursor getValue leads to NoneType object has no attribute lstrip?

I am having a little bit of a dilemma. I am having a problem with using getValue() and striping the value that is returned. For instance, take the following code. import arcpy as ap mxd = ...
1
vote
1answer
24 views

Trouble inserting name of feature in TOC into attribute table using arcpy.calculateField

I currently have about fifty rivers and creeks in a map, and none of the features contain the name of the waterbody. However, the features are named correctly in the table of contents Ideally, I ...
1
vote
0answers
42 views

set extent for jpeg programmatically

I feel like this should be easy, but how can I set coordinates for a jpeg image using Python? I have a python add-in that draws a polygon and then uses its geometry to post a query request to a REST ...
3
votes
0answers
75 views

arcpy.mapping.ExportToTIFF fails to render layer?

Has anyone else had this problem? I have an mxd file with two layers in it, one of which is fairly 'heavy' (i.e. takes a minute or so to draw). All layers are visible by default. I have the ...
4
votes
2answers
196 views

Why does arcpy.da.SearchCursor() class not autocomplete within Eclipse?

I am very new to GIS. I just installed eclipse luna with pydev plug-in and ArcGIS 10.1 for Desktop. When I write a script, trying to import arcpy.da.SearchCursor I see that no SearchCursor is ...
2
votes
1answer
132 views

How I can do event with two clicks using python add-in wizard?

How I can do event with two clicks using python add-in wizard, I have found a way to do event with one click by adding a New Tool in the wizard, but I need "first click To copy the attributes from ...
0
votes
1answer
34 views

Problem in adding raster layer from arcpy

I am using the following code to add the raster layer using arcpy in arcmap def AddRasterLayer(path,layerName): layer=os.path.join(path,'new'+str(layerName)+'.lyr') ...
1
vote
2answers
60 views

How to change field defined as REQUIRED to NON_REQUIRED in ArcGIS Geodatabase

I have created some feature classes in a geodatabase and also some fields using this sample code: arcpy.AddField_management("schools", "ref_ID", "LONG", 9, "", "", "refcode", "NULLABLE", "REQUIRED") ...
0
votes
1answer
68 views

Tools/Software for QA/QC of data

I currently have written a few custom scripts that run basic checks (null values, geocoding errors, fullness of metadata) using Arcpy(10.2 with almost all licenses) and gdal. I'm interested to know ...
3
votes
0answers
305 views

Using arcpy.da.editor on a transactional version raising errors

I've run up against a wall trying to get an edit session to work on a version. These are the scenarios Ive gone through in the code and their error mesages: Setting up an edit session not as a ...
3
votes
1answer
42 views

ArcPy Slope Script - Trouble Saving

I have an ArcPy script that applies the slope function to raster files in ArcGIS. I tried running the script with two raster files in the table of contents, and the script runs, but only saves one ...
2
votes
0answers
73 views

Adding error message to parameter if seperate derived multivalue parameter is empty using ArcGIS tool validation?

I have three tool parameters; an input point feature class, a (multivalue) list of fields derived from the input feature class and an output file location to export to Excel. I have filtered ...
0
votes
1answer
48 views

buffering one feature class by different distance, the result is the buffer distance become same 100 feet

try: # Import modules import arcpy from arcpy import env # Set the workspace env.workspace = r"C:\Esripresspython\GISTPython\Data\City of Oleander.gdb" # Create a variable with the name of ...
1
vote
2answers
49 views

Automating procedure to add shapefile to multiple map templates using ArcPy?

I have a project that has me create a package of about a dozen maps for a client and I do this multiple times per week. I am trying to figure out if there is a way to automate this with python. I am ...
1
vote
1answer
60 views

slow Python script pulling from an iSeries database

I've converted and updated some python scripts that exported data from an iSeries database (HTE) to Access to export the same data to a fgdb. My biggest issue is the time it's taking to export the ...
4
votes
2answers
158 views

Best way to get a bounding polygon of all features in a file .gdb

I have an arcpy script that dynamically creates a filegeodatabase and its featureclasses from uploaded spatial data, currently point and line features and possibly polygons in the future. I am ...
1
vote
1answer
166 views

ExecuteError: Failed to execute. Parameters are not valid. ERROR 000732: Layer Name or Table View: Dataset L does not exist

Hi I am trying to create a loop so that each layer is produced in its own map. This is my code: import arcpy path = "C:\Users\Et\Documents\ArcGIS\Default.gdb" mxd=arcpy.mapping.MapDocument(path ...
1
vote
1answer
45 views

Wrong coordinates after Usage of NumPyArrayToRaster(…)

My Project I am currently working at should enable cellvalue manipulation on raster files using ArcPy. My Script works fine except I am not getting the right Y-Values (northing values) for the ...
3
votes
0answers
175 views

Select and copy attributes features in ArcMap using Python add-in tool?

I'm trying to add a tool to an add-in toolbar to select features from an existing feature class and copy attributes to another feature class,from point to point. TopoHeight_Field_Name='Comment' def ...
4
votes
1answer
131 views

SQL-query in arcpy - SELECT WHERE feature between two values

I need to select features between two values in python with arcpy. However, whenever I try to run the code below, it returns with error message "An invalid SQL statement was used". whereclause = ...
2
votes
1answer
366 views

Error with da.UpdateCursor and SDE feature classes

I am making my first attempt at editing an ArcSDE feature class with python through a da.UpdateCursor. I'm essentially taking code I've written for a file geodatabase feature class and applying it to ...
2
votes
1answer
44 views

Arcpy PointGeometry does not carry forward the ID

I used this as starting point I have the following code: Test data data = numpy.array([(0, 51.1047664, -114.3722785, 1205, ...
0
votes
1answer
80 views

How to list attributes in a field using Python?

I'm using ArcGis 10.2.2 and I'm creating a model in ModelBuilder. I want to know how I can list the attributes of a field and then make a selection for each unique attribute using Python. I have a ...
3
votes
1answer
253 views

ArcGIS 10. Convert dbf to csv or similar in ArcPy without cursors

I have many dbf's created by the Spatial Analyst Sample tool. I would like to convert those dbf's into csv's or space delimited (or any text for that matter). I can't seem to find the ArcPy equivalent ...