Reply To: Can I use a template to create/change contents of another

Product Compare Forums Multi-Edit Support Can I use a template to create/change contents of another Reply To: Can I use a template to create/change contents of another

#5267
ReidSweatman
Participant

Then you’ve got it made. The globals are only persistent within a single session, and don’t survive shutdown or session/project switches, but within that limitation, they’re, well, global. If you kick up the System pane and skim down the string global list to the “T”s, you’ll spot (assuming you’ve run templates that use the <-PROMPT> metacommand during your current session) one or more globals of the form !TMPGPS_yourtext (for “Template Global Prompt String”, I would think). Click on one of them, and you’ll recognize the text you typed in at that prompt dialog.

If you have any interest in getting deeper into exactly how templates work, what tricks you can play with them, and what their limitations are, nearly all the code is in Template.s and Template.sh. The _TmpDecode() macro is particularly interesting, as that’s where most of the template metacommands are interpreted. The heavy use of names and aliases can be a bit bewildering, but they’re almost all defined in the corresponding header file. Oh, and in case it wasn’t obvious, system macros beginning with underscores are intended for internal use only–which doesn’t mean you can’t mod them to your heart’s content. But, of course, work on a copy. ;)