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

learn more… | top users | synonyms (7)

3
votes
0answers
51 views

Time Delay in Importing ArcPy

I've got a few on demand scripts via the web that run ArcGIS in the background via Arcpy. Now, every one of these scripts takes a solid 15-30 seconds to run, which I find okay. After doing some trial ...
0
votes
1answer
18 views

Arcpy TabletoExcel input error

I have a very big dataset in a gbd. I would like to export it to an excel file. I use the following code: startingP = r"C:\Directory\ArcGIS\By_Coding.gdb\MyInput" endingP = ...
3
votes
1answer
56 views

How to use search cursor in a given extent

I want to perform a selective search cursor for a feature class for a given extent. I have tried setting env.extent in the below code but it is returning the whole feature class instead of a fixed ...
-1
votes
1answer
35 views

How to aggregate a list of raster in Composite Bands arcgis

I created a list of raster using ListRaster. However, composite band tool does not support list input. I want aggregate the list of raster into one raster, is there any other tool to do it in ...
1
vote
0answers
24 views

Can a map be added to a report generated through ExportReport using Python?

I am currently able to generate a PDF report using arcpy's ExportReport that contains attribute information for records within an attribute table, but is there a way to add a map to that report, as ...
1
vote
0answers
35 views

Arcpy ApplySymbologyFromLayer color problems with extent

I am batch automating PDF maps with many overlapping layers and many different symbology colors. When the map is zoomed far out- two of the layers, lets call it line1 (the only blue layer) and line2 ...
1
vote
2answers
58 views

Python script to check if feature class exists in geodatabase if not convert feature class to feature class

I would like to check in one geodatabase and list the feature classes that are in it; check another geodatabsae for the list of feature classes, if they do not exist in the 2nd geodatabase then ...
1
vote
0answers
18 views

Creating a new field based on another field and proximity to another shapefile? [closed]

I have a shapefile (sf1) with speed and another shapefile (sf2) with road locations. I'm trying to create a new field in sf1 that denotes commuting, so a binary 0=not commuting;1=commuting. I created ...
1
vote
1answer
43 views

How to add a script tool in a toolbox without the Add Script Wizard?

I have been put on a project where I need to modify and optimize an existing PythonToolbox and associated Toolbar (each button calls a script). I want to add a new script tool in there but the Add ...
1
vote
0answers
23 views

How to cut polygons to fit grid ArcGIS 10.3

I have a map that displays the distribution of different types of karst all over the US. The different types of soil are portrayed through polygons. I've also created a grid that divides the US, and ...
2
votes
1answer
36 views

Change which default python install runs .py scripts a the command prompt

I have 3 installations of python on my machine currently, the ArcGIS install, the QGIS install, and an Anaconda install. The Anaconda is the on that I use predominantly. If I run a .py script ...
4
votes
1answer
46 views

Change entire label style after certain extent

I need to design a dynamic label in ArcMap that changes its entire style after a certain zoom extent. The research I've done suggests to me that there is currently no way to use VBscript to manipulate ...
2
votes
1answer
67 views

Implementing UpdateCursor?

I previously asked Updating attribute information about this script last week. I have amended it and am confused. I need to write the ADMINAREA value to the empty LOCALITY fields from TWB_Suburbs to ...
3
votes
0answers
30 views

Defining a required output field parameter for an existing or a new field

I need to define a required field parameter, and I'd like it to work with both existing and new fields, i.e. regardless of whether the field already exists. The problem is, if I enter a new ...
2
votes
1answer
44 views

Python script hanging forever in Pycharm with import arcpy?

I'm trying to get arcpy to work in Pycharm. I've done this successfully in the past. However, now when I try to do anything involving arcpy in Pycharm, the program runs then hangs forever. I have it ...
2
votes
0answers
23 views

Creating new feature class in ArcPy gives error 000210? [closed]

I am trying to create a new attribute table and I keep getting the same error. import os import arcpy import math folderpath = 'C:\Users\Michaelf\Desktop\GEOG M173' arcpy.env.workspace = folderpath ...
1
vote
1answer
28 views

Populating Fields in Table with GUIDs from Feature Class?

