A site-package created by Esri to expose GeoProcessing from ArcGIS to Python.

learn more… | top users | synonyms (7)

1
vote
2answers
78 views

How to keep a parameter blank in a script tool?

I've developed a sort of find and replace script tool that functions. But I'm not able to figure out how to find empty cells in fields and replace them.For the "Find" parameter, I have tried ...
0
votes
1answer
42 views

Populating the drop down of GPValueTable

In a Python Toolbox the user has to select a city from a list of 50 world cities. More than one city can be selected. The best UI control for that would be Autocomplete / Autosuggest, but since this ...
0
votes
1answer
46 views

Writing Python Script to Iterate through several geodatabases in folder and copy feature classes to single geodatabase?

I need to go through multi GDB in 1 folder and copy all feature classes from each GDB and copy them into the single GDB. I create a piece of python code that can go through each different GDB and also ...
5
votes
1answer
99 views

Using feature class name as name in output (buffer_analysis)

I'm pretty new in python, and I'm trying to iterate through a list of feature classes, and perform a buffer on each feature class. So I've done this: import arcpy from arcpy import env ...
3
votes
2answers
162 views

ImportError: No module named pandas in Python window of ArcMap after installing with pip?

I have downloaded pandas from this site then unzipped it in site-packages and run python setup.py for installing pandas. Pandas was installed successfully. After that I tried importing pandas into ...
0
votes
0answers
15 views

Fuzzy membership output different in arcpy and desktop

I am running a fuzzy membership on multiple rasters with the following code: arcpy.env.workspace=r'F:\Sheyenne\Normalized_Indices\NDII' ...
2
votes
1answer
27 views

Problems with insert cursor

