Python toolboxes are geoprocessing toolboxes that are created entirely using Python in ArcGIS 10.1 (and later) for Desktop

learn more… | top users | synonyms

1
vote
1answer
39 views

How do you use Windows folders as acrpy Parameters

I am having problems trying to perform simple folder management operations in an ArcGIS python toolbox. First here's some code snippets (I have left out all of the stuff that does not pertain to this ...
0
votes
0answers
24 views

Python toolboxes missing (Can't use ArcGIS 10.2.2 toolboxes)

I was trying to use Hot Spot Analysis Toolbox on ArcGIS 10.2.2 but this error message appears: updateParameters Syntax Error Runtime error Traceback (most recent call last): File c:\program ...
0
votes
0answers
38 views

Creating a custom toolbox and python script to analyze fire data

My goal is to create both an ArcGIS toolbox and an independent python script to do the analysis of fire occurence in the Southwest (by season) through ArcMap as well as independently with python. I ...
1
vote
1answer
26 views

How apply error messages to a python toolbox that prevent my tool from running with bad parameters?

This is a continuation of my question here: Point and Polyline I tried making this question easier to follow. My tool accepts two main parameters - a continuous centerline and a table (or a feature ...
1
vote
1answer
33 views

pop() method returns error with feature class list in ArcGIS python toolbox

I am trying to do something very simple, but I'm pulling my hair out with this one. In an ArcGIS python toolbox, for one of my tools I ask the user for a list of feature layers, using the following ...
2
votes
1answer
66 views

How can I use updateParameters to handle both points AND polyline feature layers?

I'm using ArcMap 10.2.1 and Python 2.7.5. I would like my updateParameters to enable and disable fields based on if a feature is a point or a polygon. If the point is selected then I need the ...
2
votes
0answers
69 views

ArcGIS python toolbox: GPFeatureLayer parameter “loses” symbology type

I'm pretty new at ArcGIS python toolboxes. Here is one problem I've been fighting with for a while. I want to create an output layer (GPFeatureLayer) with a specific symbology (GRADUATED_COLORS) and ...
1
vote
1answer
49 views

Set GPLinearUnit type parameter default based on input spatial reference (Buffer Example)

Within a .pyt python toolbox I'd like to have a parameter of data type GPLinearUnit get a default value based on an input Feature Class (FC). The standard Buffer (Analysis) tool works as a great ...
0
votes
1answer
34 views

GPRecordSet in python toolBox

I would like to use a GPRecordSet in my python toolBox as an output parameter. This geoprocessing will be share on my ArcgGIS server and in my ArcGIS portal. I haven't see any documentation on how to ...
1
vote
1answer
97 views

Running Python toolbox tool both standalone from other tools within same Python toolbox?

I have created a python toolbox for work that has two tools inside. These tools use the toolbox template and so have a init, getParameterInfo, etc. I want to be able to run one tool both stand alone ...
1
vote
0answers
58 views

How can I extract the measurelength, highmeasure and lowmeasure of routes in ArcGIS

I'm trying to create road Routes in ArcGIS, which traditionally have been created using workstation. I've managed to write a Python script to do this, however, unlike ArcInfo, the attributes ...
1
vote
3answers
72 views

Calculate field management not working within customized Python tool in ArcGIS

I am trying to make a custom made Python Script tool which I would like to use in Model builder. I am using the arcpy.Calulate_field_management function (simple reclass function as an example), but it ...
2
votes
0answers
116 views

Arcgis arcpy toolbox multiply files: error - module object has no attribute

I have a big .pyt script (python toolbox) and now i trying split it to many files (1 file - 1 tool). In single .pyt file everything works perfectly, but when file is splited i get this message: ...
0
votes
1answer
84 views

Python Toolbox Parameter List Update/Refresh?

I am using a python toolbox in ArcGIS 10.2.2 and want a drop down list of all the versions for the person reconciling to choose from. (And I do not want to include dbo.DEFAULT and DS.Draft). But this ...
2
votes
1answer
108 views

ArcGIS Python Toolbox Parameter Filter.List ValueList Delete/Remove for Reconciling Versions

Does anyone know if and how you can remove a value from a parameter filter list? In my case, I am using a python toolbox in ArcGIS 10.2.2 and want a drop down list of all the versions for the person ...
1
vote
2answers
152 views

Permanently add a python toolbox to ArcToolbox

I've written a python toolbox for my company containing several scripts to speed up various repetitive tasks. Each time we want to use it we have to open ArcToolbox, right click and select "Add ...
1
vote
0answers
26 views

Is it possible to call a complicated query as a stored procedure within a geoprocessing service?

I need to implement a searching geoprocessing service. A part of the query should be very complicated and use oracle text. My service should support spatial search too. 1) I am thinking of ...
1
vote
0answers
42 views

ODCostMatrix in a Python Toolbox, field mappings questions

I am trying to create a Python Toolbox in ArcGIS to accomplish Network Analyst tasks. Globally the toolbox has to create and solve an ODCostMatrix Layer. The users has to enter Origins and ...
1
vote
0answers
53 views

Using choice of one parameter to populate column of multi-value control ready to have values for second column chosen?

This relates to my earlier question Can one parameter choice on Python toolbox tool set Display Names of other parameters?, but attempts to describe the requirement, rather than my attempted solution, ...
4
votes
2answers
197 views

Can one parameter choice on Python toolbox tool set Display Names of other parameters?

I would like to be able to create a Python toolbox tool (or a Python script tool) where a choice made from the first parameter (Category in the images below) changes the Display Name of other ...
2
votes
1answer
177 views

Tutorial on creating python toolboxes?

I've done the ESRI training: Creating Python Toolboxes Using ArcGIS 10.1 but is there anything more in depth? Since VBA is no longer supported in ArcMap 10 and up I'm trying to convert a cross section ...
4
votes
0answers
100 views

Configuration problem anaconda python in ArcGIS

I used Eclipse with PyDev to create a script in Python (windows 7 x64). My code runs perfect when I start the run in Eclipse, but when I add it as a Tool in ArcGIS 10.1, I have the following problems: ...
0
votes
1answer
56 views

Using valueAsText, giving me unicode data instead of a list

I am learning Python to create toolbox right now. When I'm trying to get the parameter, using valueAsText, the date returned is unicode instead of a list that I was expecting. This is the code that I ...
5
votes
1answer
384 views

Set default values for value table in Python Toolbox tool

I created a Python Toolbox tool to reorder fields and create a new feature class with the reordered fields. The tool works nicely and I am able to use a value table to let the user arrange the fields ...
0
votes
2answers
131 views

Select value from list in Python toolbox

within a Python toolbox in ArcGIS 10.2 I fill a parameter with a list. parameters[0].filter.list = myList It is essentialy a list of strings and will give the user a range of predefined years. Later I ...
-2
votes
1answer
107 views

Cause of KeyError in Python Toolbox of ArcPy?

This question arises from Performing Point Distance analysis using Basic level license of ArcGIS for Desktop?. I basically copied and pasted PolyGeo's answer and formatted it into a python toolbox ...
2
votes
1answer
172 views

How I can do event with two clicks using python add-in wizard?

How I can do event with two clicks using python add-in wizard, I have found a way to do event with one click by adding a New Tool in the wizard, but I need "first click To copy the attributes from ...
0
votes
1answer
74 views

How to group tools within a Python toolbox in ArcMap 10.2

I have created a simple Python toolbox at work for use in ArcMap 10.2. It is used by multiple members of staff so I'm hoping to make it as simple to use as possible. It currently only contains two ...
3
votes
2answers
323 views

How do updateParameters and updateMessages Interact in a Python Toolbox?

I have been developing a Python toolbox which consists of 6 parameters. I have received immense amounts of help on this through StackExchange through the following posts: How to Determine if a Layer ...
7
votes
2answers
199 views

How to Determine if Layer is a Point

I have been working on a Python toolbox which contains 6 parameters. I am a little lost on all of the different data types available in ArcMap (it seems like there's hundreds of them!). However, one ...
2
votes
3answers
182 views

How to Change Parameter Type from Optional to Required

I am creating a Python toolbox with 5 parameters. One of the parameters is a Boolean/checkbox, which checks if the user wants to edit the labels of a shapefile. What I would hope to do is if the user ...
1
vote
2answers
51 views

Optional Parameter Not Being Optional in a Toolbox

I have been creating a toolbox that contains 4 parameters. Two of my parameters involve editing the labels of a shapefile. I want to have these two parameters as optional: if the user does not want to ...
6
votes
2answers
310 views

Can ArcGIS Pro use Python toolboxes written for ArcMap?

Can the new ArcGIS Pro use existing ArcToolbox scripts? Or to put it another way, will I have to rewrite my existing ArcMap toolbox & python scripts if I want them to run in ArcGIS Pro?
6
votes
1answer
70 views

Ordering tool display within a Python Toolbox

I have created a python toolbox containing a number of classes which define the various tools within. As these classes are part of a workflow in which the tools are to be executed sequentially using ...
1
vote
1answer
127 views

Esri Python Toolbox(pyt) corruption in ArcToolbox.dat

Symptoms: Open ArcCatalog and all tools within Python Toolbox(pyt) have a red-x error next to them claiming that "Arcpy module has no attribute Parameter" Close ArcCatalog Delete ArcToolbox.dat file ...
2
votes
2answers
168 views

ArcGIS - Getting Python toolbox to function properly

as the header says, I do have a problem in getting my toolbox to function the way I want it to. In the following my parameter definition is shown, where from I would expect to get only feature classes ...
2
votes
1answer
80 views

Parameter Not Being Included in Tool

I have been attempting to make a Tool within a Toolbox with four different parameters. My code consists of the following: def getParameterInfo(self): """Define parameter definitions""" # ...
2
votes
2answers
80 views

Python Tool Not Opening

I know that this is definitely an ambiguous question. However, I initially had my Python toolbox working great. I then wanted to have additional functionality with it and added some more coding. ...
1
vote
1answer
313 views

geoprocessing service via python toolbox script, local versus server paths

So I feel like I'm missing a very basic concept when it comes to publishing python toolbox scripts to a geoprocessing server. I've scoured the ArcGIS online help (not saying I've read everything, and ...
1
vote
1answer
137 views

How to generate a choice list (dropdown) in a toolbox that will allow the user to select a field in a csv as input?

I need to input a csv as parameter 1. Parameter 2 should be a dropdown displaying the various fields (the headerline) where I can select a column to use for geoprocessing. Param1: c:\my.csv ...
1
vote
0answers
29 views

getParameterInfo datatype for creating new feature class

I'm having trouble finding a suitable datatype that allows the user to browse to a .gdb and create a name for a new feature class. DEFeatureClass wants an existing FC to write to. Using ...
1
vote
1answer
139 views

How to print log from FME when run from python script?

I created a Spatial ETL ToolBox in ArcCatalog. When I run the tool from ArcCatalog I see log massages. But when I run this tool from a python script, the logs do not print to the python console. ...
1
vote
1answer
33 views

Short list of .prj options in .pyt

I'm tasked with creating a .pyt to distribute across our office and field computers (state geological survey) for converting .gpx to features but constraining the choice of projections/datums to seven ...
2
votes
1answer
90 views

Can Python toolboxes be used with ArcObjects GeoProcess.AddToolbox?

Can Python toolboxes be used with ArcObjects GeoProcess.AddToolbox? I'm trying to execute a tool in a Python toolbox (.pyt) from .NET. First I call: GP.AddToolbox(@"C:\path\to\MyToolbox.pyt") ...
1
vote
0answers
105 views

Cause of Error 000308: Invalid Field Type when batch running ArcPy script?

This is my first post on this site. I am using ArcGIS 10.2 for Desktop. I wrote a simple script in the form of a python toolbox to calculate the speed of travel between consecutive entries of a ...
1
vote
1answer
59 views

Add multiple fields to attribute table by python, with a prompt window for parameters

I know how to add field to arcmap shapefile using Python: import arcpy arcpy.env.workspace = "H:\pythonexercise\NZL_rds\NZL_roads.shp" arcpy.AddField_management("NZL_roads", "LENGTH", ...
0
votes
2answers
191 views

How to add multiple feature classes from TOC as input by Model Builder?

I am tasked to create a tool using Model Builder. The tool requires input of multiple feature classes that are added in the Table of Contents of ArcMap. The user will then be able to select multiple ...
1
vote
1answer
125 views

Python Toolbox (.pyt) Tool Output Layer Name

How can I manipulate the TOC display name of my output parameters when using a Python toolbox (.pyt) Tool class. I tried adding a symbology layer, however this has no affect on the TOC name. Is it ...
2
votes
1answer
121 views

How to find missing dependencies in a distributed ArcGIS Python toolbox?

I am developing a Python Toolbox that uses a few external libraries (ogr/gdal, matplotlib, shapely, reportlab among others) which files I have directly copied in the same folder as my toolbox .py, as ...
2
votes
2answers
245 views

Specify geoprocessing service connection at publish

I have a geoprocessing service published from a tool written in Python and contained inside a Python toolbox. I need to be able to publish this service in multiple environments (production, staging, ...