In #Template(name,description),Private,Family(sets) the sets are basically Clarion or ABC, or others, but there doesnt appear to be any symbol in which to extract this info.
I see in the shipping templates, some hidden prompts which had created %AppTemplateFamily where they are assigned either Clarion or ABC, but thats it, it appears to be a work around to the situation that there is no way of finding out the base template from a symbol, or am I wrong?
I should add, I can find out what the template set is from parsing various symbols like %Application, and %ActiveTemplate to see is there is an ABC or Clarion encapsulated in brackets/parenthesis, but I really wanted to find out what the base template or main template was from another template.
Detection of which chain (ABC or Clarion) is somewhat complicated by how far back you want to go. Over the years it’s gotton easier, but old code to support older clarion versions is still in play in some cases.
But assuming “something modern” (which I think includes C6), all the templates (ABC, Clarion, Ipserver) declare a variable in global scope , %AppTemplateFamily - see Abchain.Tpl for an example. Other templates can test for this (VarExists) and use it.
If you are generting new template chains I would strongly suggest following this pattern (of including an %AppTemplateFamily global prompt.)
Looking at the data I can get out of the various symbols at different sections, ie #Application/#Program aka Global level, and #Module/#Procedure levels the VarExists(%symbol) and then parsing seems to be the only way.
I havent tried VarExists() with an %EmbedIdentifier yet, I’ll give that a go and see what happens, but what you have suggested is what I’m having to use for now.