Questions tagged [tool-validation]

Provides custom behaviour for Python script tools and Python toolboxes of ArcGIS for Desktop via ArcPy code

Filter by
Sorted by
Tagged with
0 votes
1 answer
35 views

Toolbox For ArcGIS Desktop 10.5 not working for all values

I'm trying to build a toolbox, and I would like users to be able to select two possible values from two lists. The first list is stored in a JSON, that I access using HTML. The second list is also a ...
user avatar
1 vote
1 answer
95 views

Getting simple ArcGIS Python toolbox parameters to be enabled or disabled on load

I am attempting to get a simple ArcGIS Python toolbox (pyt) set up that allows me to present a subset of appropriate parameters based on selection from a 'parent' parameter. There are 7 (0-6) total ...
user avatar
  • 1,325
0 votes
1 answer
14 views

Extracting the datasource of a feature layer selected in a tool parameter in the tool validation script in ArcGIS Pro

I have a tool with a 'Feature Layer' input parameter where the user can select a feature layer from the TOC or a feature class by browsing. I would like to create an error message where the user is ...
user avatar
  • 560
1 vote
1 answer
37 views

Adding message error box when parameters do not satisfy some conditions

I have 3 parameters in my tool, including para0, para1, para2. These parameters will be the user's inputs. I would like to display a message box if para0>para1 or para1>para2 or para2>para3. ...
user avatar
  • 257
2 votes
1 answer
43 views

Getting zmin zmax of a raster parameter in a tool validation in ArcGIS Desktop 10.7 toolbox Python script

I am developing a Python tool (my first one). The tool has 3 input parameters: a raster z min z max I am trying to get automatically z min and z max after the user specify the raster using the ...
user avatar
1 vote
2 answers
244 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:...
user avatar
  • 450
1 vote
1 answer
344 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 ...
user avatar
1 vote
2 answers
112 views

ArcPy Tool Validator error with defined parameter value

I am using ArcMap 10.3.1. I have two parameters for my script tool. The first is the type of product to be created, the second is the scale of the product. Digital Map / No scale required are the ...
user avatar
  • 25
0 votes
2 answers
51 views

How to Prevent Final (Unnecessary) Selection Box in Script Tool Input Parameters via Validation Script?

Using Arc 10.2.2. My script tool's interface has its first parameter populated by the following snippet of validation script: def initializeParameters(self): # Source Folder dir_f = r'Q:\...
user avatar
  • 1,177
1 vote
0 answers
50 views

Drop down for Unique Values for a ArcGIS Custom Tool [duplicate]

Can an ArcGIS Tool have a drop down field with unique values derived from a list? For example, user selects a table, the tool will then find all of the values in field X and populate a drop based on ...
user avatar
  • 4,365
0 votes
0 answers
45 views

Enabling a parameter in a field map in a Python script

I am creating a customized version of the Find Identical tool in Python. The script works just fine, but there's one thing that I can't seem to figure out. In the standard ESRI Find Identical tool, ...
user avatar
0 votes
1 answer
252 views

Create default ArcToolbox parameter with current folder location of ArcToolbox .tbx

I have an ArcToolbox tool I created based on a script I wrote that needs an input parameter that equals the folder location of the ArcToolbox .tbx file from which the tool runs. I am distributing the ...
user avatar
  • 450
1 vote
0 answers
35 views

Collapsing arcpy script parameter categories by default? [duplicate]

Within an arcpy script, I've set up categories using the style sheet found in the ArcGIS installation folder. I have a couple categories created within the tool validator. .... def ...
user avatar
  • 346
1 vote
2 answers
34 views

Toggle field in custom Arcpy script

I've got a script wherein I'd like to toggle (gray out) certain fields, unless a file has been specified. In the above image, I'd like Field A, B, and C to only be editable once a file has been ...
user avatar
  • 346
0 votes
0 answers
159 views

Why is Loop in Python Script Tool Validation only Looping Once?

My Python Script tool (ArcGIS Desktop 10.2) has two getParameterAsText inputs. The first parameter is populated by the initializeParameters(self) module in the validation script which selects all ...
user avatar
  • 1,177
1 vote
1 answer
125 views

Forcing Python Script Tool Parameter Input Field to Begin at Specific Folder?

I'm setting up a Script Tool (Arc 10.2.2) where the first parameter will be a CSV file chosen by the user, always from the same folder. When the user clicks the first parameter's windows navigator ...
user avatar
  • 1,177
