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

learn more… | top users | synonyms (1)

1
vote
2answers
65 views

Using raw_input python to accept string with a dash (-)

Hello I have the following python input. The user will enter a value with a dash always. E.g. 2015-0001 Var1 = raw_input("Enter the number with dash: ") ...
0
votes
1answer
57 views

Connecting to ArcSDE with arcpy is slow (ArcSDESQLExecute)

I'm creating an API which will allow queries to be performed on my GeoDatabase. I'm using ArcSDESQLExecute to connect to ArcSDE (backed with an Oracle database). Creating the connection object is very ...
0
votes
0answers
35 views

Parameters for CreateFishnet

I´m about to create a fishnet. The CreateFishnet tool has several parameters, between them the origin_coord - The starting pivot point of the fishnetl. Data type of this parameter is Point Now there ...
0
votes
1answer
67 views

For Loop Batch Copy Raster TIFF to BMP in ArcMap

I need to convert TIFFs to BMPs using CopyRaster from ascii to raster output TIFFs. I am not sure how to define the "outRaster" so that it will convert the rasters to BMP. I'm guessing that the line ...
1
vote
1answer
56 views

Is there String Size Restriction in ArcGIS Python Script Tool parameter?

I'm trying to post a list of unique ID's (as a string) to a Python script tool for processing by ArcGIS Desktop 10.0. The list may be 50k+ id's long (~450kb). e.g. ...
0
votes
2answers
63 views

Feature Class to Coverage arcpy

Not much info out there these days on coverages in PYTHON. I need to convert a feature class to a coverage but cannot find out how to do it in python. All I have found is ...
4
votes
4answers
569 views

How to iterate fields and remove Null values and spaces

Is it possible to iterate fields in a table to remove Null values and spaces (where there is no value)? In other words, I would like to replace Null and " " with "" (no space). Cobbling arcpy ...
0
votes
1answer
196 views

Python: TypeError: a float is required

I have a python script with some parameters - see screen. You see the last parameter is of type Double, default Value 0. The code i have this: Ausrichtung = float(arcpy.GetParameterAsText(9)) if ...
1
vote
0answers
30 views

Adding layer to MXD from different SDE slows down ArcPy script

My python script looks at layers in an MXD, then does a couple of clip and measure operations and generates a PDF. It works accurately and quickly (0.5-3 seconds) when all the layers in the MXD are ...
0
votes
1answer
79 views

Trying to update separate table with SearchCursor

Learning Python to use in ArcGis 10.2 and becoming bald I want to get value from a certain field from one attribute table into another attribute table. IN PT1, If Meas of Object1 > Meas of Object2, ...
4
votes
3answers
275 views

ArcGIS Python code how to find if layer data is from an .mdb or a .gdb