Is there a way to add GUIDs from a feature class to a table based on specific attributes? I have a large maintenance record table that is tied to specific points through the GUID of that point. I have ...
1
vote
1answer
24 views

Correlating 3 data sets and extracting information from each in ArcGIS for Desktop?

I am currently trying to find a way to correlate 3 separate datasets as point shapefiles. I would like to import all three shapefiles, and apply a 5 metre buffer to each point. Then, for each ...
3
votes
1answer
57 views

Error when using arcpy.ArcSDESQLExecute() to connect to SQL Server - ArcGIS 10.4

I am able to connect to a MS SQL Server 2012 geodatabase with the arcpy.ArcSDESQLExecute() when using the .sde connection file pre-created in ArcGIS. I am not able to connect to a MS SQL Server 2012 ...
5
votes
2answers
72 views

How to export an mxd using python without opening it?

I would like to be able to update a load of pdf and jgeg maps once the data has been updated. Currently people have to open each mxd and export the map in each format. I've written a short python ...
4
votes
1answer
68 views

How to get fieldnames in a value table depending on the input value

I would like to add a parameter as value table with one of the fields being a value list. The value table consist of 3 columns, namely "table","field","description", whereas "field" is a value list. ...
0
votes
1answer
37 views

after to make join between 2 tables a field is not recognize [closed]

I made join between two attribute tables with a common field and then I tried to use python to read a field and now field is not recognized on the new table.. Is it normal? How can I solve this ...
1
vote
1answer
32 views

How can I test if a layer is using SDE

I find that when things are not working as they should repairing the geometry on everything is a good first point of troubleshooting so I run a few lines of python: mxd = ...
0
votes
0answers
22 views

Invoking-command in powershell 2012 (remotely) for ArcPy errors but local cmd or python shell work

I've written a data update script that works really well, it deletes a target feature class and uses the feature class to feature class geoprocessing tool to copy data from SQL 2012 into it's ...
1
vote
1answer
52 views

Arcpy update cursor: stop iteration error

I have 1 csv with municipalities and their corresponding zip codes and a GDB of houses which contain address, municipality but no zip codes Objective: add the zip codes to the GDB table import csv ...
3
votes
1answer
27 views

TypeError in Script Tool [closed]

I am currently recieving this error: TypeError: unsupported operand type(s) for -: 'float' and 'NoneType' arcgis for line 22: invert_out = updateToRow[2] Could anyone explain why this is happening? ...
2
votes
1answer
35 views

Tabulate Area produces weird results

I have a raster of land cover (resolution roughly 300x300 m) and a raster grid of zones (cells about 14000x14000 m). What I need is to calculate the precentage of each land cover category within each ...
-3
votes
1answer
30 views

Insert layer using Arcpy- Code error [closed]

I'm trying to add "roads" layer to all the maps that do not have this layer in the table of content, by using this code: import arcpy,os,sys,fnmatch from arcpy import env env.workspace = ...
1
vote
1answer
42 views

Deleting features with arcpy on ArcGis SDE 10.0 SP5

I am new to ArcGIS and arcpy and am learning largely through trial and error. Anyway, the overall task is to delete, edit and add rows to feature classes. I thought it would be good to start with ...
2
votes
1answer
71 views

How to add my own algorithms to ArcGIS toolbox [closed]

I want to implement and test some algorithms for line generalization tool in ArcGIS software by Python programming, but I do not have any access to its tool bar script. My question is, how can I add ...
1
vote
2answers
56 views

How to insert layer excluding MXD files using arcpy?

I'm working on 24 MXD files. Several maps include "roads" layer in them, the other maps don't have this layer. I'm trying to add "roads" layer to all the maps that do not have this layer by using this ...
3
votes
1answer
76 views

Updating attribute information

I need to write a script that updates the "LOCALITY" field in a feature class if it is empty with the suburb it is in. I have identified the number of properties with select by location and the ...
3
votes
2answers
43 views

ArcGIS Script Tool RuntimeError: cannot open 'GPL0'

I Cannot find what this error means or what could be causing it? Script worked until I added the lines under "Set map label to containing quad name". My environment is ArcGIS 10.1 SP1, Windows 7. Here ...
1
vote
2answers
104 views