2 votes
1 answer
513 views

ArcGIS Toolbox Python Script Validation: extracting field names from a multi-value list of feature classes

I am writing a python script within an ArcGIS toolbox (not a Python Toolbox), that takes as input, a multivalue parameter of feature classes from which I would like to populate a second parameter with ...
user avatar
  • 1,292
2 votes
0 answers
59 views

Updating Value in Toolbox using ArcPy? [closed]

I'm quite new in ArcPy. I'm able to get a list of values from a Layer Feature and for specific field, however I would like to edit that attribute after is displayed on the screen. Because the value ...
user avatar
0 votes
1 answer
302 views

Accessing composite data type parameter when validating parameters in Python Toolbox?

I have a simple tool with two parameters: a boolean (just to tick or untick it) a composite data (where I can choose an output location - either a folder or a feature dataset). I am unable to access ...
user avatar
  • 431
1 vote
1 answer
451 views

List layers in dataframe as parameters in script validation

I'm trying to do some script validation in a tool I wrote. The user first selects a dataframe from the current mxd. This parameter works fine. When the user makes this selection, the next parameter, a ...
user avatar
  • 136
0 votes
1 answer
190 views

ArcGIS Tools Script Validation...filter list from domain values

Anyone know if it's possible to build filter list from a set of coded domain values I have in a file geodatabase? I have a script that works taking values from a table and correctly building a filter ...
user avatar
3 votes
1 answer
135 views

ArcGIS Tool Script Validation...browser window default location for multivalue option box

I am trying to do some Tool Validation for a script I'm writing in ArcGIS 10.2. I have a Multivalue File field which the user can browse to a directory to select the files they require to run. When ...
user avatar
2 votes
1 answer
625 views

Tool validation - setting error message

