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

adding layers in a standalone script

Has anyone successfully accomplished this? Seriously I’m not being sarcastic. What I presumed to be a very simple task has me flummoxed. Simply adding a featureclass as a layer to an mxd. All commands...

View Article


Geocode only one address in arcpy.

hello, i would know if existing a method in arcpy to geocode just one address. There is the function arcpy.GeocodeAddresses_geocoding but i want something not work with address table and not create a...

View Article


Require code to disable user selection query in tool dialog box

Hi, I have written some code for a tool in toolbox that selects a layer by attribute and location from user input. The code works fine when the user chooses (or changes) the fields and values in the...

View Article

Join multiple shapes in a workspace based on a common field

Hello all!! I’m completely stucked!!! I’m working with meteorological data (wind) but I have to arrange the data for a program to be able to process it. I have text files, two per day (one with the...

View Article

arcpy.AddField_management

What are the correct paramters for adding a BLOB field to a FGDB FeatureClass? No errors popup, but the field doesn't show up after it adds it with this code. Code: arcpy.AddField_management(outfc,...

View Article


Comparing Fields in gdb and shapefile, using Search Cursor List!

I need some guidance. I am writing a program to search in a field from a shapefile and search in a field in a gdb. I am looking for a value in the gdb that is equal to the value in the shapefile. For...

View Article

updateCursor: Raster Field

I couldn't find any immediate information on loading a raster field of a FGDB Feature Class. Didn't attempt to just issue it on an updateCursor yet as I wasn't sure if there are other methods. But this...

View Article

Using Python to Automate ModelBuilder Models

I have about 50 models built in ModelBuilder that I will need to make small edits to and then rerun. Instead of running them right after I've made the edits I would like to make the edits and then run...

View Article


Python Exception error

I am trying to repair a Python script that has thrown the error: <type 'exceptions.TypeError'>: exceptions must be classes, instances, or strings (deprecated), not unicode The part of the code it...

View Article


Image may be NSFW.
Clik here to view.

Syntax Error: Older Version of Python Causing Problems in IDLE?

Attempting to run a script with IDLE to fix some broken data links in an mxd. Keep getting this syntax error message, then IDLE highlights the "7" in red as seen in the pic: Attachment 23564 I think it...

View Article

Create point geometry in a feature class with all the attributes prepopulated

So here is the problem. I have a text file with space delimited values. A standard text file with the headings separated by spaces and then on each next line values for these headings (columns) also...

View Article

Use Field Calculator to create mailing address block

I have a table that has all the attributes of a feature broken out into individual fields. I would like to assemble the fields into a printable mailing label. Some of the fields may or may not have...

View Article

arcpy.mapping.AddLayer (SDE Feature Class)

When adding an ArcSDE Feature Class to an .mxd, it only shows the first 3 letters of the name in the TOC. Code:     arcpy.env.workspace =...

View Article


Label missing after joining layer to table

Hi The code below uses an expression to display 'PARCEL_SPI' labels. It works without the JOIN but I lose the label when the JOIN is applied. Any ideas? Code: import arcpy, os, sys # Import environment...

View Article

Image may be NSFW.
Clik here to view.

Problem with transfering toolbox from one computer to another

Hi, I've created a toolbox using model builder to automate a series of actions in ArcGIS 10.1. We now want to run it on another computer which has ArcGIS 10. However, when we add the toolbox to ArcMap,...

View Article


Create Symbols and set the Renderer with Python

Hi, using python is there a way to create symbol objects and set the uniqueValueRenderer with these symbols? Below is some C# ArcObjects code that creates 2 symbols and sets the renderer object with...

View Article

Python Script just stopped working..totally stumped

Hey everyone, I have a simple script pasted below that searches through a field containing numbers (the field is type double) in a feature class and returns what would be the next highest unused number...

View Article


Python 32 & 64 bit automation in scheduled task

I have a process that runs the 64-bit version of python as well as the 32-bit version. The processes run on a machine with both ArcGIS Server and ArcGIS Desktop installed. The 64-bit processes...

View Article

MakeXYEventLayer_management

Hi I have created a new layer using MakeXYEventLayer_management using python scripting. I want to make this newly created layer time enabled pragmatically. Is there any way to do it. thanks in advance...

View Article

Recursive Python Function

So I have no clue how to do this but I'm 99% positive it's possible...I think. I need to execute a function against every single feature in a feature class, but in a sequential and recursive manner. So...

View Article
Browsing all 2485 articles
Browse latest View live