Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

Questions tagged [python-script-tool]

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

34 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
1answer
54 views

Performing operations on tool`s startup

I want to perform a selection on tool startup in order to obtain a choice list for parameter derived from selected features. Code kinda works, as I get my choice list with correct values, however it ...
3
votes
0answers
166 views

Adding layer with ArcObjects from Python script tool?

I would like to load an AFR file into a data frame in a currently open MXD and the IMap.AddLayer function is not working as expected if the data frame in which to load the AFR file is activate. And I ...
3
votes
0answers
1k views

Get Unique Field Values Within Python Script Tool

Using ArcGIS 10.2.2 and Python. I have a script that currently counts the number of points (representing crimes) in each zip code area, and writes that value to a new column in the FC that contains ...
2
votes
0answers
267 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 ...
2
votes
0answers
62 views

Adding script tool to ModelBuilder in ArcMap?

I have create a script and want to add it to the model I have provided. The code is: import sys, string, os import arcpy import numpy Table = arcpy.GetParameterAsText(0) Field1 = arcpy....
2
votes
0answers
127 views

Field Mapping in Custom ArcMap Script

I'm writing a script which takes, for its first two parameters, feature classes (or tables). For the third parameter, I want to provide the user with a field mapping option similar to what ArcMap uses ...
2
votes
1answer
57 views

drop list from field to execute SQL request

I'm trying to create a python script that allows a selection attribute based on the name of a field in the attribute table of a layer. I would like to configure my script such a way that permits the ...
2
votes
0answers
126 views

Reading feature class attributes with or without quotes in ArcPy?

I'm working on a script that clips a batch of feature classes by a selection made in another feature class. The way it works is by reading the clip feature fields, then allowing the user to select the ...
2
votes
0answers
275 views

Error ET Geowizard Clean Polygon() takes no arguments (3 given)

I want to clean polygon feature classes with ET Geowizards (clean polygon) because I cannot find any tool within ArcMap (ArcInfo) that does the same. I have really small gaps within the polygons (but ...
1
vote
1answer
65 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
0answers
33 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
0answers
10 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] ...
1
vote
0answers
29 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
2answers
195 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 ...
1
vote
0answers
83 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 ...
1
vote
0answers
141 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 ...
1
vote
0answers
181 views

gpTask: ERROR 000735 Value is required (Input KML, DataFile)

I have a Python script tool running perfectly on the ArcGIS server. Trying to run the tool in a web application (JS API 4.6) with the same input KML-file (published on a publicly available webserver). ...
1
vote
0answers
386 views

Pythonaddins Message Box encoding problem

I've been trying to create a MessageBox with accented characters. To do so, I used the decode() and encode() functions. The code is part of a Python Toolbox. pythonaddins.MessageBox("ééàà".decode('...
1
vote
0answers
51 views

Feature Layer parameter showing only Polygon Shapefiles

I have created a Python Tool in ArcGIS where most of the paramaters musts be ONLY Polygon Shapefiles. You can also look on my previous question: Filter the Feature Layer parameter in Python Script ...
1
vote
0answers
464 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
0answers
176 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 ...
1
vote
1answer
115 views

Modify a Python script to one that uses RasterDomain_3d fuctionality - and writes resulting shapefiles it to one

As I am not very experienced with Python I need your help. I managed to modify a Script (that has been posted here Get boundary of raster image as polygon in ArcGIS Desktop? by https://gis....
0
votes
1answer
19 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 ...
0
votes
0answers
21 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
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
0answers
63 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
0answers
119 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
33 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
0answers
124 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 ...
0
votes
0answers
122 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
0answers
134 views

Creating script tool for definition query using user input

I have a map document with about 10 layers that I would like to create a query definition script tool to use that takes a user input as a parameter and then executes the tool. The script looks like ...
0
votes
0answers
270 views

Multiprocessing Script Tool doesn't crash but will not function

I've made created a script that uses multiprocessing to break up a very large point dataset into pieces and extract values from 2 different rasters to them. When I tested it using the command line ...
0
votes
0answers
45 views

Debugging Python script tool that contains space in location using PythonWin from ArcCatalog?

I have created a python script that is on a network drive, and in a folder that has spaces in the location e.g. \\server\Team name\scripts\myScript.py I have added the script to a script tool in ...
0
votes
0answers
88 views

Create table of type info or dbase has not nullable fields

[updated] In a script tool i use the CreateTable_management function to calculate some values as a result of an intersection of two polygon layers. The script uses a Parameter to specify path und name ...