Page 1 of 1

Deleted Custom Source Template

Posted: 29 Apr 2022 23:38
by Chrisv
I did a really Dumb thing! And I don't even remember doing it, but the evidence is there.
I had two custom Source Templates that were very similar to each other. I brought both into my Project and started to use one of them. Then I did the Dumb thing. I deleting the wrong template in my Source Template Definitions editor. So, at this point, I have both templates in my Project and the Wrong template in my Source Template Definitions editor. I also did not make any Export files for any of them. Double Dumb!!
Is there a way to get the correct template from my Project into my Source Template Definitions editor?

Re: Deleted Custom Source Template

Posted: 30 Apr 2022 07:59
by Mark1834
Chris,

Download and run the Create Source Template Definitions plugin. That will create definitions for any templates that don't have them already. You can then delete any definitions that you no longer require.

Re: Deleted Custom Source Template

Posted: 30 Apr 2022 10:37
by Chrisv
Thanks so much, Mark! Worked perfectly!

Re: Deleted Custom Source Template

Posted: 30 Apr 2022 12:11
by cwhermann
Mark1834 wrote:
30 Apr 2022 07:59
Download and run the Create Source Template Definitions plugin. That will create definitions for any templates that don't have them already. You can then delete any definitions that you no longer require.
I was concerned with the plugin overwriting definitions already in the file, but if I understand your description of how the plugin operates, then I should run the Create Source Template Definitions on a regular basis to make sure any customized templates created since the last run of the plugin are added to the definitions file.
If I have template in the project that shows as “mod” does the plugin create a “new” Template? And how does it handle the the naming of the modified template, or should I use the sync/compare button. I am still trying to get my head around the concept of definitions in and out of the project and want to make sure I understand correctly the difference between the plugin and the sync/compare.

Re: Deleted Custom Source Template

Posted: 30 Apr 2022 15:47
by Mark1834
Curtis,

The key difference is that sync/compare acts on pairs of templates and definitions with the same name. The plugin creates a definition for templates with no definition. Therefore, it will not create modified definitions to match modified templates, providing that you do not change the name and collection.

If you are creating new or modifying existing templates, the better way is to create/modify the definition, not the template. That way, your definitions are always up to date, and changes can be cascaded down from definition to template by compare/sync.

It’s one of the more confusing features of FH7, but it helps to have the hierarchy in mind. Definition, Template, Source, in that order.