Question Manel Trèmols · Apr 20, 2018

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

John Murray · Apr 20, 2018

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.

0
Manel Trèmols  Apr 20, 2018 to John Murray

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

0
John Murray  Apr 20, 2018 to Manel Trèmols

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):

0
John Murray  Apr 20, 2018 to Manel Trèmols

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

0
Manel Trèmols  Apr 20, 2018 to John Murray

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-(

0
John Murray  Apr 20, 2018 to Manel Trèmols

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?

0
Manel Trèmols  Apr 23, 2018 to John Murray

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:

0
John Murray  Apr 23, 2018 to Manel Trèmols

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.

0