I am counting the number of features in a geodabase. I am triying to insert the feature name and the count inside a dbf table which has only two fields: "FEAT" (Text field which containts the feature ...
0
votes
1answer
44 views

Creating Replica using ArcPY with check_out type

I am running the following command in python and it works fine no error but it does not generate a mdb in output path folder and give me the input path result as output child source ...
2
votes
1answer
70 views

Developing find and replace script tool?

I'm being tasked for developing a script tool that can find ultimately needs to be able to find any string and replace it with another string in an attribute table. Below is what I have so far, and it ...
0
votes
1answer
32 views

Get filepath then append a feature class to that feature class Python Addins

I'm trying to use tool bar buttons (python addins) to add a filepath and then append another feature class (known to have identical schema, no test needed) to that filepath. My syntax isn't working ...
2
votes
1answer
54 views

Spell checking for ArcGIS Desktop?

Looking for a free spell check for ArcGIS 10.1. Someone wrote a VBA for pre-10 here. Is there a way to implement it in 10.1, perhaps writing it in python instead of VBA?
4
votes
1answer
101 views

Creating arrays and polylines from dictionary using ArcPy?

I have created a dictionary out of a csv values from an excel spreadsheet. I'm trying to use the keys and values in the dictionary to create arrays (one per 'Rhino') that I can use to create ...
3
votes
1answer
156 views

Not getting correct result from for loop

The for loop below works without error, but the result is get in the table of my database is wrong. Its as if the for loop skips right over the first 3 if and elif statements and goes to the else. The ...
0
votes
0answers
23 views

Arcpy Select by Location out of memory

I have multiple lines (lines) intersecting points (centroids) from which I want to extract landuse values and then write the extracted values to the lines as 'land1' and 'land2' values. I need to ...
1
vote
0answers
41 views

Select Layer By Location (Management) gives different result in ArcPy and ArcMap?

I have two line Shape files. When I use the Select layer by location tool to select two intersecting lines, it works fine and selects only lines which are actually intersecting. But when I use this ...
1
vote
1answer
36 views

While loop with Select by location (Add to selection) is not stopping

I have problem with my while loop code. It is not stopping, despite that values used to evaluated the condition to stop the loop are actually met (I can see in in my print statement). Here is the ...
0
votes
1answer
37 views

How to add multiple text elements in ArcMap using ArcPy

I've been able to add a dynamic text element (with an element name of 'TestName') that reflects a layer name and that changes for each corresponding exported layer to a GIF. I am now trying to add a ...
0
votes
0answers
6 views

Fixing error arcgisscripting.ExecuteError: ERROR 000358: Invalid expression Failed to execute (SelectLayerByAttribute)? [duplicate]

This is my code: import arcpy arcpy.env.overwriteOutput= True inputpath= "S:\\376\\Spring16\\jthoma16\\Lab 5\\Lab05_data\\part2\\" outputpath= "S:\\376\\Spring16\\jthoma16\\Lab ...
1
vote
1answer
68 views

Calculating angle between polyline segments and assign this value to point?

I have a polyline feature with many segments (polyline splitted at vertices). I plan to record angle values to attribute table per each polyline segment and assign it to point features. I need to ...
2
votes
1answer
68 views

Accessing layer properties with arcpy

I have a process that I'm trying to streamline. On a regular basis I have to produce ArcPad base maps for low end GPS units. The area that I need to cover is very large (ca. 7 million acres). I've ...
0
votes
1answer
59 views

ArcPy - Symbology Color Changes After Setting Class Break Values

I develop a python script tool to adapt the symbology of a set of shapefiles based on a given symbology template (layer file). These are the properties that should be changed: Number of classes and ...
0
votes
1answer
80 views

Select by location using ArcPy

I try to select by location all layers that intersect layer named "frame", and then remove from the maps other layers that don't intersect it. Finally, i want to print the all the removed layers and ...
1
vote
1answer
55 views

Insert (or Update) Cursor setting value to None not honored when field has a default value

To set a field to null, the InsertCursor or UpdateCursor is setting the value to None. Here is a sample for the UpdateCursor: with arcpy.da.UpdateCursor(test_fc, ['SERVICEINDICATOR'], """"OBJECTID" ...
2
votes
2answers
78 views

Python script runs in ArcCatalog and ArcToolbox, but not in PyScripter

I have a script that imports a custom toolbox, copies data from an sde to a file/personal gdb, removes custom feature class extensions, etc. The script runs fine in Catalog, but I receive the ...
4
votes
0answers
56 views

Cell Statistics standard deviation values incorrect

I'm having some issues with the Cell Statistics tool in a python script I am writing. I am using 30 years worth of global cumulative annual rainfall data as input and am getting strange values in some ...
1
vote
1answer
43 views

How to create dynamic text in ArcPy that recursively reflects the exported layer name from a list of layers

I have a script shown below with the help from @Midavalo that exports irrig_0, citylyr, boundlyr as a GIF. Once this is done the script then exports irrig_1, citylyr, boundlyr as another GIF and so ...
0
votes
0answers
31 views

Redrawing multisegmented lines as arcs using measurements stored in attributes

I'm beginning the process of moving our local government cadastre data in to a topologically clean parcel fabric layer using ArcGIS. I'm at the stage where I'm looking to clean the data and get it ...
1
vote
0answers
43 views

Adding multiple fields to feature classes in enterprise geodatabase using ArcPy?

I am very, very new at python and am trying to put together a tool that can be run on an enterprise geodatabase that will add a series of fields to each feature class. So far I have only been able to ...
1
vote
0answers
28 views

Size of the Output Files Cannot Match After Converted From Polygon to Raster

Basically, the emodisfile is the raw data file, and shapfile is one of the CLU shape files. I need to convert the shapefile from polygon to raster and then to ASCII file based on the emodisfile. So I ...
3
votes
2answers
35 views

How to detect Query Layer for toolvalidation using arcpy?

For an arcpy toolvalidation script, I have been trying to figure out a good way to detect ArcGIS layer files (*.lyr) based on "Query Layers", and to distinguish them from "normal" feature layers ...
0
votes
1answer
37 views

Invalid Expression ERROR 000358: Select by Attribute

I'm attempting to select a certain point in a feature layer so I can perform buffer analysis on it. The code seems fine, but I am getting an invalid expression error: File "C:\Program Files ...
0
votes
1answer
53 views

Arcpy turns off all fields in a MXD file that all of the values are Null [closed]

I am trying to turn off all fields in a MXD that have all null values. I have been looking at a SearchCursor without much luck.
1
vote
1answer
29 views

Arcpy how to get field names dynamically from shape file in customized plugin?

On selection of a feature layer ArcMap tools display all the fields, Zonal Statistics is one of the example. I have entered my feature as fishnet and it has shown me all the fields in a list below. I ...
2
votes
1answer
56 views

Why is my ArcPy script deleting its workspace?

I wrote an ArcMap script to go through a feature layer, identify unique values in a given field, and output a feature class from each unique value to its own feature class or shapefile. As an ...
2
votes
0answers
40 views

Identifying lines of one feature class that touch another feature class with their endpoints in ArcMap? [closed]

I want to find out and select the features of one feature class, which both endpoints touch another feature class. In the picture above it would be the left pink line which touches feature of ...
1
vote
0answers
52 views

Python Addin - Run script from button [closed]

I'm developing a Python Addin for ArcMap. This will consist of a button that will run another python script: import arcpy from arcpy import env import pythonaddins import os class ...
0
votes
0answers
29 views

Geometric Network Comparison with some other Geometric Network

How can I get report of geometric network rules in details. I want to compare geometric network rules with another geometric network to analyze the difference. In Geometrical Network I have plenty ...
1
vote
1answer
50 views

How to update new column in attribute table with same values but different field type?

I am struggling a bit with debugging my code, over something that seems very simple. I am using an update cursor to copy and convert existing string data into a new float column of my shapefile's ...
1
vote
1answer
33 views

Near analysis for nearest feature in a distinct angle

I want to calculate the nearest distance from a point feature to a line feature in a distinct angle. When using the Near analysis tool in ArcGIS I get the nearest distance in a angle where the ...
1
vote
1answer
33 views

“Extract by Mask” saving output as temporary file, instead of saving it in specific directory. How to remove this error?

I am using ArcGIS 10.0, while using ExtractByMask in arcpy output file is being stored as a temporary file, though the same file appears in the designated directory but it's status is temporary, which ...
1
vote
1answer
46 views

Passing field name as parameter to script in ModelBuilder?

I am new to ModelBuilder. I am running a python script from ModelBuilder that requires as it's parameters a table view and specific field names from that tableview. Essentially the script is looking ...
1
vote
0answers
42 views

delete feature classes with a similar name in arcpy

I have a script that does a dissolve on polygons with a common field. I'm only interested in keeping the outputs that contain more than one polygon. I'm new to python and having trouble writing a ...
1
vote
1answer
51 views

How to export specified layers in ArcMap using ArcPy

I am trying to export specific layers from an ArcMap .mxd. From the TOC below I would like to export "irrig_2, citylyr, boundlyr" as a GIF. Once this is done the script would then export "irrig_1, ...
2
votes
2answers
83 views

Why does FeatureClassToFeatureClass work in ArcMap but not in Python script?

When trying to copy a feature class from an SDE connection file to a scratch GDB, the FeatureClassToFeatureClass_conversion works in the ArcMap Python window, but I can't get it to work in a Python ...
-1
votes
1answer
39 views

Trying to use functions [closed]

Trying to use functions. First, embed the code in script, then I'll trying calling them from a file. I'm getting the error denoted below. After two days, it's time to get some fresh eyes ... Python ...
1
vote
1answer
40 views

How to create dynamic text of a layer name?

I'm trying to implement the code mentioned on this post: Best way to have title which includes dynamic text of a layer name? and I'm getting the error below. I am a novice and know nearly nothing ...
2
votes
1answer
39 views

lyr.datasetName works with “CURRENT” mxd but not with mxd path

I have some mxds in wich I want to set all the layers a layer description. This works as far as I use the code with current mxd, but if I give a path it has no results, and I also don't get any error ...
1
vote
2answers
43 views

Use arcpy to Import Symbology instead of Apply Symbology?

I am using arcpy (ArcMap 10.1) to create a series of maps of the same extent that show increased count of disease in areas over time. For example, in the first map, the disease count will be low in ...
1
vote
0answers
42 views

How can I Use Python in ArcGIS to Manipulate the Underlying Data of Selected Polygons [closed]

I am relatively new to python in ArcGIS. I have a shapefile loaded in ArcGis (v 10.0) and will select two adjacent polygons using the selection tool. Once I select my two polygons, I want to use ...
2
votes
1answer
57 views

Filter the Feature Layer parameter in Python Script Tool

I have a Python script tool where I have a parameter of type Feature Layer because I want to have the already opened layers as a dropdown list. I was wondering if there is a way to filter this ...