1
vote
0answers
65 views

Python script does not work for a LGA with space [closed]

Thanks! I got my script working now with replace gp.AddMessage() instead of print when running the script in ArcMap and replace the quote with blank as well since Python would include the quotation ...
2
votes
1answer
134 views

How can I put the name of file in add field with python?

In my script, I have to create field in 15 layers. The name that I wold like to set in this new field is the same of the file's name. But all attempts that I did were worng. My script: ...
5
votes
2answers
168 views

Field calculator script to work out first 5 dominant area fields?

I have 5 fields of different landcover types with areas of each and found below: > PRC_Water| PRC_Bare| PRC_Urban| PRC_LVeg| PRC_LVeg| > 5 20 40 20 15 I have ...
3
votes
2answers
193 views

Using ArcScripts

I use ArcGIS 10 I want to use an arcscript to compute an index of ruggedness for each cell of my map. For this purpose, I found, Evan's TRI.aml script here: ...
0
votes
0answers
106 views

Execute Sql Statement in SQL Server 2008 with ArcSDE connection

I'm trying to execute this SQL Statement to establish an SQL query in SQL server 2008 with an ArcSDE connection (ArcSDE personal use) but there is no result. The SQL statement is : Execute SQL ...
3
votes
1answer
434 views

What causes ModelBuilder error occurred in script on this page MdDlgContent.htm?

I've been creating a model in Arc 10.0 for a few days now without problems. Then I added the Calculate Field Tool. I selected Make Variable --> From Parameter --> Expression. When I check off "Model ...
3
votes
5answers
3k views

Renaming a field using arcpy

What I need to do: rename a field name of a table/feature class copy all values to the new field So far I have done following code as artwork21 suggests: EDIT: import sys import traceback import ...
12
votes
1answer
1k views

How do you write a Python script for repairing data sources in ArcGIS 10

So, I have about 50 mxd's with all broken layers that I have been going through and manually resetting. The data was moved from another computer and the folder structure was changed so it isn't just ...
3
votes
3answers
174 views

ArcGIS NEAR returns -1