In my ArcGIS Python code, I need to loop over a couple of layers, and from those layers only select the operational fittings: arcpy.SelectLayerByAttribute_management(fittings, "NEW_SELECTION", ...
1
vote
0answers
46 views

Python loop doesnt work properly for hundreds of Raster files (HDF)!

For generating Time Series, I prepared a python script which are supposed to get all task done through looping. Interestingly, It stops working after 12 HDF file but I need to do loop through all ...
1
vote
1answer
88 views

Automated map export, iterating layers and editing text

So just a beginner here. I've been automating a few map exports with ArcMap, I've used stack exchange to mash together some scripts to export maps with one FC symbolised using different fields and ...
0
votes
1answer
77 views

Field Mapping in ArcPy gives Error in adding input field to field map?

I have a process in which I am joining a DBF table to multiple shapefiles to create a new output of some selected fields which result from the join. I am new to fieldMapping and need help figuring out ...
1
vote
1answer
59 views

How to change font size in table of content

How can i change the font size of layers in the TOC manualy and also with arcpy ? The default is to small
1
vote
0answers
30 views

Modify a Python script to one that uses RasterDomain_3d fuctionality - and writes resulting shapefiles it to one

As I am not very experienced with Python I need your help. I managed to modify a Script (that has been posted here Get boundary of raster image as polygon in ArcGIS Desktop? by ...
1
vote
3answers
62 views

Select Layer by Location problem

i want to create a python scipt query using arpy in arcgis i have one polyline shapefile and one polygon shapefile i want to choose(select) the polygons where contained within in the polylines ...
0
votes
0answers
85 views

Output extent environment is not respected by Select Layer By Attribute (ArcGIS 10.2)

I cannot get the arcpy.env.extent working for Select Layer By Attribute GP tool. I can verify that I get various values for coordinates when I have panned to various areas on the map. Copy Features GP ...
0
votes
1answer
108 views

Create multiple new shapefiles using information contained in a table

I'm hoping to create a script that creates a new shapefile for each record in a table. My python experience is limited, and it has been a while since I used it, so I'm having a hard time getting ...
0
votes
4answers
86 views

arcpy interate row, in a python script? SQL Select expression not working

I am creating a python script where I am trying to iterate over point feature class. I want to create seperate Feature classes from each individual day. So select daynumber and then export it to a new ...
0
votes
1answer
42 views

Cloning a transactional version in ArcGIS

In ArcGIS documentation, I cannot find any references to cloning a transactional version. Is there a built in method for it? I think I know how to do it manually in Arcpy, basically creating a new ...
2
votes
2answers
133 views

How can I leverage ArcGIS Online sign in credentials/dialog box in a python add-in for Desktop?

When a user has signed in to their ArcGIS Online account in ArcGIS for Desktop (File > Sign In) they have access to their AGOL maps and services and have the ability to publish services and run GP ...
0
votes
1answer
90 views

Batch arcpy.CopyRaster after arcpy.ASCIItoRaster

I'm new to arcpy and am having trouble running CopyRaster. Do I need a separate for loop for this process like I have below? import os,arcpy, glob filepath = ...
0
votes
2answers
96 views

Select layer by attribute for entries in a dictionary (python)

I'm kinda new to python (and programming) and having trouble figuring out how to properly specify what I want to do. Basically, my code compares names of well owners and orps owners and saves all ...
0
votes
0answers
35 views

MakeXYEventLayer_management input problems

I have a huge excel data base and want to make with the tool MakeXYEventLayer_management a new Layer for my coordinates in my table. I found this code on ArcGIS help: try: # Set the local variables ...
4
votes
1answer
37 views

How to toggle on/off number of inputs using ModelBuilder?

I am building a model to process between two and five files (the number of inputs changes depending on the scenario). I would like to have the option for the users to input up to five files, but ...
0
votes
2answers
129 views

Find duplicates in a field then update another field with a Y or N with Python (ArcGIS)

I am attempting to create a python script (ArcGIS 10.1) that will identify duplicated records within a points shapefile with a Y or N (possibility of over 5000 records). Similar to this: xyCombine | ...
0
votes
0answers
49 views

Training course for Fixing Data Sources

Is there any good training course or literature that pays some attention to automated processes for fixing map documents' data sources? Esri's little documentation on it is not helpful enough for me.
3
votes
2answers
223 views

Converting Date field to string using ArcGIS for Desktop?

I'm working with two data sets that require a compound key to join or relate. The two fields are: 'Node_ID' which is a long integer field referring to a particular electrical substation [887932] ...
0
votes
1answer
103 views

ArcPy Error - 'continue' not properly in loop [closed]

Is there a way to get the continue function to work? Here is my code:
0
votes
1answer
888 views

TypeError: 'NoneType' object is not iterable from Python Scripting for Geoprocessing Workflow exercise?

I am currently taking ESRI's Python Scripting for Geoprocessing Workflows. I have following their step by step however there seem to be a problem that I am getting an error. import arcpy #Set ...
2
votes
2answers
58 views

List File Geodatabase Topology

I'm trying to write a script that looks into a dataset and list all the elements in the dataset. The dataset comprises of Feature classes and FGDB Toppology. When I uses ListFeatureClasses, it outputs ...
1
vote
0answers
26 views

Is it possible to call a complicated query as a stored procedure within a geoprocessing service?

I need to implement a searching geoprocessing service. A part of the query should be very complicated and use oracle text. My service should support spatial search too. 1) I am thinking of ...
-1
votes
1answer
140 views

ValueError: Layer: Unexpected error from replaceDataSource()?

I'm trying to write a script that allows me to look through map documents and replace each layer's data source in each map document. Everything is working logically I believe, and all my loops are ...
0
votes
1answer
52 views

Layer still in map after running arcpy.mapping.RemoveLayer?

I'm trying to run a script that removes a group layer from a set of map documents, the code runs and the correct zone to be deleted prints out, However, when I check my map documents, the layer is ...
0
votes
1answer
163 views

AssertionError: Invalid MXD filename from arcpy.mapping.MapDocument()?

I'm trying to write a script that allows me to list the layers of each map document in a folder. However I keep getting this error after it displays the layers in the first map document: Traceback ...
0
votes
3answers
201 views

AttributeError: 'unicode' object has no attribute '_arc_object' from arcpy.mapping.ListLayers?

I'm trying to write a script that allows me to list .mxd files in a folder and then list the layers in each map document, however, I keep getting this error: Traceback (most recent call last): ...
0
votes
1answer
104 views

ArcPy saveACopy method saving copy of MXD to wrong path?

I have a script that looks through datasets in a geodatabase and copies a mxd document to a folder. The programs works, however it is saving the map documents to my desktop and not the specified ...
1
vote
1answer
48 views

Concatenating variable values in Python script for export DDP as mxd via saveACopy method?

i am building a script, most of which i found on here, that exports my data driven pages as mxds. I need it to save the mxd by a specific attribute in the shapefile and am running into an error when ...
0
votes
4answers
88 views

Python code executes but nothing happens [duplicate]

I'm trying to write a script that looks into a database and lists all the datasets that begin with zone. The script then enters into a for loop and copies a map into each on the datasets listed. The ...
2
votes
0answers
73 views

Arcpy script for summing pixel values in loop can't handle large number of rasters

I want to sum the pixel values of large numbers of rasters of different extents (ArcMap v10.2). 16GB RAM. I have the following code (with help from this site) which solves the different extent ...
0
votes
1answer
70 views

UpdateCursor stops after the first iteration

My arcpy script includes two updateCursor Objects. The first iteration of the "outer" coursor works fine, but the programm stops when it comes to the second iteration at updateRow(). Has somebody an ...
0
votes
0answers
69 views

Copy features to dataset in a loop

I'm trying to write script, that looks at the feature classes in a geodatabase and depending on what the feature class ends with, it creates a new dataset in the geodatabase and copies the file into ...
0
votes
0answers
16 views

ArcPy-generated string formats badly in map text element [duplicate]

I've got a script that's pulling a bunch of attributes and concatenating the information into a long string. text_description = "Address: {}\n\n".format(dictADDR[key]) text_description += "{} ...
2
votes
1answer
114 views

How to read X,Y from mouse click in Python

I am looking for some advice… I am trying to build a tool that will precisely (10digit, eg: AA1234512345) identify British National Grid (BNG) by clicking on a map. The ArcGis default tool can only ...
1
vote
1answer
81 views

Extent to xy coordinate- arcpy

I work with arcview 10.3, and i try to extent to xy coordinate with arcpy? I am using this code: import arcpy, os, sys from arcpy import env env.workspace = r"C:\Project" pnt = '178434 ,662446' ...
2
votes
1answer
99 views

FieldMap in Arcpy Merge for Selected Fields Only

I am trying to use FieldMap in arcpy to merge only a few of the same fields from 8 feature classes. There are many different fields in all of the different feature classes, but I have identified the 9 ...
1
vote
2answers
83 views

Arcpy wildcard to represent specific number of characters

I have a bunch of feature classes that are labeled in this pattern CL25_E6_5_4_3 CL266_E6_5_4 CL266_E6_5_4_2 CL4_E6_5 I want to make a list in ArcPy that contains all feature classes with the ...
1
vote
1answer
57 views

How to Compact geodatabases in multiple directories using ArcPy?

I am trying to write a script to walk through all folders in my workspace and find and compact all geodatabases in my workspace. I feel like I'm on the right track but I am stuck. import acrpy, os ...
0
votes
0answers
36 views

Create .lyr file from a raster and add to display

I'm working with rasters, there are 3 folder (input, query, result). In the input folder are the basic rasters. The user can choose between these rasters, the code can collect the rasters into the ...