Python Script Tools are added to standard toolboxes (*.tbx) of ArcGIS for Desktop
0
votes
1answer
47 views
Debugging AttributeError: Invalid destination path from ArcPy?
I'm doing some programming work for a client and we can't seem to get the script tool to work on her end. It works perfectly on my end but when she tries it, it grinds away for a long time and then ...
0
votes
2answers
44 views
ArcGIS 10.3.x - Publishing GP tools as GP services using Python 32- or 64-bit dependencies
Desktop environment:
Windows 10 64-bit,
ArcMap 10.3.1,
Python 2.7 32-bit (installed by ArcMap)
Server environment:
Windows Server 2012 64-bit,
ArcMap 10.3.1,
ArcGIS for Server 10.3.1,
Python 2.7 32-...
-2
votes
0answers
44 views
Spatial join Python script in ArcGIS 10.2.2
I tried to set up a loop python script for closest spatial join. However, I failed with empty fields (they have data in original shapefile) after the spatial join geoprocessing without looping. I ...
1
vote
2answers
29 views
Creating a drop-down list for arcpy script tool
I have written the following script but I cannot manage to create the drop-down list for the variable "select" (select=arcpy.GetParameterAsText(3)).
Any suggestions?
# Script arguments
inputRaster = ...
1
vote
0answers
37 views
Calculating polygon width ArcGIS 10.4
I am trying to calculate an average width of a large set of polygons.
I found the script below researching the topic.
The function is:
def add_average_width(featureClass, averageWidthField='Width'):
...
3
votes
1answer
29 views
Error when running Extract by Mask Script
I am using ArcGIS 10.3 Desktop to write a script tool to, among other things, extract raster data using a mask.
I keep getting these errors:
ExecuteError: ERROR 000875: Output raster: C:\...
0
votes
2answers
35 views
Choosing data type to use for input as feature class or shapefile in Python script tool using ArcPy?
I am writing a Python script tool within a toolbox with *.tbx extension.
I need to make the input parameter flexible (feature class or shape file) , so which data type I should select for this ...
0
votes
0answers
30 views
Set Script Tool Parameter to Accept Either Input or Output
I've created a script tool that has an optional output parameter of an Excel Workbook. If it's populated, the script will add a new worksheet. However, every time the tool is run, ArcGIS is somehow ...
0
votes
0answers
23 views
ArcGIS 10.3.x Python tool script - Automatically adding multivalue output feature class to display
I am developing a Python tool script in ArcGIS 10.3.x that is meant to be later published as a geoprocessing service. The tool script produces two output feature classes that I would like to ...
0
votes
1answer
70 views
Filtering parameters in ArcPy Python script tool avoid repeating selecting same value in sequence parameters?
I am trying to make a tool in which there are many sequence parameters (based on the same field of a feature class), and each of them is multi value to make a user choose from a check a list one or ...
0
votes
1answer
37 views
What parameter's data type is Short integer in arcgis 10.3 model builder?
I am defining a parameter for a python script in model builder. The script calculates a single value from a featureclass using a formular referencing values of a long integer field in the same table. ...
1
vote
0answers
16 views
Select by location error in python script : “Fetch Geometries” window [closed]
I have a python script used as a source code for a ScriptTool in ArcGIS that is supposed to select road segments from a selection by location with a mask (polygon feature class).Everything worked fine ...
0
votes
1answer
60 views
Update rows based on other rows as script tool?
I am trying to convert python script to tool. Tool would update row values based on other row values. For example, if in row One values are Water, Rivers, Streams, in row Two, updated values would be "...
4
votes
1answer
110 views
Converting python script to toolbox?
I am trying to convert my plain python script to script in ArcToolbox to share, where user can set input data (in this case, feature class). Unfortunately, Converting Python (ArcPy) script into tool ...
0
votes
0answers
35 views
from lxml import etree; ImportError: DLL load failed: %1 is not a valid Win32 application
I am attempt to automate report writing within ArcMap with a program utilizing python-docx.
Can anyone explain what this error means and how I should go about fixing it?
from lxml import etree
...
0
votes
0answers
36 views
Cannot get python-docx to work with Custom Tool : DLL load failed: %1 is not a valid Win32 application
I am currently using ArcMap 10.2, Python 2.7, and Anaconda aka SPYDER to make my output code populate a Microsoft word report. When I use the custom script tool this is the error message I receive:
...
3
votes
2answers
87 views
Scripting is not following the order?
I have a script that has several lines and include 3 arcpy functions such as copy features, make xy layer event, and apply symbology. Right below those tools I am trying to use the arcpy.mapping to ...
3
votes
1answer
29 views
TypeError in Script Tool [closed]
I am currently recieving this error:
TypeError: unsupported operand type(s) for -: 'float' and 'NoneType' arcgis
for line 22:
invert_out = updateToRow[2]
Could anyone explain why this is happening?
...
3
votes
2answers
54 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
31 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
57 views
Creating multi-value choice list of field values and using selected for select in ArcPy?
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
25 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
40 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
38 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
30 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
67 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
49 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
99 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)
arcpy.env....
0
votes
1answer
52 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
23 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
110 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 entering "...
1
vote
0answers
62 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
63 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
77 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
46 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. However,...
0
votes
0answers
29 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
44 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
33 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
163 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
77 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
107 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
127 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
2answers
68 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
31 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
98 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
276 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
61 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
679 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 ...