Python Script Tools are added to standard toolboxes (*.tbx) of ArcGIS for Desktop
3
votes
2answers
37 views
ArcGIS Script Tool RuntimeError: cannot open 'GPL0'
I Cannot find what this error means or what could be causing it? Script worked until I added the lines under "Set map label to containing quad name". My environment is ArcGIS 10.1 SP1, Windows 7. Here ...
2
votes
1answer
22 views
Script Tool Automation of Search and Update Cursor?
I keep recieving the following error:
RuntimeError: An invalid SQL statement was used. [SELECT [ID_NUMBER,COLLECTION,COLLECTED_,COLLECTI_1], OBJECTID FROM OFFICIAL_STRUCTURES2015]
import arcpy as ...
1
vote
1answer
25 views
Create a multi-value choice list of field values and use the selected for a select
I have created a multi-value choice list following this blogpost:
https://blogs.esri.com/esri/arcgis/2012/07/16/generating-a-multivalue-choice-list/
I changed the validation code to my needs but now ...
1
vote
0answers
22 views
drop list from field to excute SQL request
i'm new to Python programming and now I try to create a python script that allows a selection attribute based on the name of a field in the attribute table of a layer
and I would like to configure my ...
0
votes
1answer
33 views
Alternative to raw_input on arcgis
In python only, I use
S = float(raw_input( 'Insert the value: ')
when I want allow to user insert a value then is used in that script.
When I try to use the same on a python script that I've already ...
1
vote
1answer
35 views
How to access script (source) of custom tool stored in tbx?
I have few custom toolboxes, with script tools.
I can access individual toolbar by:
ToolBar=arcpy.ImportToolbox(toolbar_path)
I can access each tool by iterating through
ToolBar.__all__
I’d like ...
1
vote
0answers
28 views
Installing Python/site packages on LAN server
I'm going to be sharing an ArcGIS script tool with coworkers and I want to store all necessary mxds, gdbs, and script files in one folder on the server so the file paths are absolute. However, the ...
1
vote
2answers
56 views
ArcToolbox Date default to today
In ArcToolbox I have a script (arcpy) that calculates some info plus a date into a database table. The date required to write is often (but not always) the current date, so the tool asks for input of ...
0
votes
0answers
39 views
ArcGIS 10.2 Custom Tool Sort Drop-Down-List by another field of table
I'm making a Custom Tool in which the user could select one input-parameter from a field of a table as a Drop-Down-List. The issue is, that I don't want to sort the Drop-Down-List in alphabetical ...
2
votes
1answer
76 views
Making a tool from script, arcpy.Project_management () comes with an error
I have a script (just a fragment here, up until the line after which the error comes up):
import arcpy
from arcpy import env
arcpy.env.workspace = arcpy.GetParameterAsText(0)
...
0
votes
1answer
42 views
arcpy custom script tool to find and replace floats and ints?
I created a custom script tool that can find and replace text. See the image link for what my tool interface looks like too, and I'll point out the find and replace fields are both set to string in ...
1
vote
1answer
20 views
Tool validation to filter out OID and geometry fields?
I have a python script tool (arcpy) in a standard toolbox that edits data in fields, but I want some code in tool validation that would make sure that when the user gets to the field parameter, the ...
1
vote
2answers
85 views
How to keep a parameter blank in a script tool?
I've developed a sort of find and replace script tool that functions. But I'm not able to figure out how to find empty cells in fields and replace them.For the "Find" parameter, I have tried ...
1
vote
0answers
47 views
Adding multiple fields to feature classes in enterprise geodatabase using ArcPy?
I am very, very new at python and am trying to put together a tool that can be run on an enterprise geodatabase that will add a series of fields to each feature class. So far I have only been able to ...
1
vote
1answer
48 views
Passing field name as parameter to script in ModelBuilder?
I am new to ModelBuilder.
I am running a python script from ModelBuilder that requires as it's parameters a table view and specific field names from that tableview. Essentially the script is looking ...
2
votes
1answer
62 views
Filter the Feature Layer parameter in Python Script Tool
I have a Python script tool where I have a parameter of type Feature Layer because I want to have the already opened layers as a dropdown list.
I was wondering if there is a way to filter this ...
1
vote
0answers
36 views
Exporting .jpg files from data driven pages in Arcmap (name file is a text) [closed]
I am trying to export my Data Driven Pages to JPEG files named wiht an index layer field. I have used the code posted in other answer and it seems to work fine when the page names are numbers. ...
0
votes
0answers
27 views
Retrieving raster classes as data type in Python Script tool?
I want to program a python script tool in ArcGIS where the user should be enabled to input a classified raster and, based on this raster, the classes should be selectable.
EDIT: As is suggested in ...
2
votes
1answer
40 views
Can tools or addins created in ArcMap be published and used in ArcGis Online?
I'm attempting to build an interactive map that would be hosted in AGOL. It would be a network query, whereupon selecting a point feature from an "inlet" layer, the map would display the corresponding ...
1
vote
1answer
43 views
Date different in field calculator using python method
I would like to calculate date different between two fields of date format.
The idea is to know if Field_1 is greater than Field_2.
My calculate code is something like this:
def date(f1,f2):
if f1 ...
1
vote
1answer
30 views
Value Table in Python Script not displayed correctly?
I am trying to implement a Python Script tool where I need a table to input shapefiles and corresponding names for new created fields.
I found out that there is the Value Table provided by ArcGIS, ...
3
votes
3answers
131 views
python script tool validation checkboxes to radio boxes?
I am trying to build a tool in arcmap, which uses radio buttons in its gui. Since I read, that radio buttons are not supported, I figured, it couldn't be too hard changing the behaviour of simple ...
0
votes
0answers
74 views
arcpy UpdateCursor throws exception on geoprocessing service?
I wrote Python code that changes the state of a feature by ID. I am not using a Python Toolbox (.pyt). I wrote a python script and added it into a standard toolbox (.tbx). Using ArcGIS Desktop ...
0
votes
1answer
28 views
Using Model to define a group/range of numbers then populate a new field with the new definition
In one single table I have a rank in one field, and let's say I have rank 1 through 3 in one field and I want to define that group of rankings of 1,2 and 3 as having a score of '10', then ranks 4 ...
2
votes
1answer
75 views
Calculating Setbacks of Parcel using ArcGIS for Desktop?
I am looking for any guidance on how to calculate setbacks for a few parcels.
I am using ArcGIS 10.3
I have a shapefile of a few land parcel. They have columns of Side_Setback, Front_Setback, and ...
4
votes
2answers
123 views
Incorporating several Python script tools into one tool and have user input determine section of script run?
I have a series of script tools created and work well in ArcMap 10.2.2 just fine. These tools generate a series of buffer features from an input feature class. I have these as separate tools each ...
0
votes
0answers
45 views
What data type is excel in Arcgis Add Script wizard?
When creating tool from a python script in ArcGIS, data type has to be chosen in Add Script wizard and one of my parameters is Excel and another one specific sheet whereas there can be more sheets in ...
1
vote
1answer
30 views
Debugging error 000865 in Python script tool for use with raster elevations?
I'm trying to create a python script tool that will take in a DEM/raster as a parameter, pull out the maximum and minimum elevation values, and iterate through this range of values at a specified ...
1
vote
2answers
74 views
Unable to set ValueList for parameter in python tool in ArcGIS
I have a tool I am writing that takes in a multiple parameters. The last of these, Codenumber, I want to define to be 1,2,3 or 4. I am attempting to do this by use of a Value List. See below section ...
2
votes
2answers
229 views
Trace Geometric Network won't execute in custom script tool
I'm trying to make a Python script tool which uses the Trace Geometric Network tool (10.3). My script works in the Python window, but as a script-tool, it runs and NOTHING HAPPENS. Messages state: ...
2
votes
3answers
58 views
Stacking multiple selected points in ArcGIS
I would like to find a way to stack multiple selected points in ArcGIS, either using the field calculator or python script. For example, I want to snap all points representing houses on a street into ...
3
votes
4answers
509 views
Get Parameter as Text and select layer by attribute
I have written a python script tool wherein a user specifies a feature class (e.g., Landuse) containing different attributes (e.g., parcel size, landcover etc.), name of the attribute field from which ...
1
vote
2answers
41 views
Inputs for building composite address locator from address locators created in for loop of Python script tool?
I'm building a script tool that creates up to 3 address locators and then uses the output address locators as inputs to the final output composite address locator. The tool executed perfectly prior to ...
3
votes
2answers
183 views
Setting input parameter to be float for Python script tool?
I made a Python (2.7.8) script, where one of the parameters is height (float) and I wan to make tool in ArcGIS 10.3 now. However in data type list there is only double. If I input integer value into ...
0
votes
0answers
36 views
How to create a dropdown option when setting up python script into the arctoolbox
So I created a script that I will import to a arctoolbox. On the display name section, I have asked the user to choose a workspace, select the shapefile, field name, and an option to make a pdf, jpeg ...
3
votes
2answers
466 views
ArcGIS Python Script Tool Field Name Drop Down?
I have a python script that checks file path names for corresponding files in a drive location. All of the inputs were originally hard coded, and it works well enough:
import arcpy
import os
...
0
votes
1answer
60 views
Parsing error with in ArcPy code
I have the following code in Python for a tool I want to build. For some reason I viewshed don't exist in the folder I have chose (out). Also when I am trying to define the output workspace every time ...
0
votes
0answers
46 views
Creating multiple dropdown lists in Python script tool?
Can anyone tell me how to create drop down lists? I want 'Area Name Field' to be a list of fields from the shapefile selected in 'Area of Interest' and 'Name Value' to be a list of field values ...
1
vote
0answers
57 views
Modifying Cluster Analysis script in ArcGIS.com Incident Analysis template to add dissolve for other fields?
I have fiddled around with some of my data, especially a high-count (> 50,000) point data set of business locations. In small scale I have successfully used ESRI's Incident Analysis to cluster these ...
0
votes
0answers
71 views
Same script runs in python window fails in script tool
I have this snipplet, in which I'm triing to use. If I run it in the python window in ArcMap it runs correctly, but when I'm using it as a script tool, it fails without error message.
This script ...
1
vote
1answer
74 views
Writing Python script tool to enable ModelBuilder to skip over rasters without data?
This modelbuilder works well until the raster to polygon step. At that step, rasters without features cause an error(error 010151). I would like to put in a step before raster to polygon that causes ...
1
vote
1answer
184 views
Arcpy - Out of memory [closed]
I'm new at making scripts and I´m having some issues in my first arcpy script.
I've created a code that automates maps creation, and it's running ok but gradually increases the memory consumption ...
-2
votes
1answer
74 views
Running custom geoprocessing tools written for ArcGIS 10.x for Desktop in ArcGIS Pro?
I am developing geoprocessing tools for Arcgis Desktop 10.3.
I also have ArcGIS Pro installed .
Can I run geoprocessing tools (written for 10.x) in ArcGIS Pro?
Is it theoretically possible?
Can ...
0
votes
1answer
153 views
Adding Parameter Descriptions to Script Tool
I've made a simple tool that accepts three parameters: an input file (feature class), an output folder (folder), and an output name (string). These are all required input with no filters. The tool's ...
1
vote
2answers
77 views
Adding output parameter to Python script tool?
How do you add an output parameter in a python script in a toolbox?
4
votes
3answers
83 views
Trying to list datasources in mxds
I've written a tool that prompts the user for a directory path, and optionally a single mxd. It then crawls the directory for mxds (or just the single one) and writes some of the properties of the ...
1
vote
1answer
26 views
arcpy.mapping exportPDF with ONLY one buffer ring turned on for associated iterated feature
I am exporting X number of maps iterating through a point feature class. Each feature class has a buffer drawn around them. I know how to export a PDF for each feature class at a fixed scale (if I ...
2
votes
1answer
55 views
Generating SQL expression from multivalue pick list in ArcGIS tool
I have created a script tool that allows users to select a single value from a pick list, which gets inserted into a query expression.
The pertinent part of my code is pretty simple:
Input = ...
2
votes
2answers
112 views
Use Cursor to Calculate Field with Input Parameters
I have the following script that is used with a script tool to truncate each word in an input string and output the result to another field. There is an input parameter for the length of the ...
1
vote
1answer
225 views
Passing two variables into codeblock of Calculate Field tool of ArcGIS Desktop?
I have a script tool that truncates each word in field to 3 characters and outputs the result in a new field:
"THIS IS AN EXAMPLE STRING" becomes "THI IS AN EXA STR"
import arcpy
...