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

learn more… | top users | synonyms (1)

1
vote
1answer
78 views

How to create point features from 1-Many relationship?

I have an address point shapefile for buildings in a city. The point shapefile shows only a single point for each building; apartments are listed in a table called additional addresses. I need to ...
0
votes
1answer
68 views

Help with Point on Polygon overlay in ArcPy

I am trying to do this simple task but not sure how to do this in Python. I have a point shapefile and I want to overlay with polygon layer to get all the polygons for each point. After this would ...
6
votes
5answers
417 views

How to programatically identify the “Joined Field” in ArcMap?

Is it possible to programmatically identify the Join Field that is being used to Table Join two datasets together in ArcMap? I am currently using ArcGIS 10.0, SP5 and would prefer an ArcPy solution, ...
1
vote
1answer
51 views

ArcMap ArcPy - Place signs with no lat/lng on map

I'm new to ArcPy and ArcMap but I do have programming experience. What I am trying to accomplish is to take over 22,000 signs from a database and place them on a map in reference to a street layer ...
0
votes
1answer
85 views

OD Cost Matrix Settings (Arcpy)

I have what is hopefully a fairly simple question. I am trying to run an OD cost matrix for every minute of a day for research I am performing. All of the settings will be the same for each run, ...
1
vote
1answer
314 views

Creating a layer after using SelectLayerByAttribute_management

Is it possible to use an existent layer to do a selection by attributes without having to use MakeFeatureLayer_management first? Because I already have a layer with the same name as the feature class ...
5
votes
1answer
149 views

Can ArcPy 10.1 be used to generate true curve elliptical polygons in a file geodatabase?

As background, this question arose from trying to answer a question on How to generate overlapping polygons from lines output from Table To Ellipse tool? Using the ArcMap GUI it is very easy to ...
4
votes
1answer
162 views

How to generate overlapping polygons from lines output from Table To Ellipse tool?

I have a feature class of line-based ellipses generated by the Table to Ellipse tool that looks like this: What I want is polygons of the individual ellipses, however tools like Feature to Polygon ...
3
votes
2answers
341 views

Python Search cursor: Error handling

I have a search cursor that using a SQL query to match addresses and then returns the associated roll number with that address. However, some addresses do not match the roll number and then I believe ...
1
vote
2answers
269 views

Clip_management to raster extent outputs larger raster than raster extent

Using Python and ArcMap 10.0 SP5, I'm trying to reproject and clip a large input raster to exactly the same grid as a smaller target raster (same extent, pixel sizes and projection). The problem is ...
-1
votes
1answer
265 views

How to calculate the length of clipped lines using buffered points using ArcPy? [closed]

I need to create a buffer around each point of a points feature class. I would then want to use the point buffers to clip the streets feature class to calculate the length of the clipped streets using ...
1
vote
2answers
137 views

How to place points along a line in a specific offset using python / arcpy?

I have a street shapefile with information about the street name, house number from / to on the left side and house number from / to on the right side. My aim is to create a point shapefile that ...
0
votes
0answers
35 views

How to use na.Solve() on layers already created?

I am fairly new to arcpy and I am having troubles recreating the following set of instructions with a python script. Open the KeyChainTest.mxd Enable the Network Analyst extension. Click solve on ...
0
votes
1answer
118 views

In Arcpy, Erase function error: “XML being loaded could not be parsed”

Here we go! A error in my previously-smooth-running arcpy script has me confounded. The error occurs where the script selects individual features in two different feature classes, and then performs ...
1
vote
1answer
107 views

Python: Grabbing X,Y coordinate from matching fields

Here is my table. What I am trying to do is write a python script to go over the Zip_Crid values. If there are matching values, I need to grab x1, y1, x2, y2 and put it in a new field. Haven't ...
6
votes
1answer
331 views

ArcGIS Desktop 10.1 SP1: how to install/use additional Python modules?

I'm currently working on a project where I have to identify geomorphological features in a digital elevation model. Since the aim is to have a single ArcGIS Toolbox integrating all processing steps in ...
2
votes
3answers
126 views

Software needed to recreate VBA forms using python for Arc 10.0

I'm new to programming and need to convert VBA scripted tools for the 10.1 upgrade. I need to recreate the forms and use Python scripting. How do I do this? I need the form to function in 10 ...
0
votes
1answer
46 views

