Page 1 of 1
FTM to FH - Places/Media/Descriptions
Posted: 13 Oct 2022 13:22
by McHooty
Afternoon All
In FTM 2017 I had photos of many buildings linked to Places with an accompanying description or comment.
My import to FH has correctly carried across the Places showing the number of links to Facts

- Places.png (164.01 KiB) Viewed 1369 times
, but the photos are not linked to the Place (but again, they are to Facts)

- Churches.png (149.96 KiB) Viewed 1369 times
and the descriptions are listed as UDF's.

- Descriptions.png (244.64 KiB) Viewed 1369 times
I could slowly sort this place by place, but I just wondered if there was a shortcut I could use.
Thanks in anticipation.
Re: FTM to FH - Places/Media/Descriptions
Posted: 13 Oct 2022 14:03
by tatewise
Is this related to the same
Multimedia Import From FTM (19619) in Jul 2021?
There are two issues to resolve:
- Move Media from Facts to Places
I notice that some Place records exist for both the Church and the Churchyard in the same location. Is that deliberate?
The Media all seem to be for just the Church and never the Churchyard.
It will need a custom Plugin to search through all Facts and move any linked Media to the associated Place record taking care not to duplicate any Media links. To what extent does the Title of the Media need to match the Place name?
Is that Plugin something you could attempt or will you need it written for you?
*
- Correct _TEXT UDF
Assuming that is the only occurrence of the _TEXT tag then it is probably easiest to edit the GEDCOM file.
Make sure you have a GEDCOM backup, although the automatic FH Snapshots should be OK.
Close FH and use a plain text editor such as Notepad to check that the Media records are like this:
0 @O14130@ OBJE
1 FILE Media\Churches\St Andrew's Church, ...
2 FORM jpg
2 TITL St Andrew's Church, ...
2 _TEXT The church had a clock ...
If so then in Notepad replace 2 _TEXT with 1 NOTE throughout.
However, if 2 _TEXT is not last after 2 FORM and 2 TITL then that won't work.
Re: FTM to FH - Places/Media/Descriptions
Posted: 13 Oct 2022 17:15
by McHooty
Hi Mike
Thanks for your response. This issue is not related to my previous enquiry.
Part 1
Places for Church & Churchyard is a conscious decision by me, and yes on the screenshot the media was just for the Church, but I've checked and it's not always the case.
The title of the media is a shortened version of the Place name. I've tried to be consistent in using 1st and 3rd parts of 5 part Place layout, but there may be aberrations.
Never written a plugin, but I may give it a go. I know where to come to for help if I need it.
Part 2
_TEXT UDF
I've had a look and unfortunately there is always a 1 _KEYS PICTURE entry after the 2_TEXT so it looks like a manual edit on that anyway

- 164155.png (20.08 KiB) Viewed 1337 times
Worth an ask though.
Thanks for the suggestions
Re: FTM to FH - Places/Media/Descriptions
Posted: 13 Oct 2022 18:29
by tatewise
Part 2
The 2 _TEXT to 1 NOTE replacement is absolutely fine as it meets the criteria that I specified.
The order of 1 NOTE and 1 _KEYS is unimportant.
Part 1
For a first Plugin, this is a rather tricky adjustment, but see how you get on and I'll help as soon as I can.
Re: FTM to FH - Places/Media/Descriptions
Posted: 13 Oct 2022 18:35
by McHooty
Ok, that's good news at least. I can cope with that.
Just tested positive, so work on plugin is likely to be put on hold
Thanks
Re: FTM to FH - Places/Media/Descriptions
Posted: 17 Oct 2022 12:17
by tatewise
I've found time to write the Plugin needed to move those Fact Media to the Place records.
See attached Move Media From Fact To Place Version 0.1 Date 17 Oct 2022.
It relies on the Fact Media name and the Place name having the same first 9 characters, but that can be changed.
Once a Media record has been linked to the Place record any further identical Media are not linked.
The Media are deleted from the Facts.
It produces a Result Set of all the Place records and newly linked Media.
First try it on a copy of your Project to check it behaves correctly.
Re: FTM to FH - Places/Media/Descriptions
Posted: 17 Oct 2022 18:53
by McHooty
Hi Mike
That's very generous of you.
I'll take a look over the next few days, and no doubt I'll learn something.
Thanks again
Re: FTM to FH - Places/Media/Descriptions
Posted: 17 Oct 2022 19:07
by McHooty
Oh, omitted to mention that 2_TEXT to 1NOTE worked perfectly.
As a matter of interest would something similar work to move a 2_DATE entry to the Media Record Date field ?
Re: FTM to FH - Places/Media/Descriptions
Posted: 17 Oct 2022 19:55
by tatewise
I would need to see some samples of the 2 _DATE fields in context just like you posted for the 2 _TEXT fields.
i.e. Snippets of the GEDCOM file for the Media records.
Re: FTM to FH - Places/Media/Descriptions
Posted: 19 Oct 2022 14:44
by McHooty
Hi Mike
Just to confirm that the plugin you kindly wrote for me works fine. Have had a good look at the Places and can't see any obvious anomalies.
Also had a look at the code and think it might have taken me a lot longer to get there myself
As for the
2_DATE question I have attached snips as requested.

- OBJE.FILE._DATE.png (135.24 KiB) Viewed 1089 times

- Media 3.png (195.76 KiB) Viewed 1089 times

- 153540.png (40.2 KiB) Viewed 1089 times
Thanks
Re: FTM to FH - Places/Media/Descriptions
Posted: 19 Oct 2022 17:54
by tatewise
From what you have posted, an edit to change each 2 _DATE to 1 _DATE should work OK.
Note that the underscore in _DATE is retained because the FH Media Date field is a GEDCOM extension too.
So only the 2 is changed to 1 to adjust the level.
Try and restrict the change to the Media 0 @O123@ OBJE records, although 2 _DATE is unlikely to occur elsewhere.
Re: FTM to FH - Places/Media/Descriptions
Posted: 20 Oct 2022 13:01
by McHooty
Notepad++ find and replace changed 14k+
On loading FH a warning message indicated that 12 had been Excluded. Didn't take long to find that these already had a Date in place, so a quick amendment to the .ged solved this.
Thanks