Diagram / Import and Export / Import / GEDCOM Import
In This Topic

    GEDCOM Import

    In This Topic

    NOV Diagram can import family trees stored in the popular Genealogical Data Communication (GEDCOM) format.

    To use family tree shapes and diagram shapes with code-behind in general, you should set a compiler service in the entry point of your application, right after you initialize NOV:

    Set the compiler service
    Copy Code
    // Optional: If you plan to use Diagram smart shapes (for example Family Tree shapes), 
    // you should specify the compiler service to use to compile their code-behind 
    NApplication.CompilerService = new NRoslynCompilerService();
    
     Family Tree Library

    Importing of GEDCOM files requires the family tree shapes library. It is located in the following subfolder in the installation folder of NOV:

    • Resources\ShapeLibraries\Family Tree\Family Tree Shapes.nlb       

    You should distribute this file with your application and place it in the following location:

    • {YourAppPath}\Resources\ShapeLibraries\Family Tree\Family Tree Shapes.nlb

    For more information please take a look at the Application Resources topic.

     Importing GEDCOM Files and Streams

    After the family tree shapes library is loaded, GEDCOM files can be imported. The following code examples show how to load GEDCOM data from file and from stream in a drawing view:

    Importing GEDCOM data from a file
    Copy Code
    drawingView.LoadFromLocalFile(@"D:\Documents\MyFamilyTree.ged");
    
    Importing a GEDCOM data from a stream
    Copy Code
    drawingView.LoadFromStream(stream, NDrawingFormat.Gedcom);
    
    See Also