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

learn more… | top users | synonyms (1)

0
votes
2answers
51 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
215 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
66 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
21 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
59 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
214 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
39 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
56 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
53 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
37 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
28 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
47 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
44 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
96 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
74 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
37 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 ...
1
vote
2answers
55 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
58 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
55 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
25 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 ...
3
votes
0answers
24 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
79 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
44 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
84 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
60 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
265 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
1answer
44 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 ...
0
votes
0answers
16 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
86 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
35 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
61 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
52 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
55 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
33 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
77 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
50 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
67 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
58 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
15 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
98 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
48 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
58 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
51 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
43 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
29 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 ...
1
vote
1answer
17 views

The updateCursor doesn't update all the cells in the shp, just some of them

Dont know for sure what is happening, but when i use arcpy.UpdateCursor it only write some of the lines not all the lines. The code is: cursor = arcpy.UpdateCursor("FInal1a1.shp") for row in cursor: ...
1
vote
0answers
19 views

The 3D polygon generated by skyline in arcgis has no Z value

I used the skyline tool to generate the skyline in a certain scenario, when the visible angle is less than 120°, the skyline is right, as the pic below: When the visible angle is bigger than 120, ...
2
votes
2answers
72 views

Select Layer By Attribute to be used in for loop

I'm trying to iterate through a feature class and select each feature one by one by using the OBJECTID field. When I use a single value, the SelectLayerByAttribute works, but how do I compare the ...
0
votes
2answers
77 views

User interaction with Python tool midway through script running? [duplicate]

I need to design a Python script that will take a CSV input, search for a matching polygon in our SDE data for each line, and then extract certain information about data that intersects with the ...
0
votes
1answer
41 views

Publish geoprocessing service on ArcGIS for Server?

I am following the instructions described here and I have some enquiries about publishing a GP service. First of all, how should I publish a GP service on a production environment where the database ...