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

learn more… | top users | synonyms

0
votes
2answers
51 views

How to get the parameter defined in one tool to another tool in same python toolbox?

This is what I am looking for: Create two tools in Python Toolbox: Tool1 and Tool2 (I am able to do that) I want to define a parameter in Tool2 whose value depends on parameter entered by user in ...
0
votes
0answers
19 views

How to dynamically create new parameters based on previously entered parameter in python toolbox?

This is what I am looking to create in a python toolbox: Create a parameter to get geodatabase (.gdb) file from the user. (the .gdb file has some number of feature classes) After user enters the gdb ...
1
vote
3answers
85 views

arcpy.mapping.MapDocument(“CURRENT”) fails when running python script in background as tool

The engineers I work with have requested an autosave feature for ArcGIS, so I thought I'd make them a python tool that routinely saves. The script works fine when run in the foreground, but fails when ...
1
vote
1answer
58 views

Select from a list of string variables in a custom Python ArcGIS tool?

I've made a few Python tools for ArcGIS lately and haven't had to use this idea in my tools until now. I am making a looong tool that will deal with 13 different districts worth of data. I want the ...
3
votes
1answer
59 views

Creating a ValueTable with a column that has dependency

I am creating a python tool which looks like the figure below. Input feature: It asks for a input feature class. Valuetable(Lookup tables): It has two columns - one for look up tables and another ...
1
vote
1answer
36 views

How to publish python toolbox with lots of tools in ArcGIS Server 10.3?

I have python toolbox with like 40 tools and I need a quick way to publish the whole toolbox. I found some instructions in the documentation, they state that every tool should be executed and their ...
1
vote
2answers
102 views

Creating tool in Python toolbox to export field list to Excel?

I am creating my first tool in a Python Toolbox (*.pyt) to export a list of fieldnames to Excel. I have the following bits of code: import arcpy class Toolbox(object): def __init__(self): ...
0
votes
1answer
65 views

Creating Python Toolbox (*.pyt)?

I would like to create a new shapefile based on input. My input is DATE parameter. This is my code for input parameter: param = arcpy.Parameter( displayName="TARIKH", name="date_feature", ...
0
votes
0answers
22 views

updateParameter() python toolbox

I can't update parameters in my Python Toolbox and I don't understand why. Someone can help me with this example code? class Tool(object): def __init__(self): self.label = "Tool" ...
2
votes
1answer
28 views

Searching for value in layer without opening MXD file?

As part of the validation for parameters of a Python toolbox, I need to check if the text in parameter #1 is exists in a layer in a MXD file selected as parameter #2. Currently, I use this code in ...
0
votes
0answers
22 views

Select Data in ModelBuilder Error 000622 and 000800

How to build a model takii way to avoid this error? I need to layer the missing tool is created automatically or miss it and extending those layers in MXD are available in gdb ... More specifically, I ...
4
votes
1answer
107 views

Python toolbox tool objects do not remember instance variables between function calls?

I am developing a Python toolbox, and came across a peculiar behavior: The tool objects does not remember any instance variables between function calls. Consider this code: import arcpy class ...
0
votes
0answers
21 views

Multi Input Python Toolbox in Arcgis

I use Python toolbox in arcgis, it is possible to add a multiple input file table? And is possible to filter input files allowed by extension?
0
votes
1answer
60 views

Is there a script to Python for Click to toggle selectable?

I cannot write a script using ArcPy (Click to toggle selectable). To make a layer unavailable for sampling! I just need to create a tool to automate several processes, one of them is the ability to ...
0
votes
1answer
33 views

TypeError: unsupported operand type(s) for *: 'float' and 'geoprocessing Layer object'

I am getting a rather unclear type error, and after searching online I cannot find any solutions that help. I am trying to create my own python toolbox for wifi router signal loss, and I am trying to ...
0
votes
0answers
29 views

How to build a raster populated with an equation in a python toolbox?

I am working on creating a python toolbox to solve for WiFi signal properties based on various inputs, and for the end result I would like to have the output in the form of a raster. I need this ...
1
vote
1answer
37 views

Python tools won't open when clicked on

I am creating a python toolbox within ArcGIS 10.3 and I am having issues opening it up in ArcMap. I have been editing it, saving it, and running it within ArcMap this whole time to test it little by ...
1
vote
1answer
67 views

Python toolbox - keep parameter value updated after re-altering parameters

I am writing a Python toolbox with (among other) 3 parameters: 2 boolean (check boxes) and 1 string. The string parameter's properties depends on the 2 booleans' value: If at least the first boolean ...
0
votes
0answers
39 views

Validating derived parameters for ModelBuilder and Python Toolbox?

I'm working on a tool in a Python toolbox and I'm running into trouble getting the output tables to work in ModelBuilder. The tool takes an input table view and ultimately uses the Table Select ...
2
votes
0answers
70 views

Updating Field Mappings Parameter on table selection in Python Toolbox?

I am building a python toolbox with ArcPy and would like to associate an input feature class parameter with a field mapping, so that once user selects the input feature class the field map populates ...
7
votes
1answer
302 views

Python toolbox works in ArcToolbox and in Python console, but not in ArcCatalog

I have a set of Python tools in a Python toolbox (.pyt). They are broken into multiple files and modules and have been functioning correctly, but now I'm seeing inconsistent behavior on multiple ...
0
votes
0answers
60 views

Configuring Python to avoid conflict with ArcGIS for Desktop (ArcPy)?

I am trying to find the best way to configure a new version of python in my computer (windows) so that I do not have any problem with the python version that I have with ArcGIS. Is there anyway to ...
1
vote
1answer
60 views

How can I programatically set the “Description” for a ArcPy Geoprocessing Service?

When I create a Python Toolbox (pyt), I set the name and description of the toolbox. When I create the parameters, I can set their name, type, default value, in/out, etc. Basically, everything that ...
1
vote
1answer
44 views

Field calculater in Python console from QGIS

I have some doubts in syntax of processing.runalg(qgis:fieldcalculator) in python console of QGIS. I want to create a new field in a shapefile and calculate this formula: [D_PATRICIA]*1000. ...
1
vote
1answer
89 views

Returning feature class from Python toolbox

I am trying to return a feature class (my sample data is a polygon fc) from a Python toolbox and cannot find any information about what I have to set to get it to work. This runs successfully and ...
3
votes
2answers
147 views

ArcGIS tool for graph analysis

I have a road network shape file. After creating Network dataset I get a graph with vertices and edges. I need to create a tool for ArcGIS (through a Python code) which enables to calculate depth of ...
0
votes
0answers
47 views

Problems with using python script in ArcGIS for Server 10.1

I have a geo-processing model that works perfectly in ArcGIS desktop (10.1) and successfully publishes as a GP Task to ArcGIS Server (10.1). Once I try to execute the GP task (either through a widget ...
1
vote
1answer
65 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
112 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
65 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
79 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
42 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
107 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
130 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
82 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
52 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
147 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
70 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
2answers
137 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 ...
3
votes
0answers
222 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
179 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
228 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 ...
2
votes
2answers
279 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
37 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
55 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
61 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
329 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
213 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
124 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
75 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 ...