Add custom template at the template menu
Hi,
I would like to add my favourite template at the template menu (Studio): Tools→Templates→Template 1
But I'm unable to find how to do it.
Thanks
Manel
Comments
I think Studio manages this submenu's contents automatically as a most-recently-used list, and you can't directly control what gets listed.
But if I have misunderstood your question, and you're actually asking how to create your own template, then here is the doc link.
Hi John,
You understood me well.
But it's curious, after to run a Template, the list is never populated. I see always "Template 1", nevertheless , my "Add in" menu is populated...
I have searched the name using regedit
Add list is there:
Equipo\HKEY_CURRENT_USER\Software\InterSystems\Cache Studio\Recent Add Ins List
I can see also "Recent Template List n" from 0 to 6
Equipo\HKEY_CURRENT_USER\Software\InterSystems\Cache Studio\Recent Template List n
If you have something there, can you tell me the format, please ?
I will try to add it into my register
Thanks
Manel
That's odd. I just checked one of my Studios (2017.2.1) and it lists the templates I have used recently.
What does Help\About show your Studio version as?
I assume you have a document open in Studio when you look at that menu, because when no document is open it looks like this (both options disabled):

To answer your request for info about the registry entries, here's what one of mine looks like:

Hi John,
I have 2017.2.0 Build 740
I tested also others Studio version with same luck
Yes, I have one document open. Template 1 is enabled but it does nothing.
I tested also to populate "Recent Template List 0" and 1 but it does the same 8-(

So, the "Templates..." option brings up a dialog that shows all the templates available to you? And that you can run one of them from that dialog? But after running that template, when you go back to the menu it doesn't show that template in the menu's MRU list?
Yes to all.
I open a new document, then I open the Template dialog:
Then I select one Template an I run it:

I select one option:

I poputate the question:
And I press End. I get the code, but if I come back to the menu, nothing is there:

I don't know why this isn't working. Perhaps because you are running Studio in English but on a Windows instance with a different default locale?

But that is only a wild guess.
I wonder if any other DC readers have noticed templates not getting added to the MRU list.
Anyway, I suggest you ask InterSystems WRC for help.