Questions tagged [python-script-tool]

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

Filter by
Sorted by
Tagged with
1
vote
0answers
17 views

Subtracting data between features using ArcMap

I have a layer that contains feature classes that store optimal elevation & existing elevation values for a place. Right now the existing and optimal are stored in different features under the ...
1
vote
0answers
21 views

Customizing ArcGIS toolbox layout [duplicate]

I am trying to create a customized tool in ArcGIS using Python Toolbox. Does anyone know how I can change the appearance (for example, size of a textbox or position of a parameter) of a parameter on ...
-2
votes
0answers
33 views

Add output toolset to table of contents Python

When I run my toolset every time, the output does not appear in the table of contents. I have to import the output from outputfolder manually. I have tried this: arcpy.env.addoutputstomap = true but ...
0
votes
0answers
27 views

All Python scripts broken in ArcMap 10.7.1

I recently was attempting to run a Python script that requires the lxml package. I couldn't figure out how to use pip to install it as it always defaults to Python 3.x. So, as a work around I just ...
0
votes
2answers
51 views

I want to create composite band image through batch processing using ArcPy

I have multiple Sentinel 2a raster images in separated folders at same location, which means every image is in separate folder. Now I want to create composite band of each raster. I have written a ...
0
votes
2answers
36 views

Access attribute names and add new attributes in processAlgorithm

How can I access the layer attribute names of the selected layer? I have tried checking on Google but all the methods are mostly for the previous version and I am using py3 version. att = source....
0
votes
0answers
22 views

Manually scale polygon feature in QGIS

I want to manually scale selected polygon feature in QGIS so I don't need to set any parameters, just click on the feature and scale it moving the mouse. In ArcGIS there is a Scale tool. I want the ...
-1
votes
1answer
68 views

Making tool in ArcGIS from Python script

I was trying to run a tool based on my Python script. So in the script Stak118 is the name of the final output and i got the Stak118 as output in this case. But I would like the output in the tool to ...
3
votes
1answer
75 views

Calling ModelBuilder model from Python script using ArcPy

I updated the code in the script below per suggestion. I receive the same results as described in my original post, here... I have a very simple Modelbuilder model (ArcGIS Pro, v2.6) that has a ...
2
votes
1answer
68 views

Changing hard coded variable value to user input in Python script with ArcPy

I have exported "Con Tool" script from ModelBuilder. The model has two input parameters one is the DEM and the second is "Long Variable". When I run the model it executes perfectly ...
0
votes
1answer
37 views

mxd.SaveACopy fails to save file using Python script

I have been struggling to build a model using ModelBuilder and Python scripts. At the end of the model, I would like to write a script which saves the MXD file using the actual current time of the ...
1
vote
0answers
27 views

Outputting temporary feature layer from geoprocessing script tool to current map (ArcGIS Pro)

This is my first time attempting to create a script tool. I have gotten my script to work when running it in the Python window in ArcGIS Pro, however running from the script tool is slightly different....
0
votes
0answers
29 views

How to integrate a Python Script into Processing Modeler in QGIS

I have a model in QGIS and I've generated a Python Script to calculate the matching between two strings (Levenshtein Distance with the FuzzyWuzzy Package) for one of the OUTPUTS. #####################...
0
votes
1answer
65 views

If conditional for multiple raster in ArcMap10.6

I have a list of four rasters and i want to apply a lot of if then statements using Python in ArcMap 10.6. I was able get the result using raster calculator with Con statements and i tried to use the ...
1
vote
0answers
30 views

Renaming Attachments

So I've been trying to download and re-name my attachments. I have been successful on ArcMap HOWEVER, the python tool I've been able to use only downloads one attachment per datapoint. I have multiple ...
0
votes
0answers
19 views

Edit the default 'Extract Values' ArcGIS script tool input parameter display name?

Is there a way to change the default display name of the 'Extract Values' ArcGIS script tool input parameter? I would like to change the 'Raster' display name and the 'Output field name' text to ...
0
votes
2answers
64 views

Definition queries in Python Toolbox tools

I'm trying to set a definition query within a Python Toolbox tool in ArcGIS Desktop. The code below works when I run it in the ArcGIS Python window, but does not perform the definition query or ...
1
vote
0answers
61 views

ImportError: DLL load failed when running a script tool in ArcGIS Pro

I created a multiprocessing script that runs perfectly when running in an IDE (Spyder) but is giving me errors when running through the script tool in ArcGIS Pro. Here is the traceback: Running ...
2
votes
1answer
80 views

