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

Stop loop when empty feature class is generated.

I am trying to stop the script below once an empty feature class is generated. I have worked out the following which I imagine to be close? But still receive an error: ExecuteError: ERROR 010151: No...

View Article


Python Help For Beginner

Hi folks, Another python question for the forum, this one should be easy. I am trying to complete the following exercise and am stumped with the last section. I am asked to print only the items in the...

View Article


Array multiband processing with numpy

Hello, My problem is about processing of multibands rasters using numpy. For example in the case when you have a lets say 10 bands raster, I would like to have an algorithm that would tell me if,...

View Article

Find feature class

Hello, I work on SDE data bases. I would list all the entities classes ending in "_OLD". However in my database SDE I've feature classes and datasets entities. I would like the script gives a complete...

View Article

error: 9999999 the field is not nullable

Hello everyone, I have this python stand alone script wich is runing fine until gets to this part. Code: if gp.Exists(lcp_name+".shp") == 0:         gp.CostPath_sa("samp_lyr", cd_name, bl_name,...

View Article


Python Script in Model Builder

I have a model builder that creates a MobileCache (using the Mobile Tool) and a python script that empties the MobileCache folder. I want the script to run first, then the Mobile Tool, but I can't seem...

View Article

Script to Combine Commands

Ok, not sure if I can even do this in Python or if I have to find another method (like Macros which I do not know how to program in ARC). I have a linear referencing system of roads that I am...

View Article

Enable "Support Hyperlinks" with Python

Greeting, I've got about 200 Point featureclasses that I am bringing into ArcMap and symbolizing in Python. As I bring in the feature classes, I'd also like to support Hyperlinks and identify the field...

View Article


building a string from mp3 meta data

'm trying to write a program to get the artist and album from mp3 meta data. To do a test run I had my python program to build a simple 30 character string one byte at a time starting 125 bytes in from...

View Article


Event Logs

Is it possible to write to the Windows event log via Python? I am writing to a log file currently but the preferred logging in our systems is via the event logs. Cheers Mark

View Article

Copy attribute values from one table to another, in a loop

I am trying to copy the attribute values from one table to another, inside a loop. I am looping through one table and inside that loop I want to copy the attribute values to another table. I have...

View Article

Field Calculator Inserts a "u" In My Function

Sometimes when I'm using a Codeblock in Field Calculator, I get an ERROR 000539 which shows something like this: function_name(u"fieldvalue") However, that "u" isn't in the Codeblock OR the regular...

View Article

Not all data being written to Notepad

Hi, I am on my 4th day of using Python and making a lot of progress. I am looping through a feature class and writing field data to a textfile in notepad. I am writing 4 fields per line, when I get in...

View Article


Extra rows when a .csv file is opened in Excel.

Hi, I am on my 4th day of using Python and making a lot of progress. I am looping through a feature class and writing field data to a .csv file. It all runs good. The issue is when I open the .csv file...

View Article

UpdateLayer Not Showing Changes in TOC or ActiveView

Greetings, I've been wrestling with this for most of the day and am flummoxed! I am going through a "For Loop" adding 5 (ultimately will be ~150 after testing) feature classes in a Feature Dataset...

View Article


Graphics to feature

Hello, I want to perform clip analysis where the input and clip features can be a graphic layer. Is there a way to do it? If not, is it possible to convert the graphics to features using arcpy? Thanks,...

View Article

Refresh default values in GPValue table parameter in Python toolbox

I am working in ArcGIS 10.1 SP 1 on Windows Server 2008 R2 Enterprise. I created a python toolbox that is opened from a python addin and displays records from a feature class in a value table. It...

View Article


Convert Arcpy results to feature class in ArcMap 10.1

I am using ArcGIS 10.1 and am a newbie in Python. Currently we are executing stored procedure (from sql server) through ArcPy in ArcMap. I want to create feature class from executing following python...

View Article

Image may be NSFW.
Clik here to view.

ListStyleItems function is missing from mapping

I'm trying to apply a legend style from a .style file to an existing legend in my map document. When calling the ListStyleItems function to select the .style file (as per:...

View Article

Stand-alone .py question

I would like this script to run independently so one of my AutoCAD users that needs a shapefile can just double click on it to update their files, they have GIS installed. This is not working for me do...

View Article
Browsing all 2485 articles
Browse latest View live