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

learn more… | top users | synonyms (8)

1
vote
0answers
24 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
41 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
50 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
68 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
1answer
42 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 (non-...
2
votes
1answer
63 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 ...
1
vote
0answers
24 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
34 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
26 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 point,...
4
votes
1answer
83 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
89 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
74 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
38 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
34 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 = arcpy.mapping.MapDocument("...
0
votes
0answers
27 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
64 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
29 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
36 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
32 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 = r"G:\...
1
vote
1answer
51 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
74 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
58 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
78 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
50 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
119 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 paths....
2
votes
1answer
31 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
99 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
38 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
28 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
104 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
57 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
19 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
40 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
85 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
30 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
58 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 arcpy.env....
1
vote
0answers
24 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
55 views

Creating multi-value choice list of field values and using selected for select in ArcPy?

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
32 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
37 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 me:...
1
vote
1answer
65 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 ...
4
votes
1answer
53 views

ARCGIS Calculate Value Tool - Always returns same value

I want to check if an environmental shapefile was generated from a previous process. I utilized the Calculate Value tool in Modelbuilder but the problem is that no matter if this Wetlands layer ...
4
votes
1answer
46 views

Arcpy Copy_management does not copy all records

I need some help with a python script that is copying a shapefile to a new folder location. I am using ArcGIS 10.3. I have a shapefile of imagery tile outlines that contains 17425 polygons. I need to ...
1
vote
0answers
34 views

How to use arpy.mapping to change 'out jpeg' name to reflect page name

I am an experienced Arc user but new to python. I can not figure out where my syntax is wrong. I'm trying to use data driven pages to export to jpeg where the name of the file is the page name. It ...
1
vote
2answers
40 views

arcpy won't return correct data types of layers

I wrote this so that arcpy would give me the data types for each of the layers in a map document. But, "Feature Layer" is the only type of data that is returned (apart from "N/A"). Shapefiles are ...
2
votes
1answer
47 views

How to make arcpy to iterate through folders & sub-folders to access gdb's? [closed]

With reference to Check whether any feature classes in multiple gdb's has feature class representation, the code I've mentioned in the other thread is working great for single folder alone. We ...
1
vote
0answers
24 views

drop list from field to excute SQL request

i'm new to Python programming and now I try to create a python script that allows a selection attribute based on the name of a field in the attribute table of a layer and I would like to configure my ...
1
vote
0answers
23 views

Check whether any feature classes in multiple gdb's has feature class representation

I am trying to find whether any feature classes in multiple gdb's has Feature class representation. If a feature class has represenation, "RuleID" & "override" fields will be in the attribute ...
0
votes
1answer
43 views

arcpy.Erase_analysis function and output

I have attached my code (Python). I am trying to loop trough each FC in same file GDB and subtract a FC from remaining FCs not equal to input FC. Then want to create/generate FC from erased result ...
1
vote
0answers
44 views

Can't specify OID field in arcpy.MakeQueryLayer_management

I manage a library of query layers and have recently had the need to apply the same update to a bunch of them at once. Seems the only way to do that in python is to create new ones and apply ...