Checking Points within polygon and assigning value using ArcPy

How can I write arcpy code to determine if the points of a point feature class are inside polygons of a polygon feature class and write the result (true/false) to the point FC's attribute field? I ...
0
votes
0answers
52 views

ArcGIS pro Runtime Error: Cannot open shape file through Python Add-In

I am facing runtime error while running this Python script as an extension to ArcGIS Pro version 2.522081 I also checked for minor errors and typos in the script, have gone through the documentation ...
1
vote
0answers
22 views

How to use Boolean input in Arcgis with arpy? (Desktop edition) [duplicate]

So, my code goes something like this: haveopenvel = arcpy.GetParameterAsText(10) arcpy.AddMessage(haveopenvel) if (haveopenvel == True):#error openvelftsec = Raster(openvelftsec) arcpy....
1
vote
2answers
99 views

Using a Search Cursor to calculate a new field

I am new to ArcPy. What I am essentially trying to do is use ArcPy to look through a column in a table and if it is between a range to print a value in a new corresponding column. I assume I am going ...
0
votes
0answers
53 views

Create output folder for merge result of Model Builder on QGIS 3.10

I have export my model builder to python's script and now i would like to save the result to an created folder. But the folder name is based on a layer entity. Example: I have 3 layers (city, store, ...
1
vote
0answers
30 views

Problem creating a simple two-branch if-then-else logic (script tool) in ArcToolbox

I'm new to Arcpy and script writing and i'm trying to create a two-branch if-then-else logic based on the shapefile type of the input data. What I want to do is to write a script tool that executes ...
-1
votes
1answer
73 views

ArcGIS Pro Script Tool Validation Not Updating Values in Tool

I have an ArcGIS Pro toolbox tool based on a python script and am trying to have tool validation pre-fill values based on the location of the ArcGIS Toolbox location. Here is a screenshot of the tool:...
0
votes
0answers
21 views

Export Features by Unique Value Tool

I'm a new python user trying to build a script tool for an ArcPro project. The Tool will allow a user to select specific field data from a feature class and then export it as a new feature class to a ...
0
votes
0answers
38 views

ArcGIS Python script tool empty output

I have a script exported from ModelBuilder for a tool that import CAD file to geodatabase. When I run the code in a Python window in ArcMap it works just fine, and when I do using the model as well. ...
2
votes
0answers
53 views

Why do I get value of GDAL GetMaximum() different than that of numpy array max() for same image band?

Here is a code snippet from osgeo import gdal import numpy file = gdal.Open('DEMO.TIF') band = file.GetRasterBand(1) max = band.GetMaximum() if not min or not max: (min,max) = band....
0
votes
0answers
14 views

Automate Export Features from changed Layer

I'm using QGIS 3.10.2 A Coruna. I'm working on a project where I have a layer with different categories. I export each category on a regular basis (to shp and GeoJSON files) because others in my ...
1
vote
1answer
38 views

Split features script returning Python ERROR 000840: The value is not a Feature Layer

I am trying to split a feature layer by rows. I've previously some time ago been able to use the below script, however now when I use it, it returns: Python ERROR 000840: The value is not a Feature ...
0
votes
0answers
55 views

Extract related tables of a feature class to excel?

I have a feature class and a bunch of table connected to each other with relationships (please see the scheme of them down below). My goal is to extract the attribute table of fc as well as all ...
0
votes
0answers
38 views

Allow null values from Value Table filter list in Python toolbox parameter

I'm setting up parameters in a Python Toolbox and have a Value Table with three columns. Two of the columns have value lists for the user to pick from. I would like for the user to be able to choose ...
-1
votes
1answer
32 views

Using Select Layer By Attribute in Python Script Tool

I just want to try to use a Python script to select specific roads in my Layer called "Route_01_Shatin" and so I coded as below: arcpy.management.SelectLayerByAttribute('Route_01_Shatin', '...
2
votes
1answer
44 views

Giving user option to show report on screen or create text file using Python Script Tool of ArcPy

I have been working on this script tool in ArcGIS Pro. The following code is what I got so far to create a tool in ArcGIS Pro, connected to the script, that takes parameters from users (initially, the ...
0
votes
1answer
44 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
34 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
219 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
37 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
165 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
77 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
251 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
29 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
25 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
51 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
22 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
54 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
114 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
34 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
37 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
31 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 ...

1
2 3 4 5
9