0
votes
0answers
5 views

Use VB to calculate an area of a shape

I'm using Arcmap 10.1, running python 2.7 on a Windows 8.1 machine. I have a script that uses the arcpy.CalculateField_management function to calculate the area of a shape, however, for some reason ...
1
vote
0answers
31 views

Alternatives for ArcGIS Data Reviewer? [on hold]

What are some QA/QC tools that act similar to the Data Reviewer to point out and save mistakes? I want to know all alternatives, but mostly would want to run them in 10.1 and or using arcpy. I want ...
4
votes
2answers
62 views

Bulk convert DBF to CSV in a folder ArcGIS 10.1 using Python

I would like to convert 1000 dbf files to CSV. All dbf files are in one folder and they have sequential names (S:\output_tables\tcb1.dbf, S:\output_tables\tcb2.dbf, S:\output_tables\tcb3.dbf, up to ...
-1
votes
1answer
64 views

Maximum length of path using arcpy? [on hold]

I'm using ArcGIS 10.1. When I try to run the script it gives me this error message. ExecuteError: Failed to execute. Parameters are not valid. ERROR 000732: Input Data: Dataset 'Q:\Field Data\6th ...
6
votes
1answer
153 views

Is it possible to interrupt Select Layer By Location when first feature selected?

I´ve got a point feature class with some 7.000.000 points and I´m trying to check if any of these points is simply intersected by several polygon feature classes using 'for' loop and ...
3
votes
4answers
133 views

How to convert all values in all fields of table to upper case using ArcPy & Python?

Does anyone know how to use the .upper() in a stand alone python script so it can be used to change all characters in a table into UPPER case? I don't want to use the field calculator since I have ...
2
votes
0answers
21 views

Basic arcpy script with cursors running SLOW!

I've got 2 polygons layers (no gaps): IDUs and crops. What I want is to identify the 3 largest crops by % area for each IDU. This seems common enough but I couldn't find a way to do it all using ...
0
votes
2answers
36 views

How to add data to a newly created folder using arcpy?

I'm writing a script to create a new folder and then copy a feature class to a shapefile and add the shapefile in the new folder. The folder gets created but the script is failing on the feature class ...
1
vote
2answers
36 views

How to get/set label scale ranges (e.g. minScale) in ArcPy?

For a layer object lyr, one can programmatically set the minScale in arcpy as such: lyr.minScale = 150000 For a label, one can manually set the scale range within a dialog in ArcMap. In arcpy, is ...
2
votes
1answer
80 views

How to generate landmark-based route description using ArcPy?

I am now using ArcGIS 10.1 and currently a beginner in ArcPy. There is a project requiring to generate landmark-based route description. I am wondering how to use a buffer to find the landmarks in ...
2
votes
2answers
35 views

Why is arcpy.StackProfile_3d -> arcpy.SaveGraph_management creating empty graph?

In a python script I'm trying to save a graph to a .png file with graph output from arcpy.StackProfile_3d but the .png file shows an empty graph. The table created from arcpy.StackProfile_3d shows ...
0
votes
1answer
23 views

replace data source for all layers that point to shapefile

Hi I'm trying to do something quite simple but its not working. I want my python script to change all of the layers that point to the same datasource (a point shapefile) to another point shapefile. ...
0
votes
0answers
39 views

How to extract raster using corresponding polygon using ArcPy?

I have to perform a simple raster extraction, but I can't find the way to do it. In a polygon layer, I have watersheds with their ID's. And in a folder, I have rasters, each one corresponding to a ...
-2
votes
0answers
26 views

the functions In python

I work with ArcGIS 10.1 and I want to create a python script and I don't know with what I will replace these functions in ArcGIS 10.1: gp.SingleOutputMapAlgebra_sa() gp.Divide_sa() ...
2
votes
1answer
46 views

Conditional SQL Query

I've been running a code that searches a desired field in a feature class and performs an specified SQL query based on whether the field is string or double. The variables are just temporary fillers ...
2
votes
3answers
265 views

Adding a new field and calculating area using Python

Using Python, how do you add a new field to your shape file and calculate the area in km2?
0
votes
0answers
19 views

problem saving GRID to .img keeping original names (export by attributes)

I am really new in Python programming. I try to make a loop for Extract by Attributes tool in ArcGIS 10.1. I have a huge dataset of raster (760pc) and I want to extract a specific value. This part of ...
-1
votes
2answers
242 views

How to avoid ImportError: No module named arcpy causing Failed to execute (Script) error?

I have a proplem with arc hydro in arcpy,i want to create a simple script where automated some tools from archydro in arcpy.. I use arcmap 10.1 and python 1.7,my import is one dem and my export is a 6 ...
0
votes
1answer
69 views

Counting how many times a point goes through a loop and write the count to a text

I have a several feature classes that go through a loop to calculate points. I want to add up how many go through it each time so I can archive that number. I'm using ArcGIS 10.1. Lets say I have ...
7
votes
1answer
79 views

Handle annotation layers with arcpy

I want to access annotation layers using arcpy (the purpose is to verify few text strings in text annotations). By annotation I mean draw tool annotations, not dynamic labels. These annotation layers ...
0
votes
1answer
25 views

Using MakeFeatureLayer to select by location in arcpy

I'm trying to assign a state plane zone based on if a point intersects it. I make a feature layer from a feature class. It gets through the loop once and calculates everything correctly, but when it ...
0
votes
1answer
34 views

How to schedule a model to run at a certain time?

I'm trying to schedule a model to run at a certain time and have found this ESRI Blog post which is providing a good start. What I can't figure out though is where in the importToolbox function I tell ...
0
votes
1answer
45 views

automatic save outputs variables in the folder workspace using pyhon for arc map 10.1

I want to create python script with aim to import him in environment arcmap 10.1 and to make a hydrologic analysis because the scipt meybe can have many outputs raster file or feature class would ...
1
vote
1answer
44 views

When using arcpy can I only calculate fields of a subtype and not the entire feature class?

I'm appending two sepearte shapefiles into one feature class with different subtypes. Is there a way to only calculate fields from a certain subtype?
4
votes
1answer
101 views

Arcpy Pythonaddins Equivalent of arcpy.GetParameterAsText

I've build a neat little search arcpy script. The user opens any mxd, zooms to a location, chooses a corporate fGDB, and runs the tool. The user gets a list of all the populated feature class that ...
0
votes
1answer
47 views

Best Way to Get a List of Selected Rows for a Specific Layer using Layer Object in ArcGIS

What is the fastest/cleanest way to get a collection of rows that are selected in a certain layer? For some background, I am trying to hide selected features in a specified layer. The solution ...
1
vote
1answer
64 views

Arcpy scripts fail on big datasets - anyone has experienced similar behavior?

Here a question that is not extremely specific but maybe someone has had similar experiences... I have a few Arcpy scripts that work perfectly when used with small datasets but that silently fail ...
1
vote
0answers
21 views

What causes “RuntimeError: DataFrameObject: Error in setting extent”?

I'm having a problem whilst trying to set extent on a python script. mapDoc is created using Web_map_as_Json string. Appreciate if anyone can help. result = ...
2
votes
3answers
198 views

Calculate X and Y of line start and line end in Python? ArcGIS 10.1

I have a series of polyline shapefiles and I am trying to automate the process of calculating the X and Y coordinates of the line start and line end using Python. I have added the 4 fields (startx, ...
2
votes
1answer
133 views

Multiprocessing issues with ArcPy

I am using ArcGIS 'watershed' routine in a script which makes use of multiprocessing. This works fine, but during execution I get the message: Unable to remove directory. Possible causes: 1- Not ...
0
votes
0answers
17 views

Is it possible to scale an ArcGIS feature in a multipatch feature class using Arcpy?

I've imported a number of features in Python using the following method: - Import3DFiles_3d Unfortunately they are all extremely large so I would like to scale them using arcpy. I have seen that ...
2
votes
1answer
96 views

How to generate dynamic legend using ArcPy?

I used this example to produce printing service. As the result I get map with too many elements in the legend. Is it possible ti show classes that are visible in the current map extent using python ...
0
votes
0answers
26 views

Unable to Import 3D Files with real-world position

The following link identifies a method of importing one or more 3D models into a multipatch feature class. http://resources.arcgis.com/en/help/main/10.1/index.html#//00q900000097000000 Test Case I ...
1
vote
1answer
76 views

Multiply a raster list with a field value list in a FOR loop in ArcPy

I'm trying to create a simple map algebra calculation not managed by ModelBuilder, but writing it in Python is trickier than I thought. I have a list of raster in a GDB and I must multiply them by ...
2
votes
1answer
93 views

How to do a separate Python installation with ArcGIS?

I see a lot of threads asking how you can have a separate Python installation (e.g. the Anaconda or Python XY distribution) and get it to work with arcpy, while not 'breaking' ArcGIS at the same time. ...
2
votes
1answer
34 views

How to check how much of a line (percentage-wise) is covered by a polygon in arcpy?

I'm searching for an efficient way to check if a line is covered by a polygon (see image, this case should return 2x "true"). Right now I only check wether a line is within a buffer with ...
-1
votes
2answers
59 views

Export to PDF in python with parameters

I need to export to PDF with some parameters, and I went through the help and it only explains the data frame portion. When I need the entire map or layout view. Here is what I need: 1.400 dpi ...
0
votes
1answer
34 views

Add a field to output feature of a geoprocessing tool?

I am running the Watershed tool and RasterToPolygon tool in a loop for a number of points: flowdir = "flow.tif" flowacc = "flowacc.tif" pnts = [arcpy.PointGeometry(arcpy.Point(x=0.0, y=0.0, ID = ...
2
votes
3answers
80 views

Create in memory polygon with RasterToPolygon

I need to create a number of polygons in a loop from a raster. Essentially, the loop will call a function a number of times which needs to convert it to a polygon: def myfunc(raster): #do some ...
0
votes
1answer
140 views

What might cause “python.exe has stopped working” when closing ArcPy script?

I created a script that take a .tab file and join it to a shapefile. The script works perfectly but when it finish, it gives me an unhandled exception which crashes python. I dont know what might be ...
1
vote
1answer
60 views

ListRasters not recognizing raster files in python

I have 2 rasters in my workspace, one in TIFF Format and the other in GRID format: "C:\ExampleFolder" When I use the python script: import arcpy >>> ...
0
votes
1answer
49 views

Listing Printer names in a Python Toolbox in Arcgis 10.1?

Here's my code for my third parameter in my Python Toolbox. When I run the toolbox and look at the list of printers, it only shows one of them. My print command of 'printerName' lists all of them in ...
0
votes
1answer
42 views

Topo To Raster executing but not creating the raster

I am using Topo to Raster by File (ArcGIS version 10.1) via arcpy on a large stream and point dataset. Arcpy runs fine and executes without issuing any error message, however it does not create the ...
1
vote
0answers
45 views

how to open a layer's table in a map document

Trying to create a map document programmatically. Added a featureclass as a layer. When I open the map document in ArcMap, I want the table for that layer to be open. Found TableView (doc) and ...
1
vote
0answers
113 views

How to utilize GPSQLExpression data type in Python Toolbox

I am trying to write my first Python Toolbox for ArcGIS (neat stuff by the way). The tool is simple enough - it connects to SQL Server and downloads data for the user. The trick here is, I want the ...
-2
votes
4answers
118 views

How to Calculate Field to six digit number from another field concatenated with State Plane code in ArcPy? [closed]

I'm trying to calculate a field (Unique_ID) in arcpy that will bring in a six digit number from another field (Point_ID) in the table. I want to add the state plane code to the end of the Point_ID ...
2
votes
1answer
132 views

How to build SQL Expressions in ArcGIS 10.1 Python script tool dialog?

I've made a python tool that requires the user to establish which state to select within an input's table (the "Prepared Footprint"). However, once the user drops in the layer and tries to write the ...
0
votes
1answer
71 views

How to use InsertCursor to add points to a point feature class?

I am struggling with a very simple task of inserting "SHAPE@XY" into a point feature class. Following is what I have: xy = [(361087.15436001675, 198747.07296730898), (361530.56426259346, ...
2
votes
1answer
61 views

*.lyr to *.style conversion in ArcGIS

Do you know how it's possible to convert a layer symbology or an *.Lyr file to an *.style file? Thanks, Jérôme
4
votes
1answer
179 views

Finding duplicate records in a field via Python in field calculator

im looking for duplicate records in dbf files based upon the attribute called 'ID'. I have various dbf files from 500,000 records to 1.5 million and I know there are a host of duplicates. I would ...