Disconnect from SDE
I am working in an enterprise geodatabase in through Citrix - both the desktop client and SDE are at 10.1. I often have multiple SDE connections open and would like a way to close all of them at once...
View ArticleModelBuilder: Iterate Feature Selection can't handle grouping by joined fields?
Overview:I have a points layer and a lines layer. There is a join on the points layer using its segment ID number(CID) with a field in the lines layer which contains the name of the line that is used...
View ArticleMonthly Averages for 30 yr dataset
Morning, I've been digging through the forum for a few days to find a script that could help me. I've currently found: Code: import arcpy arcpy.CheckOutExtension("spatial") arcpy.env.workspace =...
View ArticleHelp with arcpy.Exists()
Hello I would like to use arcpy.Exists() to handle existing featureclasses in a file-GDB but am having a problem with the argument. The problem (for me) stems from splitting a single featureclass into...
View ArticleOdd results from getCount
I was QAQC'g my code results and found unexpected values. My code queries point and polygon layers looking for how many negative test result are gathered before a positive. Code: for grid in grids:...
View ArticleIndexError: list index out of range PLEASE HELP
Trying to execute the following script tool to rename all the rasters in a folder to a shorter, but still uniquely identifying, version of the names they already have. I am getting "IndexError: list...
View Articleproblem with arcpy.da.updateCursor
I'm a programming-beginner and I am currently writing my first Python-Script. That's why the question is more a general (or perhaps a semantic) one. I want to write a specific ID to the attribute table...
View ArticleInstall arcpy
Hello, My company uses Citrix to access all ArcGIS components (Catalog, ArcInfo, ArcScene, etc..) so we do not have the software installed on our computers. I'm trying to work with pythonWin to edit...
View ArticleHow to add basemap to MapDocument using arcpy?
Hello - I am using ArcGIS 10.1 with Python 2.6. I am using arcpy to work with an MXD template that I read using arcpy.mapping.MapDocument. I want to add a basemap to the default dataframe (I have a URL...
View ArticleUploading a service definition and overwriting the existing one
I am trying to use python to upload service definitions when they are changed and overwrite the existing ones already on ArcGIS online. I am able to sign in through python, but then when I upload the...
View ArticleIssue with Copy Features in Python
I'm fairly new to writing scripts in python. I'm creating one to take a feature class of about 100 points and turn it into individual points then run a cost path analysis on each of them. The cost...
View ArticleUsing Python to Calculate Cache Size Estimate
Hello I am writing a python script, in which one component is to generate a .sddraft file using the geoprocessing function "arcpy.mapping.CreateMapSDDraft". I will then update parameters for this...
View ArticleCS syntax for stand-alone python
Hi, I'm trying to run; ASCII3D_to_Feature_Class The geographic coordinate system I require is 'GDA 1994 MGA Zone 55' I've tried CS = "Coordinate Systems/Geographic Coordinate Systems/World/GDA 1994 MGA...
View ArticleScript ending at loop
I'm having an issue getting a loop to run in my map. Something as simple as just trying to print "yay" won't iterate. Here's what I have to even a test that I can't get to run. Am I missing something?...
View ArticleSelectable Layer(s) in Python - Not TOC buttons
I have a Python Addin that selects a feature by mouse click location and updates the attributes (to a per-determined value) or deletes it based on the button I click in the toolbar (I am flagging the...
View Articleaddin: bad selection from tool
I'm trying to get the id's of polygons that I select with a Python addin tool, but it is returning all the features, no just my selection. Any ideas? Code: import arcpy import pythonaddins global...
View ArticleDefault value of field not accessible via arcpy?
The Python/arcpy field class does not have a defaultValue property! Is that an oversight, or a deliberate feature of arcpy's field class? I know the IField interface (ArcObjects) will provide the...
View ArticleSelect parcels (by county fips) from SDE layer into shapefile.
I have an SDE layer of parcel data from which I want to export out (by state code and county fips code) each county separately into it's own shapefile. I have a list of state and fips codes in a...
View Articlearcpy.SetParameter - Multiple output parameters
Hi guys, Is it possible to set more than one output parameter using arcpy.setparameter ? Quote: index = arcpy.GetArgumentCount()-1 output1 = "out1" arcpy.SetParameter(index , output1) output2 = "out2"...
View Articledivide tool
Hi everyone I want to build a toolset by using add a script that before I had provided in Pythonwin, this tool divide one raster by maximum value from that raster for normalization it. I found that by...
View Article