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

Image may be NSFW.
Clik here to view.

Scripting "Create Geometric Network" Input feature class problem

I'm trying to write a script that will ultimately create a large number of geometric networks for a stream basin modeling project. The script will run through a list of geodatabases, and in each gdb it...

View Article


Error 000212: Cannot create XY event source

I had the Python script below running on my old machine (Windows XP with ArcGIS 10). When I run it on my new machine (Windows7 with ArcGIS 10.1), it throws up the 000212 ERROR. It also says: "File...

View Article


Image may be NSFW.
Clik here to view.

Python in Field Calculator

Hello, i try to use the index position of a field for an if-clause in the field calculator. gesamt = Code: function(arcpy.fieldInfo.findFieldByName(!gesamt!)) Codeblock: Code: def function(index):  if...

View Article

Accessing File Geodatabase API in Python

Are you interested in using the File Geodatabase API in Python? Well, wait no more! You can read about it in this post: http://libjoe.blogspot.com/2014/02/p...esri-file.html And visit the project page...

View Article

Problems with "adding to selection" and "switch selection" using python.

I want to select data for processing from a wetland dataset. 76,000 records. When I run step by step in python window I can create a new selection, then add to the selection and finally, switch...

View Article


Issues with CreateGeocodeSDDraft

I cannot get the arcpy.CreateGeocodeSDDraft function to work. I have ArcGIS Server 10.2 installed and have the locator path set to the folder containing the geodatabase which has locators in it. Has...

View Article

Problem with CreateTin_3d in Python script

Hi there, while working on a huge project with ArcGis 10 (ArcInfo license fully loaded) I needed to generate some TINs. So long story made short, prototype on Model Builder, Export to Python Script and...

View Article

Moving the last vertices

Hi All, I have a feature class made up of lines. Each of these lines are loops. Therefore they have the same beginning and ending xy coordinates. I am looking to move the end vertices for each line a...

View Article


Python to Change Selectable Layers

I'm just wondering if it's possible in python to change the selectable layers in a map document. I've built a python add-in that allows a user to select a group layer and when they select that group...

View Article


Python addin questions - edit existing addin, plus using existing code in addin.

Hi - apologies for what is probably a n00b question. I've just watched the free seminar on creating Python add-ins for 10.1, and am having a crack at building a custom toolbar to deploy two existing...

View Article

Command for exporting rasters to points

Hi! Can anyone help me with Python code for exporting many rasters to points. I have numerous raster files I want to convert to points. I want program to open every raster in a folder and save its...

View Article

python add-in combobox to show self.value when first loaded

Using self.value it is possible to preset the value of the combo box (one of the values in the self.items list). But this value is not shown when the add-in is first loaded, you still see a blank combo...

View Article

Set default python to 64 bit in ArcMap

Hi, I hope this is an easy fix. I have 10.2.1 and 64-bit background geoprocessing installed. And in scripts outside of ArcMap, 64-bit python can import arcpy. >>> import sys >>>...

View Article


arcpy visible not working

I have a script that adds .lyr files to an MXD. A loop then iterates through the layers in the MXD and turns them all OFF, using the lyr.visible = False function. This part of my code works. I then...

View Article

ArcPy - Versioned Database Deltas

Hey Folks, I have a quick question. Is there functionality in ArcPy or other Python Package to identify the Inserts, Updates, & Deletes between a Default and Version in SDE??? If you could point me...

View Article


add a vertex to multiple polylines

I have a lot of lines in a feature class where the only vertices are the two end points. I want to add one vertex 2 ft from the start point of the line. I might be doing something wrong, but the...

View Article

automatic import MyAddinName_addin to enable interaction in python window

I found out that I can interact with a python add-in using the Geoprocessing > Python window by importing the add-in: Code: import MyAddinName_addin Is it possible to build this into the python...

View Article


Image may be NSFW.
Clik here to view.

Execute "Make Query Table" tool using python

I am trying to execute the Make Query Table tool using Python scripts following which I will incorporate other tools as well. I have set all the required parameters for the tool to run; the input...

View Article

ModelBuilder vs. python script performance

Hi, I am trying to run an arcpy script on JoinField to join a feature class and a standalone table. The model runs the process rather quickly, but the script takes a long time to complete! Is there a...

View Article

Help Writing Selected Features to Individual CSV Files

Hello, I am trying to write selected features to individual csv files based upon values in a list via Python. In a nutshell, I have a feature clas that consists of policies that fall within 100 miles...

View Article
Browsing all 2485 articles
Browse latest View live