Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [python-script-tool]

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

1
vote
0answers
19 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 ...
0
votes
0answers
38 views

Using user input vs GetParameter in ArcPy? [on hold]

I successfully wrote a script tool in Python 2.7 that utilizes GetParameterAsText but I keep seeing tutorials about input and rawinput. What is the difference and in what scenarios would input be ...
0
votes
0answers
23 views

In an ArcMap script tool, how can I let a user draw an AOI or draw points for tool input?

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
8 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
101 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
41 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
46 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
31 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
52 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
43 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
60 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
26 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
40 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
39 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
31 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
42 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
47 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
45 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
92 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
56 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
33 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
61 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
56 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
131 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 ...
0
votes
1answer
149 views

Python script parameters for Integer not working

I am using a Python library called arcpy_metadata that uses 2 datatype called max_scale and min_scale that take integers: My code for that is just: import arcpy, arcpy_metadata as md .... min_scale ...
0
votes
1answer
61 views

Output shapefile data type in Arcpy

I have to reproject a shapefile's coordinate system. To do that I am using Arcpy and I want to get an output to use it as input in other tool (in Model Builder). Now I get an output, but I cannot use ...
0
votes
1answer
157 views

Can't import custom Toolbox in ArcPy?

I have a custom made Toolbox and I can't make it run. The Toolbox is called toolbox_k and the tool is called sn I did this: arcpy.ImportToolbox(r"C:\Users\user\Desktop\VST\Toolbox_k.tbx", "sn") I ...
1
vote
0answers
34 views

Drop down for Unique Values for a ArcGIS Custom Tool [duplicate]

Can an ArcGIS Tool have a drop down field with unique values derived from a list? For example, user selects a table, the tool will then find all of the values in field X and populate a drop based on ...
0
votes
1answer
39 views

What does the prefix GP or DE on parameter data types in a Python toolbox mean?

What does GP and DE mean as seen on parameter data types. Do they have an affect on what data is shown in the browse dialog box?
2
votes
2answers
960 views

Check if field exists, if not, create one - Model Builder Script tool

I'm trying to create a script tool to use in Model Builder that will check the incoming dataset for the existence of a particular field. If the field exists it should simply go on to the next ...
0
votes
1answer
17 views

Possible to determine how many rasters selected for a single GetParameterAsText()?

I wrote a script for ArcMap Desktop 10.5.1. The purpose of the tool is to buffer a feature to 1000ft, mosaic rasters together, and clip the raster to the buffered polygon. It works flawlessly; however,...
0
votes
0answers
86 views

Python script tool fails when processing rainfall data from Google Earth Engine

I am using the Earth Engine Python API in a script tool that I'm running from ArcMap. Essentially, the tool will allow the user to draw an area of interest, and from this area of interest, the total ...
0
votes
0answers
31 views

Enabling a parameter in a field map in a Python script

I am creating a customized version of the Find Identical tool in Python. The script works just fine, but there's one thing that I can't seem to figure out. In the standard ESRI Find Identical tool, ...
0
votes
1answer
283 views

Incorporating Python script into ModelBuilder?

Within ModelBuilder in ArcGIS, I am trying to add a script that will randomly assign "model types" (which is text) into the new field I have created in the attribute table. I checked to make sure the ...
1
vote
1answer
84 views

Clipping raster with shapefile and exporting each raster subset using ArcPy?

I want to clip a raster image using a shapefile with differents polygons (each polygon have its "FID_malla" value [FID_malla is large data type]) and save the subset rasters individually with "...
1
vote
0answers
50 views

Selecting pixels in raster using polygon selection tool in QGIS?

I want to reclassify landcover image manually with respect to online imagery. I am looking for a software/plugin/script to manually select raster pixels using polygon selection tool and could be able ...
0
votes
0answers
12 views

ArcToolbox, adding custom options to a dropdown list based on python list [duplicate]

I have created a simple ArcToolbox Script in python that the user can enter a domain code and description into the tool, and it is applied to a domain on our SDE. I want to make this tool more ...
4
votes
4answers
217 views

Problems with for iteration in arcpy

I want to fill a new field in a shapefile using arcpy. I have differents values so I am using for iterator to run all rows. But when I run the code all rows are filling with the latest row value. The ...
1
vote
2answers
379 views

Select Layer By Attribute Python Script Tool?

I'm trying to script another Select by Attributes tool. I want to be able to find a specific building using a field and zoom in to the location. However, my tool needs to allow a user to input any ...
1
vote
2answers
214 views

Installing Python module within code and running from ArcGIS Pro script tool?

I am trying to install a third-party Python package from within a Python script so that other users can run the script and the package can be installed and loaded without having to manually download ...
0
votes
1answer
135 views

Issues flattening row from a table python

I'm trying to merge duplicates rows using this Python script. After I run the script I get this error and the output just drop the duplicates and it doesn't merge any duplicate row. I want to create a ...
1
vote
0answers
103 views

Using Pivot Table in ArcPy?

I’m using a Python script to reproduce the Pivot tool in ArcGIS and when I run the script the output comes with many duplicates and this is an intended feature of the pivot tool. Nonetheless, I’m ...
0
votes
0answers
19 views

arcpy.MakeFeatureLayer no new layer added to TOC [duplicate]

Having issues with arcpy.MakeFeatureLayer_management within script tool since it's not adding layer to mxd. typically it would add the layer with its attributes selected, but when running within tool ...
0
votes
1answer
119 views

Creating tool from script using ArcPy gives error 000714

The script is fully functional, but I need to convert it into a tool which will allow the user to customize work environment, expression, name of shapefile, name title text, update date text ...
2
votes
1answer
103 views

Using ArcMap I want to add new Fields into a gdb using Python [duplicate]

I'm new learning as I go, I have read some of the Answers posted, and I've gotten this far, I was able to add a new field to a GBD, I wanted to have the Length be 50, but it created a field with 255, ...
0
votes
0answers
110 views

Write Excel values in to the attribute table of a shapefile in QGIS

I am using QGIS version 2.18.19. I have written a standalone script which converts a DXF file in to polygon shapefile. Now I want to write data into the attribute table of the polygon shapefile from a ...
2
votes
0answers
173 views

Adding feature class and applying symbology in ArcGIS Pro using ArcPy?

Using an ArcPy script run from a toolbox, I want to import a feature class from a geodatabase into an ArcGIS Pro 2.1.2 map and then symbolise that layer based on a lyrx file stored on disk. Here is ...
0
votes
0answers
117 views

Why is Loop in Python Script Tool Validation only Looping Once?

My Python Script tool (ArcGIS Desktop 10.2) has two getParameterAsText inputs. The first parameter is populated by the initializeParameters(self) module in the validation script which selects all ...
0
votes
1answer
12 views

Choosing Data Type of signature file for parameter in Python Script Tool for Maximum Likelihood Classification?

I am working on a script tool for a maximum likelihood classification and I would like to set the signature file as parameter. What data type do I have to choose in the "Add Script" dialog box in ...
1
vote
1answer
39 views

Set “MultiPatch” as feature class filter in arcpy scripts (ArcMap10)

As mentioned in ArcMap10.X documentation (http://desktop.arcgis.com/en/arcmap/10.3/analyze/creating-tools/programming-a-toolvalidator-class.htm), it is possible to set filters in tool parameters of ...