I am writing a tool within Python Toolbox that has two parameters: param0 = arcpy.Parameter( name="a", displayName="A", datatype="GPFeatureLayer", ...
user avatar
  • 431
1 vote
1 answer
189 views

Validating user input against a range using tool validator in arcpy script?

I have a script that takes user input. For the "Project ID" input field, the user can only enter a 4 character ID. The ID may include letters and numbers, but is typically a 4-digit number. I'm trying ...
user avatar
  • 13
5 votes
1 answer
1k views

How to only ask for a input if checkmark has been checked? (arcgis script tool)

I am currently working on a python script, that i want to convert to a tool. I have managed to set it up in Arcgis as a tool, but it does not behave exactly as i want it to: What i want it to do ...
user avatar
  • 437
1 vote
2 answers
2k views

Creating drop down of derived fields from CSV using ArcPy?

I'm trying to create a drop down menu in a Python script in ArcMap where one input is a CSV and the other input is a drop down of the headers in that CSV. Is this possible at all? In the image above,...
user avatar
  • 346
3 votes
1 answer
85 views

Performing operations on Python Script tool startup

I want to perform a selection on tool startup in order to obtain a choice list for parameter derived from selected features. Code kind of works, as I get my choice list with correct values, however it ...
user avatar
  • 484
2 votes
1 answer
304 views

Maintaining sorted unique values in value table of ArcGIS Pro Python script tool validation?

I have created a Python script tool in ArcGIS Pro 1.4.1 which has tool validation. The fourth parameter on my tool dialog, which is of type string with multiple values allowed, after choosing some ...
user avatar
  • 63.6k
1 vote
1 answer
547 views

Editing validation code for Python script tool in ArcGIS Pro using IDLE?

I created and successfully tested a Python script tool, for which I included some validation code, in ArcGIS Pro 1.3.1. To write the validation code I right-clicked on the Python script tool in its ...
user avatar
  • 63.6k
1 vote
1 answer
281 views

Using OS module in the updateParameters of Python Toolbox

I want to set the default value of one parameter based on another one. The files might be moved between different locations, but their relative locations would be the same. For example, file A is at C:...
user avatar
2 votes
1 answer
354 views

Select All in the Python script tool doesn't work

When I click on the Select All, it doesn't work (using ArcGIS 10.3.1 Advanced). How can I fix this? The Python Script for this model is listed below, from the online source rather than my creation. ...
user avatar
6 votes
1 answer
574 views

Non-existent polygon inside polgyon

I inherited some shapefiles that I've been trying to clean up in QGIS and Grass. The shapefile is a large area covering a watershed, the person who digitized it, did so in small chunks without using ...
user avatar
2 votes
1 answer
341 views

Deriving input based on other parameters in Python script tool?

I have a folder and it contains two feature classes, e.g., a.shp and b.shp. The script tool created has two parameters. The first one is the model location, and the second one needs a feature class (a....
user avatar
2 votes
2 answers
323 views

Problem getting value from arcpy script tool with validation code driven drop-down: code window popup on tool execution

I am attempting to provide the user a drop down list of field values based on a predefined shapefile or table. The string value users choose then needs to be taken by the script tool for use later in ...
user avatar
  • 146
3 votes
1 answer
352 views

Controlling Categories in Script Validation Tools - Expanding Groups By Default

The validation tab in your script tool properties allows you to put parameters in categories. The help states: Put parameters in different categories. Categories are expandable window shades with ...
user avatar
  • 566
1 vote
1 answer
592 views

Setting default value for Python script tool properties using ArcPy?

I have a model folder which contains several shapefile, but only one named oil.shp. Is there a way to automatically set the default value for the Add Oil Layer based on the model folder and the ...
user avatar
1 vote
1 answer
565 views

How to load data in a record set from a table?

I'm developing a python tool in ArcGIS 10.3 .I want to show selected record that are result of the select by attribute. Is it possible to show the selected records in the record set ? import arcpy ...
user avatar
  • 5,777
2 votes
1 answer
202 views

Setting Python script tool parameter Type based on another parameter Value? [closed]

In my script tool case, I've used the validation tool to make parameter[4] enabled only if parameter[3] equal a certain value, but i need to make this parameter[4] required only if enabled. the ...
user avatar
1 vote
2 answers
724 views

Creating a drop-down list for arcpy script tool

I have written the following script but I cannot manage to create the drop-down list for the variable "select" (select=arcpy.GetParameterAsText(3)). Any suggestions? # Script arguments inputRaster = ...
user avatar
  • 11
0 votes
1 answer
571 views

Filtering parameters in ArcPy Python script tool avoid repeating selecting same value in sequence parameters?

I am trying to make a tool in which there are many sequence parameters (based on the same field of a feature class), and each of them is multi value to make a user choose from a check a list one or ...
user avatar
  • 59
2 votes
1 answer
1k views

Creating multi-value choice list of field values and using selected for select in ArcPy?

I am using ArcMap 10.3. I have created a multi-value choice list following this blogpost: https://blogs.esri.com/esri/arcgis/2012/07/16/generating-a-multivalue-choice-list/ I changed the validation ...
user avatar
3 votes
1 answer
75 views

drop list from field to execute SQL request

I'm trying to create a python script that allows a selection attribute based on the name of a field in the attribute table of a layer. I would like to configure my script such a way that permits the ...
user avatar
1 vote
0 answers
63 views

Feature Layer parameter showing only Polygon Shapefiles

I have created a Python Tool in ArcGIS where most of the paramaters musts be ONLY Polygon Shapefiles. You can also look on my previous question: Filter the Feature Layer parameter in Python Script ...
user avatar
  • 163
1 vote
1 answer
113 views

arcpy custom script tool to find and replace floats and ints?

I created a custom script tool that can find and replace text. See the image link for what my tool interface looks like too, and I'll point out the find and replace fields are both set to string in ...
user avatar
1 vote
1 answer
58 views

Tool validation to filter out OID and geometry fields?

I have a python script tool (arcpy) in a standard toolbox that edits data in fields, but I want some code in tool validation that would make sure that when the user gets to the field parameter, the ...
user avatar
4 votes
2 answers
2k views

python script tool validation checkboxes to radio boxes?

I am trying to build a tool in arcmap, which uses radio buttons in its gui. Since I read, that radio buttons are not supported, I figured, it couldn't be too hard changing the behaviour of simple ...
user avatar
  • 133
2 votes
0 answers
66 views

Why does my Validation Script continue to run when adding the result to the map? [closed]

I am in the process of developing a python script that creates a list available imagery for our project areas that would then allow the user to choose which imagery source they would like to add to a ...
user avatar
1 vote
0 answers
773 views

How do you use the setErrorMessage(message:string) within the ToolValidator Class?

The Programming ToolValidor Class ArcGIS Help menu states that: the following method: setErrorMessage(message:string) "Marks the parameter as having an error (a red X) with the supplied message. Tools ...
user avatar
2 votes
1 answer
129 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 ...
user avatar
  • 495
3 votes
1 answer
2k 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 ...
user avatar
  • 9,567