Select to view content in your preferred language

Global Variables for Labeling and Annotation Expressions in ArcGIS Pro

96
1
a week ago
Status: Open
Labels (1)
MarcelSt-Germain
Frequent Contributor

Title: Add support for global variables in ArcGIS Pro labeling and annotation expressions
Description:
Currently, each labeling or annotation expression in ArcGIS Pro is isolated. Users must hard‑code project‑wide parameters (such as units or language options) into every individual script. This creates unnecessary duplication and makes maintenance difficult, especially in projects with many layers or frequently regenerated datasets.
Proposed Enhancement:
Introduce a mechanism for defining global variables at the project or map level that can be referenced directly in labeling and annotation expressions. For example:
- UNIT = "m" or "ft" to control whether heights are displayed in meters or feet.
- LANG = "EN", "FR-EN", "EN-FR" to control multilingual label formatting.
These variables would be stored once (in the project, map, or a dedicated configuration panel) and accessible in all label expressions via a simple syntax, e.g. [GLOBAL.UNIT].
Benefits:
- Consistency: Ensures all layers use the same unit and language settings without manual edits.
- Efficiency: Reduces the need to duplicate constants across dozens of scripts.
- Maintainability: Changing a single global variable updates all labels instantly.
- Flexibility: Supports multilingual projects and organizations working in both metric and imperial systems.

1 Comment
RTPL_AU

Similar to:
https://community.esri.com/t5/arcgis-pro-ideas/add-a-central-variable-list-to-pro-to-use/idi-p/15968...

This is something used in other tools (Fusion360) to great effect. 
It can go very deep and improve many 'manual' features in Pro.

@KoryKramer   Marcel lists more examples of how it can be used.