Questions tagged [python-toolbox]
Python toolboxes are created entirely using Python in ArcGIS for Desktop and stored as *.pyt files
                328 questions
            
            
            
                1
            
            vote
        
        
            
                0
            
            answers
        
        
            
                110
            
            views
        
        
            
            
        Python Toolbox Record of Parameters and Parameter Setting Re-use
                    I am working on a python toolbox.
The following snippet is intended to serve a simple utility, in principal; I want each run of the script to export something containing a record of all parameter ...
                
            
       
        
            
                0
            
            votes
        
        
            
                1
            
            answer
        
        
            
                74
            
            views
        
        
            
            
            
        Metadata Import custom tool ArcGIS Pro
                    I'm troubleshooting this attempted custom metadata import tool
The latest is a curious error of deleting the output location upon completion...
Can anyone give a clue as to why or how to fix?
Here's ...
                
            
       
        
            
                0
            
            votes
        
        
            
                0
            
            answers
        
        
            
                38
            
            views
        
        
            
            
        Display Information on ArcGIS Pro Script Tool Interface
                    Recently, I worked on creating a script tool in ArcGIS Pro using the ArcPy module. I want one of my parameters to dynamically update coordinate system information like Project Tool. I did some ...
                
            
       
        
            
                1
            
            vote
        
        
            
                0
            
            answers
        
        
            
                50
            
            views
        
        
            
            
        Set parameterDependencies for GPSQLExpression inside GPTableView
                    I'm using ArcGIS Pro 3.3.0. I'm writing a Python Toolbox (.pyt file format). My tool needs to accept parameters for multiple input tables and an SQL expressions that is valid for each table.
Single ...
                
            
       
        
            
                1
            
            vote
        
        
            
                2
            
            answers
        
        
            
                109
            
            views
        
        
            
            
            
        Calling second custom tool w/in main tool ArcGIS Pro
                    I have two tools in an .tbx in ArcGIS Pro, ToolA and ToolB. I want to be able to call ToolB within ToolA. I need to keep them separate because I need to use ToolB independently in some cases but as ...
                
            
       
        
            
                0
            
            votes
        
        
            
                1
            
            answer
        
        
            
                88
            
            views
        
        
            
            
        Python Toolbox Parameter Validation Not running
                    I have a long and complex python tool. In brief, I can't seem to get the default values for my tool, or any parameter updates for that matter, to work through my UpdateParameters definition. ...
                
            
       
        
            
                -1
            
            votes
        
        
            
                1
            
            answer
        
        
            
                151
            
            views
        
        
            
            
            
        Returning value from ArcGIS Pro custom tool (.py)
                    How do we return a value from a custom .py tool, so that when I run the tool in another script, it will return a value (such as a number, string, or tuple)?
Notice in the execute class function, I ...
                
            
       
        
            
                3
            
            votes
        
        
            
                0
            
            answers
        
        
            
                59
            
            views
        
        
        Setting valid input types in Python Toolbox
                    When adding a python script tool to ArcToolbox, you can specify valid input types using the dropdown "Data Types" on the parameters tab in the tool properties.
In Python Toolboxes you can ...
                
            
       
        
            
                2
            
            votes
        
        
            
                1
            
            answer
        
        
            
                294
            
            views
        
        
            
            
        Running Python Toolbox in Background
                    I would like my Python Toolbox to be processed in the background. On this ESRI Technical Support Page, it states "Since ArcGIS Pro is itself a 64-bit application, a separate process for ...
                
            
       
        
            
                1
            
            vote
        
        
            
                0
            
            answers
        
        
            
                94
            
            views
        
        
            
            
        Python toolbox in ArcGIS Pro for buffer distance
                    I am currently to make a Python toolbox in ArcGIS Pro to search and count for tourist attraction/activities that I can decide at some distance to at least two infrastructure facilities, and also using ...
                
            
       
        
            
                0
            
            votes
        
        
            
                0
            
            answers
        
        
            
                65
            
            views
        
        
            
            
        Why is first output of ArcPy tool only one running?
                    I am attempting to write a python tool that uses the create routes, locate features along routes, and make route event layer tools (in that order). Essentially this is a three step process that I want ...
                
            
       
        
            
                1
            
            vote
        
        
            
                1
            
            answer
        
        
            
                144
            
            views
        
        
            
            
        Setting up parameters for linear referencing tools in ArcPy
                    I am attempting to write a python script to utilize the Create routes, Locate features along route, and Make route event layer tools from the Linear Referencing tool box. The ultimate goal is to write ...
                
            
       
        
            
                1
            
            vote
        
        
            
                0
            
            answers
        
        
            
                112
            
            views
        
        
            
            
            
        Values in second columns of GPValueTable Parameter reset after tool is ran
                    I am trying to create a .pyt python toolbox tool in ArcGIS pro and the issue I'm running into is that Values in second columns of GPValueTable Parameter reset after tool is ran.
The parameter created ...
                
            
       
        
            
                1
            
            vote
        
        
            
                1
            
            answer
        
        
            
                124
            
            views
        
        
            
            
            
        Importing CSV file in ArcGIS Pro ArcPy script using relative paths
                    I have a CSV file in my toolbox folder. I would like to import the CSV file into my arcpy script to run in conjunction with my arcpy script.
Folder structure:
src
data
my_csv.csv
mytoolbox.pyt
How ...
                
            
       
        
            
                0
            
            votes
        
        
            
                1
            
            answer
        
        
            
                90
            
            views
        
        
            
            
            
        Create a new GPFeatureLayer from data frame
                    I am a complete newbie to ArcGIS/ArcPy. I am creating a new Python Toolbox, that reads in a GPFeatureLayer, and also should return one. I read in the values of a GPFeatureLayer row by row. Then I ...
                
            
       
         
         
         
         
        