Select to view content in your preferred language

Make Text in Layout Contents Pane Reflect the Actual Text Content

263
3
10-16-2025 10:55 AM
Status: Open
Labels (1)
JamesPoeschel
Frequent Contributor

Currently, when you add text to a layout in ArcGIS Pro, the Contents pane automatically names each new text element as “Text 1,” “Text 2,” and so on.

It would be very useful to have an option for text elements to automatically reflect the actual text string typed on the layout — for example, a text element saying “Smallwood Drive” would appear in the Contents pane as “Smallwood Drive” instead of “Text 3.”   In this example, I could quickly identify all the roads in my contents to group them together.

I noticed this is already the case in illustrator for the basemap reference road name features. I don't need it to say Text 1, Text 2 since I already know it's a text item due to the 'A' icon, it'd be more useful to have the content reflected in the name.

Benefits would include:

- Improved Organization: Easier identification of text elements in the Contents pane.
- Enhanced Collaboration: Facilitates teamwork by making layouts more intuitive.
- Time Efficiency: Reduces the need for manual renaming of text elements.

Perhaps this could be a toggle or default setting under Layout options — e.g. “Auto-name text elements based on content.”

3 Comments
JeffBarrette

Hello @JamesPoeschel ,

As a stop gap prior to this idea being considered by the layout team, you could use a simple Python script to automate the process.  Paste the following in the Python window (be sure to edit the layout name):

p = arcpy.mp.ArcGISProject('current')
lyt = p.listLayouts('LAYOUT NAME GOES HERE')[0]
for txt in lyt.listElements('text_element'):
    txt.name = txt.text

 

Note, this would need to be tested very thoroughly with your own layouts.  A few problematic situations that immediately come to mind are 1) long paragraph text elements, 2) dynamic text elements, and 3) text elements that have identical strings will still be forced to have unique names etc.

Jeff - arcpy.mp team

RTPL_AU

@JamesPoeschel

This will be handy but needs a checkbox or something at the time when you create a text object. 

When using some of my templates I want the text object to keep its name e.g. 'Imagery Source' but use the text from some new objects I add in.

 

@JeffBarrette  Thanks for that - we tend to think of scripts doing data things but so much of the layout can be managed!

@KoryKramer   this also intersects the project-wide variable list that we were talking about.  Have the Text Object name be able to accept a variable (e.g. X), use the text content in another (Y). Then X= Y will show the text content as object name or you can assign whatever you want to X for a unique object name. 

JamesPoeschel

@JeffBarrette Thank you so much! That is convenient enough, and very quick to run. I appreciate the easy code snippet

@RTPL_AU Youre definitely right about forgotting that arcpy can manage layout items!