ArcPy space in textfield [closed]

I got a tiny script: def calc(value): if value is '123': return 'ok' elif value is '12 3': return 'not_ok' else: return value if the value is without spaces it works perfectly, but ...
1
vote
0answers
46 views

Insert last coordinates from a list of coordinates with line ID into a multipart polyline feature class

I'm having problems creating the last line from a list of coordinates that I have. I have a text file with coordinate data with a X, Y, and a Line ID (LID). I read the file and inserted each ...
1
vote
1answer
105 views

Batch Aggregate Raster using Python

Trying to write a python script to batch Aggregate a bunch of different rasters. get a Parsing Error Syntax error for line 11. # Batch Aggregate raster tool import arcpy from arcpy import env from ...
0
votes
1answer
441 views

Why does AddField give ERROR: 000732 Input Table: does not exist or is not supported?

I was handed off a a bunch of state shape files and wrote a script to add a few new fields and calculate some attributes. The first line in my script is - ...
4
votes
5answers
896 views

How to move / offset point locations using ModelBuilder or ArcPy

I have a number non-georeferenced CAD layers (see this question) that have text annotation features. I have created a model to convert the text to points, but after converting the annotation to a ...
4
votes
1answer
134 views

extend line to feature. programatically

Thanks in advance for any help. I'm trying to programmatically extend hundreds of lines (blue in image) to a single polyline feature (red in image). Sometimes the lines intersect each other, but I'd ...
2
votes
1answer
106 views

Using update cursor on a field with a domain

I have been replacing field calculations with python update cursors in many of my work flows and today I ran into a problem. The fields being updated have an attribute domain. so now, when I ...
2
votes
2answers
96 views

Determine ArcCatalog's currrently selected folder using Python

Is there a way to get the current directory opened in ArcCatalog 10.0 using Python? Something like os.getcwd() but instead gives the selected folder on the catalog tree. Cheers
0
votes
1answer
127 views

Why does script exported from ModelBuilder give ERROR 000733 at SelectByLocation?

I created a model in ModeBbuilder, and I exported the model as a script, but when I try to run it I get the following error. I have added my error below and the code below that. Thanks for any help. ...
1
vote
1answer
64 views

How do I change the isNullable property for a field?

Once in awhile I encounter a field in my featureclasses that have their isNullable property set to No. Is there a simple way using python to correct this? I came up with this code, but ...
1
vote
1answer
82 views

arcpy selectByLocation

EDIT: OK, added two lines to the code below including a projectAs(). When I start my mxd and run this code it selects a polygon. However, if I then pan to a new location - still within the bounds of ...
0
votes
3answers
197 views

Why does CalculateField set values to <Null> when output extent is in a different coordinate system?

I'm quite new to ArcGIS, and now I have to work on a script that goes through a list of feature classes to: add a field to their attribute table and fill that field with a number that I retrieve ...
0
votes
2answers
134 views

“ERROR 000840 | The value is not a Relationship Class”

I'm stumped here. I've seen this error in other posts but not quite in the same context. I'm trying to run the arcpy.management.CreateRelationshipClass() tool in ArcGIS 10.0. Absolutely everything ...
2
votes
2answers
180 views

Looking for ArcPy tool for calculating statistics on field with summary field AND boolean fields

