Questions tagged [python-toolbox]

Python toolboxes are created entirely using Python in ArcGIS for Desktop and stored as *.pyt files

Filter by
Sorted by
Tagged with
2
votes
1answer
34 views

Generating multiple page reports (Page Per Report) using ArcGIS Pro & Python

I have reached a point a little bit outside of my knowledge frame. Python. I found that I can create multiple page reports with Python in ArcGIS Pro by combine 2 reports together. I am following this ...
2
votes
0answers
26 views

Layer no longer renders on map after running custom Python Tool

Please note: I believe this is a display issue, since the data isn't disappearing from anywhere but the lines on the map. When I run a custom Python Toolbox in ArcGIS Pro 2.7.0, the layer that was ...
0
votes
1answer
45 views

Creating a Toolbox in ArcGIS Pro that can export results into an image format [closed]

How can I create a Toolbox in ArcGIS Pro that can export results from point and line feature classes and combine them into just one image format (e.g. .jpg, .png).
0
votes
1answer
15 views

JoinFeature attribute_relationship syntax (arcpy)

I am building a Python Toolbox for ArcGIS using Python 3 with ArcPy. I have two tables that I need to relate based upon an attribute. The information on the documentation for the JoinFeatures() ...
2
votes
1answer
20 views

Writing program to get datatypes of certain fields and then do some work on that but SearchCursor makes everything tuples

I am trying to write a program to get the datatypes of certain fields and then do some work on that but SearchCursor makes everything tuples. How do I bypass this situation and get the actual datatype ...
2
votes
1answer
46 views

How to access a “geoprocessing value object” when a row in ValueTable is empty (Python Toolbox)

