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

Contour Lines Are Not Z-Enabled

I'm using the arcpy.Contour tool to create a polyline featureclass of contours based on a raster surface. It works great, but the polylines are not z-enabled. In ArcMap, they look great, but when I...

View Article


Image may be NSFW.
Clik here to view.

arcpy.MakeRasterLayer_management() failed in toolbox script

Hello, Recently I have been trying to implement the "Make Raster Layer" tool in a python script. The code I have is as follow, which takes a file path as the major input with a boolean to indicate...

View Article


Get YYYYMMDD String from Date

I have a script where the user enters a StartDate and EndDate (via arcpy.GetParameterAsText dialog boxes). I want to return strings of those dates in a "YYYYMMDD" format. In another script, I used a...

View Article

Image may be NSFW.
Clik here to view.

Calculating offset coordinates of points

Hello! I have the following problem; I have points feature class that i created from polygons with their coordinates. I would like to calculate for each point the coordinates of the second point at...

View Article

Extracting an integer from a string field

I have an attribute table with a column populated with road names. The names are in the form, "State Hwy 13", "US Hwy 1", "County Rd 444", etc. I have created another column in the table which I would...

View Article


RuntimeError: DescribeData: Method connectionProperties does not exist

I want to get the connection Details from sdeConnection file. <someName>.sde file e.g. serverName, service, user, password etc. for this I am writing following script. import arcpy desc =...

View Article

Image may be NSFW.
Clik here to view.

Unsupported operand error

Hello, I'm getting an error in my script that I cannot quite understand (I'm pretty new to python). Please see below code (simplified version) and error (image). The error comes from the "Calculation...

View Article

Can non-GIS web page display Python results from MXD/SDE data/Scripts?

Just starting to get into ArcMAP development and trying to get my bearings. From what I understand, Python is very much an internal scripting engine like VBA is for Microsoft. However, Python is also a...

View Article


Pythonwin startup script

Hi, I'm at work now and cannot remember how I selected a python script to run when I open Pythonwin. The purpose is simply to import arcpy modules and python modules. Through my training I learned how...

View Article


Cannot Add FeatureClass from GeoDatabase

Greetings, I'm still fairly new to using the arcpy.mapping functions. I want to add a FeatureClass to my map document which is open. In looking at other forum threads and reading help, I tried the...

View Article

Problem Setting Label Expression in Arcpy

I'm trying to set a label expression to a field ("StateWellNumber") in my table. I have the following code but I get an error message saying "name 'StateWellNumber' is not defined". Any ideas? Jon...

View Article

Model Builder - Caluclate Value

Hello All I'm using the Calculate Value Tool within Model Builder to take a user variable (a date) to create a where clause to apply as the Expression on a Make Query Table. Please see below the values...

View Article

Labels Still Not Visible after setting lyr.labelClasses[0].showLabels = True

Thanks to an earlier reply today, I'm moving along on my script but have encountered another hiccup. I've set "lyr.showLabels = True". After looking through some other threads, it looks like I also...

View Article


Create a Time-Enabled Layer in Arcpy

I guess I should be sipping eggnog today, but I'm getting hooked on the Python scripting... I want to time-enable a layer (have time-enabled it in ArcMap so it is a good featureclass) in Arcpy. Does...

View Article

.lyr find data source lost

Hello, I have a folder with lyr. I want to know the lyr. With lost data sources. Like this script: import arcpy path = r "C: \ Project" for fileName in os.listdir (path): fullPath = os.path.join (path,...

View Article


Raster save method using variable

Hi, I'm trying to find out how to permanently save a raster using a workspace variable + Raster name with little success so far. In the Help it only shows how to do it hard-coding the output. Please...

View Article

Why do I need Layer and Table Views?

I am trying to automate a series of selections, joins and field calculations either through a stand alone script or script tool to prevent user error and make the task easier. However, I am frustrated...

View Article


How to populate Add-In Combo Box with attributes

Hello, I'm using ArcMap 10.2 and trying to populate an Add-In Combo Box with the attributes (SampleYear)0 of a layer (Stream_Temperatures). Then, on selection of a year in the Combo Box, have those...

View Article

Symbology & changing versions - a total newbie needs help

Python beginner here. I know what I want to do, but I don't know what all the parts of code are called, so I'm hoping someone can bear with me and help. I'm working on a script to add layers to a blank...

View Article

error in debug only - run mode operates fine

In my Python script tool, there are functions that cause an exception ONLY in DEBUG mode. The tool completes successfully (performing every function that is coded) when "RUN" with exactly the same...

View Article
Browsing all 2485 articles
Browse latest View live