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

Exporting/extracting HEC-RAS data using Python

I work with hundreds of HEC-RAS models, and typically I would open each one up to copy/paste a user-defined output table to a spreadsheet. Then use some Visual Basic to manipulate to a way I want it -...

View Article


Subtypes and combining fields

Hello! I've got a more complicated question this time. I'm working with a road file. I have a large dataset with road name information. The way we've created our dataset is to have each part of the...

View Article


How do I get ArcGIS to install Python on my current Python install?

I just did a fresh install of my OS and installed ActivePython 2.7.2. I want ArcGIS 10.1 to use this Python install. What are the steps do get this to work? I can't stand having two separate Python...

View Article

HELP! arcpy.mapping select records loop, export each to PDF map

hi ALL, I posted my question under map automation, but it really is a python question having to do with arcpy.mapping. I am creating a tool in python that will automate (essentially) the following...

View Article

10.1 SP1 64bit geoprocessing, error importing arcpy

This error only occurs when using the 64bit python.exe that is installed with the SP1 for 64bit geoprocessing. And it only occurs when importing the arcpy module in a python script that is called from...

View Article


Carto Commander tool

Hi I have selected some features in my map. Now I need to store the selected features in the PLTS_CartoExceptions table located in the current production database and exclude them from cartographic...

View Article

Carto Commander

Hi everyone I know the Carto Commander (Aeronautical) tool is used to edit a layer. For example we can cancel unselected features using it, but I don't know how. If somebody know how to use Carto...

View Article

Sample Code Needed: Export mxd Data Frame using envelope of features

I need to export the contents within my data frame using a fishnet to define the envelope. I want to generate jpeg tiles (with world files) for each square (feature extent) within my fishnet. I also...

View Article


Draw lines

I have a point feature class. Every points in it has unique ID(SPL_ID). Also, they have another field (PREV_PT). Now, I need to draw lines as per the attributes. ie. from PREV_PT to SPL_ID.

View Article


Image may be NSFW.
Clik here to view.

Export Map (Data Frame) to JPEG

I have an Index Feature Class that I want to use to export my CURRENT Data Frame to JPEG. I want to loop through each row within the Index Feature Class and for each row select the feature and use it...

View Article

Suppressing Messages from arcpy.FeatureClassToShapefile_conversion

I am using the command Code: arcpy.FeatureClassToShapefile_conversion([workspace + "/townships", workspace + "/township_points", workspace + "/section_points", workspace + "/sections"], proc_fldr) to...

View Article

script to stop ArcGIS Server service

I've used the following script to start/stop the AGS windows service, standalone and in models, so I can do some data management with very little downtime. This script worked find in 10.0 but doesn't...

View Article

Conditional labelling question

Hi, I'm trying to label by a text field fName but suppress labels based on 2 (or more) values. ATM my code looks like this: Code: def FindLabel ( [fName] ):   if ([fName]) = "Roundabout":   if...

View Article


Field calculator, subtract Expiry date from the Current Date

Hi I am new to Python and not a programmer. I wish to use the field calculator to subtract an "Expiry Date" from the current date. I have used the following code (which works), but it is using a field...

View Article

Python tool works in PyCharm and Terminal, but not in ArcMap

I have a Python tool that runs fine when executed from PyCharm and DOS-terminals, but fails when I execute it from ArcMap 10, SP5. Stripped down version of the code looks like this: Code: try:...

View Article


Image may be NSFW.
Clik here to view.

Python tool causes arcmap.exe not to close - BUG ?

Hi, I wrote a very simple geoprocessing python script that after running it and closing ArcMap, the ArcMap.exe process never ends/closes. As a result sometimes it holds locks on SDE featureclasses etc....

View Article

How to use unziped feature class?

I have a model that unzip a zip file. I can unzip a zip file but I can not use extracted zip file as an intermediate data for continuing my model. Please help me. Regards

View Article


Help with Python Runtime error

After running the CreateTopology tool within the ArcMap python window, it gives a runtime error with a mysterious space, and some characters cut off. Its hard to explain so here is the example. I Type:...

View Article

Select Layer by Location not providing correct result.

I sought assistance with a portion of this code earlier. I have added an additional step, which to me would seem pretty simple, but I am still learning the ups & downs of Python. My script creates...

View Article

Replacing Attributes

I have done this a long time ago, but I forget how I did it. I believe there is a script I can write that says anything left of a certain word or a certain amount of spaces gets deleted and replaced...

View Article
Browsing all 2485 articles
Browse latest View live