I have a tool with a ValueTable consisting of two columns - text (GPString) and layer (GPFeatureLayer). When I fill the parameter with desired values (field names in the first column, some feature ...
1
vote
0answers
23 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 ...
1
vote
1answer
44 views

ArcGIS Reclassify fails in Python Toolbox

I'm trying to build a Python Toolbox to analyze submarine landslides. Among other things I want to run the aspect tool and then reclassify the aspects into groups with a 45 degree interval. Therfore I ...
2
votes
1answer
188 views

Error: local variable referenced before assignment in ArcPy

I have a directory with contain others subdirectory with shapefiles. I access to the shapefiles using a for, but then when I ned to use the variable shape that I get this message: UnboundLocalError: ...
0
votes
0answers
24 views

How to get ArcPy parameter of type Folder shown in Textbox?

Writing an ArcPy toolbox for ArcGIS Pro I am having the issue that the declaration of the following code does give me a browse button and the associated textbox. However, using the browse button, and ...
2
votes
1answer
81 views

Updating ValueTable parameter of ArcPy Python Toolbox tool

I have a shapefile and I want to calculate multiple fields using the GP ValueTable parameter. The script loads field names from a layer, then I should delete rows I don´t want to calculate and then I ...
2
votes
1answer
128 views

Publish geoprocessing service from Python Toolbox to ArcServer 10.7 from ArcMap

I have been trying to publish a python 'Hello, World!' sample geoprocessing service. I have ArcMap 10.7.1 and ArcGIS Enterprise Server 10.71. In Arc Map I started with a new Python Toolbox, and ...
1
vote
1answer
32 views

FeatureClass error message when running ArcGIS Python tool

I am trying to remove rows from a feature class that is included in a python tool in ArcGIS 10.7. I have run the code as an independent Python script and it runs fine, but when I run the following ...
0
votes
1answer
28 views

Set geodatabase as outfolder in ArcGIS 10.7 when creating tool in Python toolbox

I am trying to specify a file location for an output file when creating a python toolbox tool, but the tool continues to output the file to the default geodatabase. I have tried to set the env....
0
votes
1answer
107 views

ArcGIS Python Toolbox expression on Portal (Web Tool in Web App) problem

I wrote a GP tool (Python toolbox) with Expression using GPSQLExpression with updateParameters that manipulates the expression, it works fine on ArcGIS Pro (2.4), but it becomes a String Input on Web ...
0
votes
2answers
76 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
votes
1answer
42 views

Orfeo ToolBox is not working properly in QGIS 3? [closed]

I have installed QGIS 3 and Orfeo ToolBox in it. The toolbox is not working properly. Is there any way to use it in ArcGIS 10 with Python 2.7?
1
vote
1answer
43 views

Accessing the feature layers inside a geodatabase using ArcPy

In an Python Toolbox I have a parameter that gets the location of a geodatabase input.gdb which has several layers of input data. contextual_data_param = arcpy.Parameter( name="context", ...
1
vote
1answer
245 views

How to recompile a Python toolbox after a change to an imported module

If an ArcPy toolbox imports modules that are edited, recompiling the modules from the .py source code to the .pyc code that actually runs is a challenge. Deleting the .pyc files doesn't work because (...
0
votes
0answers
51 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
vote
1answer
75 views

Python Toolbox Value Table Parameter - getting separate outputs for different column inputs

I'm using a Value Table as a parameter for a Python toolbox so the user can input two related attributes. I'm struggling with how to use the values the user inputs as separate values/parameters. The ...
2
votes
1answer
43 views

Is there a text box parameter type for Python Toolboxes?

The Calculate Field tool has a text box for code. Is there a parameter type for Python Toolboxes for this type? There's String but it's just one row of text. in_str = arcpy.Parameter( ...
4
votes
0answers
88 views

Set default values when value is added to value table in Python Toolbox tool

Similar to Set default values for value table in Python Toolbox tool, I'm trying to populate a value table with default values. However for the linked question the value table is populated once an ...
0
votes
1answer
295 views

Defining parameters for Python Toolbox tool in ArcGIS Pro

I have been posting similar questions recently, but I found a template code for a Python toolbox and I would like more help. I am trying to create a tool in ArcGIS Pro that takes parameters from ...
2
votes
0answers
50 views

Variable type for Value Table parameter in Modelbuilder?

I've created a python tool with a multivalue input box (parameter type: GPValueTable). The box is small and will contain long strings. I'm hoping to be able to add values to the input box with ...
1
vote
0answers
89 views

Using Python dictionary as parameter and variable in Python Toolbox tool of ArcPy [closed]

I'm building a feature class merging and comparing toolbox in arcpy, ArcGIS 10.7. I have a working command line utility with fixed featureclass values, and now I'm building this toolbox, I just copy ...
2
votes
1answer
110 views

Parameter dependencies based on two datasets in Python toolbox

I am setting up the parameters in a Python toolbox. I have a parameter that I would like to list fields based on a user input feature class. I am wondering if it is possible to list fields based on ...
2
votes
1answer
187 views

Python Toolbox Value Table values and list inputs

I am trying to create a Value Table I will use to create a field mapping object. First column will represent the target field, second column carries the source field. The first column is populated ...
1
vote
1answer
110 views

List fields in parameters from Fc list in script validation using arcpy in arcgis

I am trying to list fields from a feature class list in script tool validation. First user selects the data frame from the list then FC populates in next box and fields of the FC in next box. I have ...
0
votes
0answers
54 views

Using script parameter validation in ArcPy

I am developing a script to Add, Delete, and Update rows within a table. The script basic function works well using InsertCursor and UpdateCursor. My questions or troubles come when I attempt to use ...
1
vote
1answer
240 views

arcpy.Parameter : how to create “The interactive feature input control”?

I am using ArcMap 10.5, but help pages I am referring are the same as in 10.7. I am trying to make a GP tool within Python toolbox with kind of selection input: user selects features in ArcMap ...
4
votes
2answers
260 views

Python Toolbox - Only update parameter when specific parameter changes

I'm creating a Python Toolbox. One input is a workspace and the second is a list of feature classes and tables. The list of feature classes and tables is generated once the workspace is input by the ...
2
votes
1answer
96 views

Calling a Class from Another Within a Python Toolbox

Using the example below, both ToolOne and ToolTwo have two parameters each, and are independent functions in their own right, but also form the basis for a chain of functions for an output. I am ...
1
vote
0answers
117 views

Field Mappings control doesn't show the Add Input Field in the context menu of a Python Toolbox

I’m trying to build a Python Toolbox which uses a Field Mappings control (GPFieldMapping parameter). For some reason I don’t manage to get the same behaviour of the Field Mappings control as in the ...
2
votes
1answer
245 views

Unable to load layers created with Processing Toolbox PyQGIS 3

I figured out that besides from the python editor within QGIS, the layers that I'm creating with a Processing Toolbox are not saved and displayed in my .qgs projects. --> see image: 1) what I get ...
0
votes
1answer
46 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): ...
2
votes
1answer
139 views

Getting parameters of Python Toolbox tool to appear in ArcGIS Pro?

I can't get the parameters of my tool to show up in ArcGIS Pro 2.1 Because of my work I can't put my exact code here, but I'll put the skeleton of what I'm doing and hopefully someone can see what I'...
3
votes
2answers
130 views

Saving Python objects into memory for repeated use of Python toolbox?

I have made a Python toolbox which processes relatively large polyline feature class (millions of features), builds a network graph from it as dictionary of lists, and depending on user selected ...
1
vote
1answer
165 views

Deriving field parameter from table parameter in Python Toolbox?

I'm trying to derive a Python Toolbox parameter from another parameter. I'd like to have a tool which determines fields from an input table and applies the list as a filter to a second parameter. This ...
4
votes
1answer
112 views

Limiting Input Parameter to only File Geodatbase in Python Toolbox?

I've been working with ESRI Python toolboxes for a while but I'm still having difficulties setting an input parameter as a "DEWorkspace" and using the parameter filter to make it so only file ...
0
votes
0answers
35 views

What analysis tool I can use to identify the relation between points and areas

I want a binary result for each purple point in this map, i.e. whether in or out od the blue polygon areas? In this case, one is in and the other is out. What analysis tool in ArcGIS Pro (also arcpy ...
4
votes
2answers
525 views

arcpy.GetParameterAsText not passing arguments to script?

I have been working on an ArcGIS Python script tool which takes the co-ordinate system from an input raster and reprojects a vector to the same co-ordinate system. The script works fine when i hard ...
0
votes
2answers
115 views

ArcGIS 10.5 Python toolbox problem SelectLayerByAttributeERROR 000358: Invalid expression Failed to execute

I am trying to create a .pyt that find and select an object in an specific layer but I have a problem. I'm working on the Desktop version 10.5 and actually the code is this one: def getParameterInfo(...
1
vote
2answers
702 views

Python toolbox documentation from within pyt file

Python toolboxes are a great way to create custom, GUI toolboxes for ArcGIS without actually interacting with the GUI (since everything can be defined within the pyt file). Regrettably (and ...
1
vote
1answer
99 views

Manually modifying ArcGIS Server Geoprocessing Parameters Data Type?

In ArcGIS 10.5, when I publish a Python Toolbox result as service, the parameters such as GPRasterDataLayer become GPString if these parameters are unfilled when running the toolbox on Desktop. This ...
1
vote
0answers
75 views

ArcPy Script Tool multi-value re-order buttons

I'm trying to set the values of one control (Multi-value, data type: string ) to another parameter control (Multi-value, data type: "any value" which produces a drop down with grid for items entered ...
0
votes
1answer
311 views

MultiValue Selection with MultiValue Input

I made this Python Toolbox as a practice run for a larger project I want to do as I am new to python toolboxes. While this was successful I am not able to the result that I want. I want to be able to ...
1
vote
1answer
59 views

Creating tfb file in Python Toolbox?

What tool does: Simply creates tbf file from raster extent. What is the problem: I ran toolbox in ArcMap 10.5.1 and ArcGIS Pro 2.2.4. When I run it as standalone script it is working just fine. I ...
0
votes
1answer
97 views

Checking for raster coverage within polygon feature class using ArcPy?

I'm writing a Python toolbox and would like to build in a check for raster data within the user-supplied area of interest. This piece of code works most of the time: if (str(arcpy....
0
votes
1answer
126 views

Encoding in Python toolbox?

My Python toolbox uses a function (code below) to save values to a CSV file. When I was using the same code in a Jupyter notebook, saved records were properly encoded (I am dealing with Polish letters ...

1
2 3 4 5 6