What I'm searching for is a tool that will sum a field by a secondary unique field AND booleans... Let's say I have 12 table each with 4mil records and the following fields: Donation_Amount ($ ...
0
votes
1answer
155 views

Opening/closing an MXD that uses “production mapping” for dynamic tables in Python

I am currently working on a project that requires using a python/arcpy tool to allow a user to create a map series report PDF. Without getting into much detail, the tool is used when in ArcCatalog or ...
-1
votes
2answers
347 views

Error 000368 selectbylocation in script from model builder

Can anyone help? I created a model-has buffer,clip, selectbylocation.... I exported the model as a script but when i try to run it i get this error: Executing: IGISprogrammingscript ...
1
vote
3answers
227 views

How to get index number of list item using Python?

this gives me a list of all 55 layers in my mxd import arcpy mxd = arcpy.mapping.MapDocument("CURRENT") df = arcpy.mapping.ListDataFrames(mxd, "Layer")[0] for lyr in arcpy.mapping.ListLayers(mxd, ...
2
votes
1answer
104 views

Renaming shapefiles with prefix while running arcpy.FeatureClassToGeodatabase

I'm fairly new to the arcpy world. I am trying to create a script in 10.0 that will load a dataset (file geodatabase) into ArcSDE and rename the feature classes with a prefix, i.e. San_Diego_Bay -> ...
1
vote
0answers
29 views

How to include checkbox or radio button in python script for arcgis tool? [duplicate]

I created an arcgis custom tool for converting an excel file to both kml and shapefile . Now I want to include radio button or checkbox to select according user interest for either kml or shapefile.
1
vote
1answer
110 views

Scaling DA UpdateCursor to large datasets?

I am currently having what appears to be a scaling issue with arcpy, da update cursors, and large file geodatabases. I have a piece of code that iterates through every feature in a feature class and ...
0
votes
4answers
68 views

Generate_arc — Not familiar with its usage and inputs/outputs

I'm using ArcGIS Advanced in order to generate a coverage (I've never worked with coverages before --nor ArcGIS really, know the basics, but not this). I am trying to write a python script to generate ...
0
votes
1answer
31 views

Points Solar Radiation reformat problem

I am trying to produce a set of monthly solar radiation maps based on a monthly parameterization of the diffuse proportion and transmissivity (i.e. new values for both parameters each month). The ...
1
vote
0answers
47 views

Creating sign locations from an existing database with offset & dist to nearest intersection (buffer analysis)?

I have a database of 22,000+ signs that contains the offset from centerline along with a distance to/from the edge of pavement to a specific intersecting road for each sign. I also have a street ...
7
votes
2answers
1k views

How to read an Excel sheet in ArcPy script

I'm writing a python code to convert X,Y points in excel to shapefile. In this process i have toread xy points from shhet1. What is the step i have to include in my process to read data from sheet1 of ...
2
votes
0answers
136 views

ArcPy x64 - Create Enterprise Geodatabase in SQL Server Fails

I'm using ArcGIS Desktop Standard 10.1 SP1 on Windows 7 SP1 x64. SQL Server Native Client 11.0 is installed for both 32 bit and 64 bit. I've also got SQL Server 2012 x64 installed (client tools and ...
3
votes
2answers
97 views

Should Python Add-In installed in map which is packaged be part of *.mpk?

Using ArcGIS for Desktop 10.1 SP1, I just created a map package (.mpk) from a map (.mxd) which had a Python Add-In (.esriaddin) installed. When I unpacked the .mpk the .esriaddin was neither ...
4
votes
3answers
319 views

Checking if python script is run from ArcGIS (arcmap or on server) or a stand alone python script

For debugging purposes I have created a hardcoded conditional that checks it the script is run as stand alone or as an ArcGIS tool. Is there anyway to fugure this out at run time? e.g. some ...
-1
votes
1answer
62 views

How to save a copy of the current data driven page to a new map file?

I need to copy the current data driven page to a new ArcMap Document using arcpy so that I can make sure the file name follows the naming schema that we have defined and the user cannot change. Is it ...
9
votes
6answers
336 views

How to programmatically check if the number of shapes = number of table records?

I have a handful of approximately 1000 shapefiles that are corrupted (see attached error message). The shapefiles were generated from eCognition Developer 8. There is a script tool that seems to ...
2
votes
2answers
224 views

Python script to read coordinate system of an input feature class? [duplicate]

How to read the coordinate system of an input feature class in python script. How we can use "Describe()" function and tool validator for that purpose
3
votes
2answers
235 views

How to control state of buttons in Python Add-In?

I have bunch of buttons to perform separate tasks within a Python Add-In. Buttons are greyed out and required to be enabled after initial tools run. In the following example, tool1 is turned off after ...
-1
votes
1answer
143 views

Raster produced by Con expression not saving

I cannot get a Con expression to work. Or, if it is working, I cannot get the raster produced by the Con expression to save. I have two rasters and I want the positive difference between the two, and ...
1
vote
2answers
100 views

how to add a raw input to a SQL string?

I have this py script for selecting one point. # Within selected features, select only those points of a chosen value arcpy.SelectLayerByAttribute_management("Stations", "NEW_SELECTION", ' "OID" = ...