Python Script to iterate through folder and copy all feature classes in MXDs to new file geodatabases?

I have a folder and would like to iterate through each MXD and take each SDE feature class that is in it and place in a new folder and file geodatabase, with a new MXD using the file geodatabase ...
2
votes
1answer
29 views

Script Tool Automation of Search and Update Cursor?

I keep recieving the following error: RuntimeError: An invalid SQL statement was used. [SELECT [ID_NUMBER,COLLECTION,COLLECTED_,COLLECTI_1], OBJECTID FROM OFFICIAL_STRUCTURES2015] import arcpy as ...
3
votes
1answer
89 views

Calculate Field using variable in arcpy

I've got a problem with my script and hope that someone can help me. What I´d like to do is using the field calculator to calculate values for a field using values from another field and a variable ...
2
votes
1answer
34 views

How to add “Edit with Pyscripter” back to the Windows context menu?

Using Windows 10 64 Bit, ArcGIS for Desktop Advanced, ArcGIS Pro 1.2 I use PyScripter pretty extensively, and after I installed ArcGIS Pro (which installs Python 3), I noticed that I can no longer ...
1
vote
1answer
26 views

Arcpy: Insert a text if filed is empty

I want to run a python code that, if 4 fields are empty, insert in the first of them a text. The fields are all designed to contain text. My code is: import arcpy import xlrd import numpy import ...
4
votes
0answers
96 views

Error after successful ArcGIS PrintTask

Using ArcGIS Javsacript API on one server to grab a PDF from a custom print service published on a different server. We have used the exact same script successfully on other apps/servers before with ...
0
votes
1answer
53 views

Using InsertCursor and SearchCursor with Nested Loops

I have a script that's parsing through text within each record of a table/field, and inserting those values into field/records of another table. Here's an example of the text being parsed (from ...
0
votes
0answers
18 views

aggregate Grouplayer to one result in arcpy same as Identify result

how can I merge the Grouplayer into one result same as Identify result in arcpy? My grouplayer has multiple featurelayer with different geometry types. What is the best method for doing this? ...
1
vote
1answer
39 views

Determine data format from file names

I was given the data which is arranged in folders as shown in the following picture I am using ArcGIS 10.1. I believe feature dataset in ArcGIS only exist in geodatabase. But the datasets are ...
3
votes
1answer
74 views

Distance between points along polyline ArcGIS for Desktop (pt. 2)?

I read over the solution in Distance between points along polyline ArcGIS for Desktop? and I have a slight variation of that problem: I need to find the distance of each red point (transformers) from ...
2
votes
0answers
22 views

Creating a Legend with arcpy and comtypes

I am relatively new working with python and arcobjects. Under normal limitations I know that you cannot create a Legend or any arcobject with arcpy.mapping. Is there a generic example of creating a ...
1
vote
1answer
56 views

Create points along selected line using arcpy

How to make this script take a list of distances along a selected line and create a point featureclass with points at these distances? import arcpy from arcpy import env import os ...
1
vote
0answers
22 views

Model Builder: Iterating files; Don't know what to make “input” in later tool

I have a simple model where I am trying to iterate through a year of daily tif's and recode everything in them as either snow covered ground or not snow. My problem is I have no clue what to put ...
1
vote
1answer
33 views

Create a multi-value choice list of field values and use the selected for a select

I have created a multi-value choice list following this blogpost: https://blogs.esri.com/esri/arcgis/2012/07/16/generating-a-multivalue-choice-list/ I changed the validation code to my needs but now ...
0
votes
0answers
30 views

Working with subtype in feature class using ArcPy?

I am working on an arcpy script that I can query a subtype of this feature class that links to another subtype of another feature class. The snapshot shows there is a hydrant (subtype 1) locates on ...
-4
votes
1answer
35 views

Publishing multiple mxd in one go [closed]

I tried to write a python code to publishing multiple mxd in one go, but it seems that not working with me. I experience is a little bit. what might the wrong in my code and why it wasn't work with ...
1
vote
1answer
60 views

Arcpy store field value as variable

I am trying to write a script that will go through a grid layer that has individual 535 grid squares. I want to find a way that will tell me how much gas main is left to be checked in each grid. Any ...