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

SDE data sources help

I was wondering if someone could help me with something. This is probably an easy fix, but I do not have SDE nor have ever used it so I am unable to test for SDE data sources. A friend of mine asked me...

View Article


Using arcpy.Describe Method on Annotation layers

I'm testing layers in the current document using the Code: Describe function. My code is: Code: for lyr in arcpy.mapping.ListLayers(df):     if(lyr.isGroupLayer == False and lyr.isRasterLayer ==...

View Article


Find Added or Deleted Records between two files

I'm comparing two shapfiles and need to find all records that were added to or deleted from the new file. I then want to create two new shapefiles and write the records that were added to one of those...

View Article

arcpy.CalculateField_management) is not passing variable

Running as python script within toolbox in ArcGIS 10.1. Trying to say that if file is empty, populate the fields "TypeName","PERCENTAGE", "Region" with the following values: nameVariable, 0, "Georgia",...

View Article

GetCount_management coding issue

This python code I thought was stating that if projectFile was a polygon and had more than one polygon, dissolve it and make the zoneFile equal to the dissolve file. Otherwise, make the zoneFile equal...

View Article


using modules

I have a python script that I call from a custom control in ArcMap. This script (x.py) contains a number of functions and is the main script I run. I have another script (y.py) that I call from another...

View Article

Real time data displaying on every second

Hi Is there any way to display data on a map layer dynamically on every second. Actually I have a cvs file contains xy position with time information and I want to display thes point from file on map...

View Article

gmreader - a script for listening to your latest emails [completed script]

I made this so I could listen to my gmail messages form the command-line. If you find a bug or issue in the code, feel free to start a github:issue or make a pull request Project:...

View Article


field calculator python expression with parameters

Hi, I am trying to concatonate an existing field with a parameter in a python script parameter = 4 expression = !field! + ", " + parameter arcpy.management.CalculateField("testshp", "field",...

View Article


Using String Methods on a String Parameter Value in ToolValidator

I am having trouble using string methods on a value object that is for a multivalue string parameter. For example, the following doesn't work because the value object doesn't support string methods:...

View Article

NumpyArray to Raster

Hi, I'm trying to convert a Feature Class with attribute fields of X, Y and a Level (effectively Z) to an array and then to a raster for further processing. The conversion to an array works using the...

View Article

Spatial Analyst Kriging Defaults?

I am attempting to replicate the default settings of Kriging Interpolation that is performed in the Spatial Analyst Toolbox. That is, if I were to accept all the defaults per the tool, what would my...

View Article

Underlying DBMS error [ORA-01002: fetch out of sequence] -- consistently...

I have a series of python scripts linked to tools in ArcToolbox. (still running 10.0 at the moment, though plan to upgrade in the near future) Without going into great detail, 2 or 3 of these scripts...

View Article


Running a for loop over an empty cursor

ArcStandard 10.1 I have the following snippet in my script (with an intentionally empty cursor via where-clause): Code: 271    rows = arcpy.da.SearchCursor(fc, Fields, "1=2") 272...

View Article

Creating new Mosaic dataset from python

When I invoke a python script running on redhat, I get ERROR 000732 "Output Location: Dataset Database Connections/myoracleserver.mydomain.com does not exists or is not supported. But when I run that...

View Article


Changing from landscape to portrait orientation in ReportLab.

For all of those who may use Reportlab, I have a newbie question (should be simple to answer) that has been bugging me for the past day or so and after pouring over all online posts related to...

View Article

Shell function in Access to execute Python having Quote problems

Hi, Member 'curtvprice' suggested putting triple double quotes around the second line below in order the SQL in a Python ARCGIS to work. It works great thanks Curt, but I need to acheive the same...

View Article


Image may be NSFW.
Clik here to view.

Build a query string in Python

Hi, I am trying to write a small Python script to build a query string so ArcGIS can use it to select data by attribute. In this script it first reads a text file (attachments) with 5 lot/plan details...

View Article

add attributes to newly created shapefile from existing shapefile using arcpy

I have a paretn layer with multiple table entries and want to select first row and paste it into another (target layer) table. Parent table will change after each run of geoprocessing and I want to get...

View Article

combine arcpy.GetMessages with arcpy.AddWarning in cust modules in a Python...

Hello, I've created a Python Toolbox that imports a function from a custom module to do most the work. So, in my toolbox.pyt file I have: Code: def execute(self, parameters, messages):     """The...

View Article
Browsing all 2485 articles
Browse latest View live