Quantcast
Channel: Forums - Python
Browsing all 2485 articles
Browse latest View live
↧

ArcPy Select / ZoomTo/ the attribute records and write to text the Map Scale

Hello Group, I am trying to use ArcPy to extract the individual mxd map scale (the data frame scale of the map after selecting a record and using the "ZoomTo" function) of each record in a feature...

View Article


Problem Removing Join with 32 bit Python 2.7

To All Python Programmers: I had a python script to update a feature class in a personal geodatabase using a join to a table view which works fine at 10.0 with Python 2.6. I am now trying to run this...

View Article


Adding a variable and loop

I am python beginner! I need to select a specific polygon (one grid of our locator sheets) then select and clip all the storm main on that sheet and sum the total length of those mains. I created the...

View Article

Text Element Questions

So I've got my text element function working in layout view, but it leaves me with two questions. Can multiple rows be concatenated into the row.getValue or can it only find single fields? Also, is it...

View Article

Search for Images using Python (Spatial Extent)

I'm looking to replicate what ESRI has developed as part of their search functionality within ArcMap and ArcCatalog. I would like to be able to use the capabilities of the Search functionality within a...

View Article


ArcGIS 10.2: Desktop Background Geoprocessing (64 bit)

I've installed ArcGIS 10.2 and realised ArcGIS 10.2 still requires a separate installation of Desktop Background Geoprocessing (64 bit) but I've not been able to find a 10.2 installation of "Desktop...

View Article

Help - exporting data frame (not page layout) to PNG via arcpy

Good morning all I'm trying to pull together some code to export the data view (not the page layout view) to PNG. The issue I'm having is that when I use the df variable in the ExportToPNG function, I...

View Article

Where to create the function that can be called from several tools?

I created a python toolbox with a bunch of tools. I have to create a list and a dictionary (very long) for almost all the tools - The list and dictionary have the same elements for all the tools that...

View Article


Select by location not working on in_memory layer

A coworker of my produced a great model and asked me to convert it to Python for him. The python script is failing at the same point each time I try to use it. It is unable to run the following...

View Article


Can't import Arcpy in 10.2

What do I need to do be able to import Arcpy after upgrading to 10.2? Code: >>> import arcpy Traceback (most recent call last):   File "<interactive input>", line 1, in <module>...

View Article

Return File Size of feature classes and feature datasets

Hi All, I have a colleague who asked if it is possible to write a script to return the file size of feature classes and feature datasets, so that she can determine storage requirements. Python is the...

View Article

Join field in feature class to field MS Access table 2007 format

Hi, I am trying to join fields from a feature class in geodatabase to a field in MS Access database. This statement used to work fine for 2003 format of ms access but for 2007 format it gives an error...

View Article

Image may be NSFW.
Clik here to view.

Python Add-in does not work properly after Table of Contents use.

Whenever I have any interaction with the Table of Contents in ArcMAP 10.1, ArcGIS 10.1 SP1 for Desktop my Python Add-in (see included code) does not work properly. Items in the Table of Contents appear...

View Article


Setting the Default database

I'm trying to set the default database on a directory of mxd files. I'm looping through each mxd and setting various parameters, one of which needs to be the default database (file geodatabase) that...

View Article

Image may be NSFW.
Clik here to view.

Bugs in script to populate an empty attribute field

Here is a copy of my script. Attachment 26766 I am attempting to populate a blank field (Veg_Height) in my shapefile attribute table with text of my own choosing depending on the value in field...

View Article


TexElementObject: Error in setting text

I'm trying to write a script to update a TextElement object in a batch of MXDs. (I know there's a similar discussion going on right now but I didn't see anything relevant to my issue.) So far I've been...

View Article

Programmatically Set Colors for Unique Values Symbology?

I have Python code that iterates through about 100 value fields and makes a single PDF composed of maps from each display. I am using Unique Values Symbology, and I would like to figure out a way to...

View Article


nodata option in CopyRaster

I'm working with a NETCDF file and am running the following code and the nodata option of the CopyRaster command doesn't appear to be working as I expect. The CopyRaster successfully creates the raster...

View Article

import arcpy fails with cgi script

Hello, I'm looking to get this simple map export to run via an url and am running into issues when importing arcpy. It runs fine locally, but gives a 502-webserver recieved and invalid response while...

View Article

insertRow into SQL server

I would like to insert an multidimensional array of points into a dataset stored in a SQL Server. Do you guys have a sample code showing how to connect and insertRow? thanks Alex

View Article
Browsing all 2485 articles
Browse latest View live