* Search & replace in Role sentence templates

Questions regarding use of any Version of Family Historian. Please ensure you have set your Version of Family Historian in your Profile. If your question fits in one of these subject-specific sub-forums, please ask it there.
Post Reply
User avatar
JohnLiddle
Platinum
Posts: 44
Joined: 24 May 2006 21:48
Family Historian: V7
Location: Backwell, North Somerset

Search & replace in Role sentence templates

Post by JohnLiddle »

I expect I'm just in my normal Pooh Bear of very little brain mode, but how do I use Edit>Find & Replace or the Search & replace plugin to change Role sentence templates?

This is necessary because FH still does not import roles cleanly from TMG and every female role sentence is pre-pended with "$!&", which is the demarcation indicator used by TMG to separate the male and female role sentences.

Apologies in advance if this has been asked and answered before.
John Liddle
Backwell, North Somerset - "Where the cider apples grow"
User avatar
tatewise
Megastar
Posts: 28341
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Search & replace in Role sentence templates

Post by tatewise »

Unfortunately, that is not possible with those commands, because they only operate on the Project database.
The Tools > Fact Types customisations, like most other customisations, are held elsewhere.

Check which Fact Set those Sentence Template definitions are applied to.
Then use Windows File Explorer to open C:\ProgramData\Calico Pie\Family Historian\Fact Types\
If it is the Standard Fact Set then use \Standard\Standard.fhf
Otherwise, find the Fact Set .fhf file in \Custom\ folder.

Open the .fhf file in a plain text editor such as Windows Notepad and use its Edit > Replace... command.
Make sure it is saved as a .fhf file and not a .txt file.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
JohnLiddle
Platinum
Posts: 44
Joined: 24 May 2006 21:48
Family Historian: V7
Location: Backwell, North Somerset

Re: Search & replace in Role sentence templates

Post by JohnLiddle »

Mike - thank you so much for that.

My Customisation files are stored in a different place (I don't store data on my C: drive), but the process is as you described and was eminently successful.
John Liddle
Backwell, North Somerset - "Where the cider apples grow"
avatar
TennGen1900
Silver
Posts: 9
Joined: 07 Feb 2023 02:13
Family Historian: V7

Re: Search & replace in Role sentence templates

Post by TennGen1900 »

Hmm. I have a question about this (and maybe since this is an old post, it might not apply to ver. 7 which is what I have). I tried looking for the Fact Set file of "TMG Import" which is where all of my TMG facts went, as confirmed within FH7 on the Tools--Fact Types menu. Even though I just made modifications to some of the TMG sentences from within FH7 yesterday, (and "saved") the only TMG Import fact set I can find shows a modification date from Nov. 2022 and cannot find anything that was modified in 2023. I've used the search function within Windows Explorer to search my entire hard drive, and it doesn't find any .fhf files modified in 2023, not even the Extended or Standard Fact Type lists. So I'm truly puzzled. Any suggestions? The TMG Import fact set seems to have been initially created when I did my first import (followed by multiple re-imports as I continued to make modifications within TMG before "officially" converting (and re-importing again) to FH7. Maybe that has something to do with it?
User avatar
tatewise
Megastar
Posts: 28341
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Search & replace in Role sentence templates

Post by tatewise »

Firstly, why do you need to find the TMG Import fact set outside FH?
If everything is working fine in FH V7 it is best left well alone.
The earlier postings were to fix a particular problem that could not be dealt with easily inside FH V7.

I suspect your TMG Import fact set is listed with the suffix (project) in the Tools > Fact Types... dialogue.
That means it is local to the Project and the .fhf file is held within the Project .fh_data\Fact Types\ folder.
It will get created afresh with every new Project imported from TMG.
See FH Help page Work With Fact Sets.

The global fact sets that apply to all Projects are held in C:\ProgramData\Calico Pie\Family Historian\Fact Types\
But C:\ProgramData\ is by default a hidden folder and so I suspect it is excluded from searches.
See FHUG Knowledge Base Family Historian Program Data Folder.

You say you modified some TMG Sentences. I guess you mean the Sentence Template definitions in the TMG Import fact set via Tools > Fact Types... and the Edit... button.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
TennGen1900
Silver
Posts: 9
Joined: 07 Feb 2023 02:13
Family Historian: V7

Re: Search & replace in Role sentence templates

Post by TennGen1900 »

When I imported from TMG I made the Sentence Templates apply to all projects, so it was in the global fact sets, as you described. What I was unaware of was that the Program Data folder was a hidden folder. I found the file I needed to modify using the information you provided and the link to the Family Historian Program Data Folder webpage. Thank you.

The problem I was trying to solve was that many of my TMG sentences had role:FIRST=Grantor (or whatever the Role was) which was only giving the first name of the individual. I needed to change most of them to just role=Grantor so it would print their full name. Thus the topic of this post in the forum, "Search and replace in Role sentence Templates" - was exactly what I was wanting to do. It still appears that the method proposed above - using a text editor such as Notepad to search and replace within the .fhf file is still pretty much the only way to do this when there are many changes to be made? Or is there another way to do this "inside" FH7? Thank you again for the help.
User avatar
tatewise
Megastar
Posts: 28341
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Search & replace in Role sentence templates

Post by tatewise »

I'm glad you found the .fhf file and resolved your problem.
Currently, I think that is the only way to make such repetitive changes to a customisation file like that.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
Post Reply