We are running an ArcGIS 10.0 geoprocessing script written in Python that (as part of many steps above & below) runs the NEAR command. Both the input and output datasets (shapefiles & ...
6
votes
2answers
2k views

How to calculate XY coordinates in Decimal Degrees from projected dataset in model or script?

Is it possible to calculate points XY coordinates in Decimal Degrees in model or script when a feature class is in projected coordinate system? It's easy when a FC is in geographic coordinate system: ...
4
votes
2answers
244 views

ToolValidator not doing anything

I have created a simple script tool which has a single parameter of type "String". I have written the tool validation to disable the input field (simply trying to learn tool validation). The ...
1
vote
0answers
428 views

Variable stored as NoneType in Python with updateCursor

SOLVED: although the field was not nullable (no null values), a glitch created one in the heading field, so the variable was stored as a null value and thus the NoneType. I am using updateCursor to ...
3
votes
1answer
364 views

Python conditional on current and previous row

I need to calculate a new field with a python conditional where some values only occur if a sequence in a separate attribute field (X) occurs. For instance my data set looks like this. Y is the ...
2
votes
2answers
421 views

Looking for python/VB script to insert a new uniqe field

Is there any phyton/VB script which will add a field to shapefile which will be corresponding to first three characters from the shapefile name ? I am working in modelbuilder and arcgis 10. Thanks ...
5
votes
1answer
744 views

Script tool Value error

I've been struggling to get my script tool to run without receiving the following error: <class 'arcgisscripting.ExecuteError'>: Failed to execute. Parameters are not valid. ERROR 000735: ...
3
votes
2answers
339 views

Housenumber(point) angle from line (street)

using arcgis 10 with Point data (Housenumber without angle attribute) and line data (street without angle attribute) I want to create housenumber labels from point with correct angle from nearest ...
1
vote
0answers
555 views

Python script for running ArcGIS10 Area Solar Radiation tool

I am trying to run the Area Solar Radiation tool using a Python script, because I want to run it on several DEMs at once. I am using a server with Windows 7, ArcGIS 10 and PyScripter. I am a beginner ...
1
vote
0answers
254 views

Does anyone know a script to make annotation & point data remain constant regardless of scale

I have a series of maps to create for a project (30+ maps). The maps will be at varying scales (roughly between 1:1000 and 1:6000). I have a geodatabase containing various annotation and point ...
6
votes
3answers
2k views

How to send someone a file of a custom python script with all parameters for the popup interface already defined?

I have a python script in ArcGIS 10 that when clicked, has a popup for a user to choose parameters. I would like to send this file to someone else. While I could send them the python code and have ...
2
votes
0answers
127 views

Create Data Frame or Group Layer

I am attempting to write some Python code which creates a blank data frame or group layer which can then be populated with other layers. I'm at a loss as to how to do this since I'm somewhat new to ...
12
votes
5answers
5k views

How to get the extent of each polygon in a shapefile?

In arcgis 10 and python I want to get the extent (xmax, ymax, xmin, ymin) info of each of the polygons in a shape file. I can get the extent of the whole shape file using ...
1
vote
1answer
379 views

Issues Merging in Model Builder after Running Script

I have multiple inputs running through various processes throughout my model. At the end of these processes they are all merged together and output into one final feature class. This was working fine ...
4
votes
3answers
4k views

ArcGIS 10/arcpy: Help needed with syntax for CalculateField_management in Python script

I need to use CalculateField_management in a Python script, and the calc expression needs to concatenate a runtime variable, a string, and a field (string) value. I have searched all over for ...
2
votes
3answers
743 views

Field calculator script not working

I am trying to do the following in the field calculator in ArcGIS 10 if [IncdStDir] = " " then [IncdStNo] &" " & [IncdStName] &" " & [IncdStSfx] else [IncdStNo] &" " & ...
2
votes
2answers
816 views

script to create points in interval 0.125 decimal degree

I have a polygon shapefile. I want to create points at an interval of 0.125 decimal degrees in this polygon. How can I create a script with python in ArcGIS 10 to automate the process of create ...
1
vote
3answers
678 views

Automating capture of Extent from multiple mxds with multiple dataframes

I want to create a single shape file from multiple mxd's that have multiple frame sets with different extents in them. I have found/started a script to do this (attached) but can't figure out how to ...
4
votes
3answers
3k views

Batch shapefile merge, with adding and calculating field

I have over 60 shapefiles, all in their own folders. I'm looking to add a field titled "Name" and then populate it with the name of the shapefile. I want to be able to do this so that I can then ...
8
votes
4answers
5k views

How to remove a feature layer in an ArcPy Script

So, I have an arcpy based script where I'm trying to intersect two layers where one layer must have its centroid in the other layer. Since I need to know that one layer (feature_layer below) includes ...
11
votes
1answer
734 views

How can I display raised error messages to the user in the ArcGIS geoprocessing results window?

Question: Can print statemnts raised from a custom exception be displayed in the gp results window? Background: I modified a script that I found that takes two inputs from a user, finds the ...
6
votes
1answer
959 views

Setting units in python using ArcGIS 10

I want to calculate the area of each polygon in a shapefile. How do I control what the units of measurement are? def getArea(shapefile): """Print area of polygons""" Rows = ...
4
votes
1answer
2k views

How to change a text element's font size using python? (ArcMap 10)

I need my script to change the font size of a text element if the string is too long to fit in the title section of the map. I've looked into it using Arcpy, but haven't had any luck. Does anyone know ...
9
votes
2answers
4k views

How to make a button that calls a python script as a command rather than a script tool?(ArcMap 10)

I believe that in Arc9.3, commands could be created using VBA scripts. To add a custom command, you would navigate to Customize > Toolbars > Customize... and click UIControls. However, UIControls is ...
13
votes
1answer
2k views

How to have a python script self terminate in ArcMap10?

I have tried sys.exit, but it doesn't seem to work in ArcMap. Anyone know how to do it?
18
votes
6answers
3k views

Has anyone found any informative documentation about ESRI's ArcPy Python module?

Has anyone found any informative documentation about ESRI's ArcPy Python module?