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

Oracle to GDB table copy (using a where clause to limit rows)

I am having difficulty finding a way that will copy a subset of rows from a table stored in Oracle to a GDB. Here is an example: Source table contains the following fields - "SCHEDULE_TIME", "ADDRESS",...

View Article


Help with creating geostat layer in python

I'm trying to loop through feature classes and create a geostatistical layer and then convert the geo layer to points. I've attempted to debug this problem myself, but would appreciate extra eyes on my...

View Article


Trying to combine 3 variables to export data driven page by page name

I am trying to write a Python script so the user can export a PDF map from an MXD using data driven pages without the user having to open the MXD and scroll through all the data driven pages to find...

View Article

Possible to run a model and have time slider pop up automatically??

I'm building a model and I want a time slider to pop-up automatically for a layer. Is there anyway to call the time slider from model builder? I found this article:...

View Article

Setting Field Visibility

Anyone know how to make fields in a Feature Layer visible or hidden? Tried using the Field Info object, no luck there... Code: desc = arcpy.Describe("FeatureLayer") field_info = desc.fieldInfo...

View Article


Python tool generates an error only inside IDE

All, I'm getting a warning in Aptana writing my python code, but the script will run. Here's my script (text in red is error / warning): Code: import arcpy...

View Article

checkbox as parameter in Python toolbox

How do I create a checkbox as an input parameter in a .pyt? I want to control tool output based on which options the user selects at run time. I tried adding a parameter of type GPBoolean but no...

View Article

Building a Tool with Python Examples

Part A Code: import arcpy, os, sys, string try: Ā  Ā  inData = arcpy.GetParameterAsText(0) Ā  Ā  outData = arcpy.GetParameterAsText(1) Ā  Ā  bufferDistance = arcpy.GetParameterAsText(2) # Run the Buffer tool...

View Article


AddLayer and .txt files

I just got handed 30 comma delimited txt files from someone's old GPS unit and asked if I could put them on a map for their report due tomorrow. Sure, I could plow through these files one at a time,...

View Article


Image may be NSFW.
Clik here to view.

Change featureclass name alias

Hi The 'featureclass name alias' and 'the featureclass name' are not equal for all of my featureclasses in a filegeodatabase. Is there an easy way to change/replace the 'alias name' with the...

View Article

Date field attribute not displaying correctly

Dear Sir I entered date field as variable like VDate = Sys.argv[4] using arcpy.CalculateField_management("BLD_PG", "BLD_PG_DT", VDate, "PYTHON_9.3", "") But in attribute table attribute of the Date...

View Article

ArcGIS 10 - LisctWorkspace / ListDataset - multiple types

Hi, Using PYTHON 2.6 & ArcGIS 10 - I'm writing a script in which I:Loop through all workspace under a given directory. Grab the details of all the Feature Classes, Rasters etc (both within and...

View Article

ToolValidator value.value, out of date documentation -

Hi All, the ToolValidator documentation says: Quote: As a Value object does not support string manipulation, use the Value object's value property whenever a string is to be manipulated or parsed. The...

View Article


Remove all default values on multiple feature classes

I would like to remove default values from all fields used by all feature classes in an SDE geodatabase. I do not see a geoprocess for removing the default value, only setting it. So I am trying to set...

View Article

errors using python.exe

If I run my python code using a text file via python.exe from windows desktop (open with) or task scheduler, is there a way to see if there were any errors? would a try/except work?

View Article


Some Tools change the progressor label. Is it normal?

I set my progressor lab, and it works alright, but as soon as it gets to certain tools, the label automatically changes to something related to that tool, or things like "writing feature 1". It does...

View Article

parsing/syntax error using Mosaic to New Raster in loop

Hey all: I'm new to Python coding language, and find myself stuck on what I'm guessing is a straightforward issue. Nonetheless, I've been battling this for 2 days now, and no amount of changes to the...

View Article


Script tool button portability problem

Hi Folks, As you may know, you can create a handy button on an ArcMap toolbar to launch a script tool, use the following steps: Select 'Customize' > 'Customize mode…' Select the 'Commands' tab Under...

View Article

Is it possible to show a 'busy' mouse pointer while a addin tool is working?

I have a python addin tool which takes about 5-8 seconds to complete its processing which is just long enough for the user to wonder if it's working or not- Is it possible to either change the pointer...

View Article

Python scripts for Fish data intersecting ICES Blocks

Hello, I am trying to create a script that automates a task for me I basically have two polygon shapefiles that contains data on spawning and nursing fish locations respectively within UK waters. Lets...

View Article
Browsing all 2485 articles
Browse latest View live