A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

Questions tagged [python-script-tool]

Python Script Tools are added to standard toolboxes (*.tbx) of ArcGIS for Desktop

Filter by
Sorted by
Tagged with
0
votes
1answer
37 views

Using IF statement to create 2 different output files in Python Script tool of ArcPy

I have a model which needs to only produce 1 final report but is dependent on whether a variable is provided.So there are 2 different flows following on from that selection Something like this, a ...
0
votes
1answer
27 views

Multi choice parameter data type in ArcMap Toolbox

I'm a beginner ArcMap user. I created a toolbox in ArcMap/mytoolboxes which will run an specific Python script from my hard drive. In my python script I need user to choose between 2 options. I want ...
2
votes
1answer
69 views

Raster Calculator in Arcpy Script Tool

I am working on a script tool that will be run from a custom toolbox in ArcCatalog. I have written everything with the inputs hardcoded into it for testing. Works great running from IDLE. I had ...
0
votes
1answer
27 views

Choosing Field in Python Script Tool using ArcGIS Pro

I am writing a script to quickly split large FCs and make them shareable. So I need the tool needs to know what the FC name is and What the Field Name is to split the FC into manageable segments. To ...
0
votes
0answers
38 views

ValueError: could not convert string to float: 'x_degree'

I want to create a decimal degree (dd) field from degree minute seconds (DMS) as a script tool. The CSV looks like this. My code looks like this: import arcpy inTable = arcpy.GetParameterAsText(...
1
vote
1answer
35 views

ArcGIS Toolbox Tools visible in Pro, not in Desktop?

I created these tools in desktop years ago and they worked up until yesterday and then they just disappeared in desktop? I can see them in Pro, but not desktop? Any reasons as to why this happened? I ...
0
votes
1answer
25 views

Raster error 'TypeError: Can't multiply sequence by non-int of type 'float' when creating Arcmap script

I am writing an Arcpy script to use in ArcMap (ArcGIS 10.7.1) as a tool to interpolate existing soil points, and make a nutrient recommendation afterwards. However, I'm getting the TypeError: can't ...
0
votes
1answer
24 views

'Fields' variable does not show specified shapefile fields in Arcpy custom script

I'm creating a script in ArcMap (ArcGIS 10.7.1). I have created tool parameters to specify the workspace where the data is stored (Workspace), a shapefile displaying a boundary (Field boundary), a ...
1
vote
1answer
21 views

Defining one numeric variable by defining another string variable (via parameter selection)

I'm creating an ArcGIS tool that will allow users to figure out how much nitrogen that a field needs based on interpolated points (Kriging). I will have the following parameters: #numeric variables ...
1
vote
0answers
33 views

Error in ArcPy script building network

I am trying to use the network analysis toolset to build a route. I made the the tool in model builder initially and have tried to edit it to make it a script. When I try to build the network I get ...
0
votes
0answers
18 views

Getting arcpy.GetParameterAsText to provide drop-down list for ArcGIS users [duplicate]

I'm creating an ArcGIS tool that will interpolate (using kriging) nutrient levels from soil test data, and will calculate the total amount of fertilizer per field that a customer will need to buy. ...
1
vote
0answers
37 views

Can't run 3D Analyst extension in custom script tool

I have custom python script in which I use 3D Analyst function "Add surface information", it works fine when I run the script through ArcCatalog Python Console, but when I try to run the script as ...
0
votes
1answer
37 views

Converting feature set inputs into feature class or feature layer for Python Script tool

I want to accept feature set as input and convert it into feature layer or feature class so that I can use the input in select by location in the python script, as the select by location don't accept ...
0
votes
1answer
28 views

Iterating through geodatabase and assigning field value based on spatial location using ArcPy - Part 2

This currently loops through my dataset and calculates the installation ID field from my dataset with the installation code from my Bragg Area feature that are within the polygon of each row. It works ...
1
vote
1answer
34 views

Generating list of feature classes from .gdb file using ArcPy Idle script: Error thrown

I'm new to ArcPy and Python and have a very simple question. I'm trying to write a Python script in idle to extract the number of feature class files from a geodatabase. I can do it just fine in the ...
0
votes
0answers
25 views

Snapping value = 0 in Qgis

I am building pipes network, I need check connection between of pipes. I want to pipes must snap and tolerance has value = 0. Is there any tool to check and fix this things. I know Topology Checker ...
0
votes
1answer
101 views

Converting abbreviation street type names to full names using dictionary for Python script tool? [closed]

I have a data table with a column 'STREET_TYPE' which are street types (RD, LN, ST, AVE etc.). I want to make a custom tool in ArcMap's toolbox that will expand these abbreviations to their full names ...
1
vote
1answer
37 views

Python script tool with multivalue raster input not honouring raster path?

I am creating a custom Python script in ArcGIS that takes a rasters as a multivalue input and have run into a problem which I don't think is a duplicate (having scoured SE for many hours) My problem ...
1
vote
2answers
62 views

Using sys.exit(0) in an ArcMap Script Tool?

I'm using a ArcMap script tool to test if a facility is on a list. If it's not on the list, I want to print a statement and exit the script. The script works just fine as a standalone script but it ...
0
votes
1answer
32 views

Script that works in Python Toolbox not working in Standard Toolbox?

This script does not work in a Standard Toolbox but it works in a Python Toolbox. Do I need to delete all the parameters from the script? import arcpy, os, sys, shutil class Toolbox(object): ...
1
vote
1answer
44 views

Filter fields by expression arcpy

I have to trasform a script (which I didn't write myself) from QGIS to ArcMap. In the script a filter by expression is used. The function has the input inl (= the layer with the data that should be ...
0
votes
1answer
30 views

Making dropdown in ArcMap tool where each item links to spreadsheet?

The script below imports a spreadsheet into ArcMap and generates a shapefile. Currently, I can use the ArcMap tool that interfaces with the script to navigate to the spreadsheet I want to import. This ...
0
votes
1answer
50 views

Creating Select Then Zoom Tool using ArcPy? [duplicate]

I have been trying to create a tool to make a simple select then zoom to selected but I've been running into some issues. I've been using the code from this original posting (https://community.esri....
1
vote
1answer
72 views

Getting selected feature and changing attribute incrementally in PyQGIS?

I am using QGIS 3.4.x and i need change attribute value, by order selection, for example: I have 5 polygons, | Order of selection | Number | | Polygon 1............| set to 1...| | Polygon ...
1
vote
2answers
56 views

QGIS 3, How to stop script from running automatically

I have written a python script in the QGIS editor which works as expected when I launch it from there. import processing import os from PyQt5.QtWidgets import QFileDialog from qgis.core import ...
3
votes
1answer
77 views

Applying Definition Query for multiple features using ArcPy?

I'm trying to apply the following code to extract features that contain these letters 'MW' within the field called 'CODE' for multiple layers. But I'm getting a SyntaxError for line 5 (defintion query)...
0
votes
2answers
52 views

Automate Access to all Tools in a Dynamic Toolbox in ArcMap?

Is there any way to automatically open a toolbox in ArcMap either from a model, a Python script or a Python Add-In, or similar? Or to otherwise make all of the tools in a toolbox easy to access for ...
1
vote
0answers
46 views

Using ETGeoWizard functions in ArcPy?

I have ETGeo Wizard license and I would like to run the functions via ArcPy instead of running them in ArcMap. However, the functions works in ArcMap but not in a script. one of the example is ...
1
vote
1answer
63 views

Letting user draw AOI or draw points for tool input In ArcMap script tool?

I have a python script which uses a point file to do some spatial analysis. After opening the tool in arcmap, I would like the user to be able to just click points on the map to generate the data. I ...
1
vote
0answers
11 views

Open Script with ArcMap hyperlink on a new window

I am using a hyperlink to open my script, import def_measure def OpenLink ([weg_name] , [path], [Color_Frame] ): bag_path = [path] weg_id = [weg_name] color_id = [Color_Frame] ...
11
votes
1answer
124 views

Python Script Performance as an ArcGIS Tool Versus Stand-Alone

Has anyone studied the difference in running a Python script in ArcToolbox versus as a stand-alone script? I had to write a quick-and-dirty script to convert a set of RGB images to single band by ...
0
votes
0answers
43 views

Sending parameters to ArcGIS script through web interface

I have written a simple script in ArcGIS environment and I want to run the script through a PHP program. At present, I am trying this within localhost. In my script, I have defined two parameters. My ...
0
votes
1answer
123 views

Creating file geodatabase and using it as variable to create file path?

It's been a while since I've done arcpy scripting so it feels kind of new again. I'm working a script that is asking for these 5 parameters: workspace = arcpy.GetParameterAsText(0) RouteLayer = ...
1
vote
1answer
34 views

Limiting feature class parameter to specific geodatabase?

I have a tool that will update the geometry of a feature class based on the geometry of another, using a common identifier. It works great but the way I have it set up, you have to first select the ...
0
votes
0answers
67 views

Script sometimes stuck at arcpy.SplitRaster_management

my problem is that my script sometimes stuck then it use arcpy.SplitRaster_management. import arcpy import os #nearly 700 rows of script fclist: [ ...] # some fc rasterlist = [...] # many raster ...
0
votes
1answer
69 views

ArcGIS 10.5 Python script integration to 'script/tool' not outputting data

In ArcGIS 10.5 I have a python script that works well in the python window, however, I am trying to integrate it in a tool, mainly to make use of the arcpy.GetParametersAsText() input feature for the ...
2
votes
2answers
99 views

Locking stand alone ArcGIS Tool?

I have written a number of standalone Tools for ArcMap. These tools are all .py files and are run outside of ArcMap. At the moment it has only been me running these tools, but I have been asked to ...
1
vote
0answers
32 views

Checking Shapefile type (Point, Line, Polygon) in ModelBuilder using python script?

I am creating a model and would like the input to branch off to different tools within the model based on the shapefile type (point, line, polygon). I haven't found a tool in ModelBuilder that will do ...
1
vote
1answer
47 views

Coding Python about raster calculation for create a toolbox

I want to create a tool box in ArcMap. I wrote this code: # Import system modules import arcpy, os,sys from arcpy import env from arcpy.sa import * # Set input raster InputRaster=arcpy....
0
votes
1answer
139 views

Asking user to select file in Python Script tool using parameter?

In a custom toolbox you can make a parameter and ask user for input where he can type something and used as arcpy.GetParameterAsText(0) in the script in the toolbox. This is good if you want to use ...
1
vote
1answer
34 views

Spatial Join Using Python /ArcGIS Addin assistant

I have a point shapefile that contains all my field collected data, lat/long and all the field data collected during the season. The one thing not imported was the name of the Lakes these points fell ...
0
votes
1answer
48 views

Storing feature layer content inside ArcPy script tool?

I’m developing a script tool using ArcPy. I am wondering if there any way to store layer contents in my script in an encoded way and programmatically create this layer instead of referencing external ...
1
vote
2answers
80 views

Python script tool to make intersection points not working?

A colleague made a ArcPy tool for me which worked last year, but now it wont complete. I don't know what's different except maybe I moved the tool or it's output to a new location. It say's it get ...
0
votes
1answer
56 views

Getting Python Script Error 000539?

I'm attempting to create a tool that gives me the next available manhole number in a particular system. The manhole numbering structure looks like 1124-060E and therefore is a string field. Since ...
0
votes
1answer
137 views

Getting working Python script to run from toolbox?

I'm creating a model, using ArcGIS ModelBuilder, and want to use SelectRandombyPercent from Randomly subsetting X% of selected features using ArcPy? to randomly select points from a feature class. ...
0
votes
1answer
71 views

Other users unable to use ArcGIS Python script tool in shared folder?

I created a new toolbox with a script tool that successfully works for me when I run it. I have it saved in a shared folder that my coworkers can access but when they try to run it, it doesn't work. ...
0
votes
2answers
38 views

How to Prevent Final (Unnecessary) Selection Box in Script Tool Input Parameters via Validation Script?

Using Arc 10.2.2. My script tool's interface has its first parameter populated by the following snippet of validation script: def initializeParameters(self): # Source Folder dir_f = r'Q:\...
0
votes
1answer
89 views

Getting name of executing tool in ArcPy?

I created a script in a custom ToolBox and I defined a name (here ImportTopojis): This name is displayed when you execute the tool : I simply want to get this name because I want to use a single ...
0
votes
1answer
58 views

Attribute Totals for Rain Gauges [closed]

My goal is to create summary information to eventually present rain gauge totals attributes such as 1 day, 7 day, 10 day, 24 day and YTD totals. I was wondering how to go about this in ArcMap or ...
1
vote
2answers
221 views

CreateTable_management as part of a script tool fail

I am trying to create a table as part of a script tool, and it always fails with error 999999. The general idea of the script is that it is calculating proportional coverage of things in a series of ...