Approximate reading time: 4 minutes
We introduced several enhancements in ArcGIS Pro 3.1 to make geoprocessing more efficient and customizable to suit your needs. This blog outlines some enhancements we made to help you improve your productivity, including:
- Field list settings menu next to every field parameter to control if the fields are listed by names or aliases and their order
- Python commands are formatted with multiple lines and named keyword arguments to improve readability and meet Python standards
- Size and position memory for tools opened in a floating window
- Calculate Fields (multiple) tool supports an optional SQL Where Clause to add more flexibility when calculating multiple fields in one operation
Sound interesting? Keep reading to learn more about each topic.
Field list settings menu
Geoprocessing tools include a field list settings menu next to all field parameters. The options in this menu change how fields are sorted and displayed, allowing you to select the correct field easily, even if it’s in a long list.
Gone are the days of scrolling endlessly for the correct field. Reorganize the field order as you prefer; you can use the original field order or sort alphabetically from a to z (ascending) or z to a (descending). Also, you’ll never forget the field aliases versus names—the menu allows you to change between displaying field names or aliases. The menu’s sorting and display choices are stored in your user profile and remembered the next time you use a field list.
Python commands have improved formatting and readability
The syntax for the Copy Python Command, Send to Python Window, and Save As Python Script commands are formatted into multiple lines with named keyword arguments. This new format aligns with modern coding styles and improves the code’s readability. Even when a tool has many parameters, you will always know which value matches which parameter, making the code easy to read and adjust.
This new format is available in all copy, send, and save Python code options, including:
- Copy Python Command from a tool’s Run menu or history entry’s context menu
- Send To Python Window from a history entry’s context menu
- Save As Python Script from a history entry’s context menu
Additionally, ModelBuilder’s export to python option also uses named keyword arguments in its generated Python code.
Note: if you want the script to retain the old format, hold down the Shift key while clicking the command.
Size and position memory for tools opened in a floating window
ArcGIS Pro 3.1 remembers the size and position of geoprocessing tools opened in a floating window per tool. This memory is saved in your user profile, so it applies to all floating tools in any project. ArcGIS Pro will always open a closed floating tool dialogue in its last used position and size. And if you adjust the height and location of multiple tools, ArcGIS Pro will remember that adjustment independently for each tool. This feature helps you personalize your experience in ArcGIS Pro when working with multiple floating tools and reduces the time spent on resizing and repositioning.
Calculate Fields (multiple) tool supports an optional SQL where clause per calculation
The Calculate Fields (multiple) tool is a great tool to know about and use when performing multiple calculations. It allows multiple calculations in one data update operation, so the performance is much better than running multiple sequential calculations. In ArcGIS Pro 3.1, the tool supports an optional SQL Where Clause to streamline your workflows that involve multiple calculations based on various conditions. In the tool’s Fields parameter, you specify multiple sets of fields and calculation expressions. Now, you can specify an SQL expression in the Where Clause column to apply that calculation only to a subset of records that match the specified criteria.
For example, use the Where Clause to build a simple reclassification calculation to classify counties as urban or rural, depending on the population density. Counties with a population density greater than or equal to 1000 are urban, and less than 1000 are rural.
To perform this calculation, in the Fields parameter:
(1) Choose the field you wish to use; in this example, use “UrbanRuralType”, which is a text field
(2) Set the Expression as ‘urban’
(3) Specify the Wһere Clause with the SQL expression: popdens>=1000
(4) Repeat the steps above by adding another set in the Fields parameter. But change the Expression to ‘rural’ and the and the Where Clause to popdens<1000
Summary
We strive to improve your geoprocessing experience with every software release. We hope you will upgrade to ArcGIS Pro 3.1 and take advantage of these new features to improve your productivity and workflows.
Your feedback and ideas are integral to improving user experiences in ArcGIS Pro. If you are looking for new features or tools not currently available in ArcGIS Pro, drop by our Geoprocessing Ideas page to submit your ideas for future releases.
Article Discussion: