Help with graph titles and how to write a procedure to rename multiple titles at once

I am writing a procedure that makes graphs for many different variables. On each graph I want to include a title that is the file name. What I have looks something like this:

Display Temp vs Time(secs)
TextBox/C/N=text0/A=MC "File_Name1"

Display Pressure vs Time(secs)
TextBox/C/N=text0/A=MC "File_Name1"

Display Altitude vs Time(secs)
TextBox/C/N=text0/A=MC "File_Name1"

When I load in a different file I want to change the titles from File_Name1 to File_Name2. Is there any way to write something into my procedure so that when I change the title of one, all the other ones will change to match? I am using this procedure to make around 20 graphs, and don’t want to have to change each title by hand every time I use a new file. Thanks,
BH
You could have the textbox reference a global string variable. For details, execute:
DisplayHelpTopic "Other Dynamic Escape Codes"


For most purposes, it is simpler and cleaner to just write a procedure that updates the textboxes using the same command you used to create the textboxes but with a different file name.

To target the TextBox command to a particular graph so that it works regardless of which window is active you need to use the /W flag, like this:
TextBox/C/N=text0/W=Graph0 "File33"


Put the /W flag first when using TextBox in a Macro, Proc, or on the command line:
TextBox/W=Graph0/C/N=text0 "File33"

--Jim Prouty
Software Engineer, WaveMetrics, Inc.