You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tanks for excelent c# library for Gedcom. I think this is the best library I found to this.
I have a Gedcom file exported from MyHeritage that have hundreds of Individuals and Families. I want to export only a specific family to a new Gedcom file.
I open the original file and select the individuals I need and added to new database.
But when I write a new Gedcom using GedcomRecordWriter.OutputGedcom(exportGedcom, "Rewritten.ged"); I get the error:
Exception has occurred: CLR/System.NullReferenceException
An unhandled exception of type 'System.NullReferenceException' occurred in GeneGenie.Gedcom.dll: 'Object reference not set to an instance of an object.'
at GeneGenie.Gedcom.Parser.GedcomRecordWriter.Write(GedcomDatabase database, GedcomStreamWriter writer) in /home/vinicios/workspace/GeneGenie.Gedcom/GeneGenie.Gedcom/Parser/GedcomRecordWriter.cs:line 161
What I need to do to build a valid new Gedcom using informations from another Gedcom file?
Thanks again,
Vinicios Torres
The text was updated successfully, but these errors were encountered:
I have found some issues, I think. First, it is not enough to create new GedcomDatabase using:
var exportGedcom = new GedcomDatabase();
It have generated null exception because the abscence of Header. So, to solve that I created a gedcom file with just header to be a base of new database.
And I discovered that I must use:
exportGedcom.Add( individual.XRefID, individual);
to add an imported person (and events, photos, families) to new database. Initially I thought I should use exportGedcom.Individuals.Add(individual);
I will continue testing here and then report back to you my experience with the library.
Tanks for excelent c# library for Gedcom. I think this is the best library I found to this.
I have a Gedcom file exported from MyHeritage that have hundreds of Individuals and Families. I want to export only a specific family to a new Gedcom file.
I open the original file and select the individuals I need and added to new database.
But when I write a new Gedcom using GedcomRecordWriter.OutputGedcom(exportGedcom, "Rewritten.ged"); I get the error:
What I need to do to build a valid new Gedcom using informations from another Gedcom file?
Thanks again,
Vinicios Torres
The text was updated successfully, but these errors were encountered: