Stack Exchange
Graphviz: drawing nodes in given order to correctly draw tree
I'm trying to draw a tree but have a problem with the following approach: 

Use of 'invisible' nodes to connect levels of tree,
Use 'rank same' to draw nodes on the same level

Using this code I get following result 
graph G{
edge [arrowhead = none];
splines = ortho;
rankdir = LR;

node [ shape="box" fixedsize = true width = 4 height = 1];

{ rank = same; "C" }

{ rank = same; 
"B" 
"A"
}

{ rank = same; 
"F" 
"D" 
"E" 
}
node [ shape="cricle" width = 0 height = 0 style=invis];

{ rank = same; 
"B_Inv_Parent_1"
"C_Inv_Even_Children_0"
"A_Inv_Parent_1" 
}

{ rank = same; 
"F_Inv_Parent_2"
"D_Inv_Parent_2" 
"A_Inv_Even_Children_1"
"E_Inv_Parent_2" 
}

"C" -- "C_Inv_Even_Children_0";
"B_Inv_Parent_1" -- "C_Inv_Even_Children_0" -- "A_Inv_Parent_1";
"B_Inv_Parent_1" -- "B";
"A_Inv_Parent_1" -- "A";

"B" -- "F_Inv_Parent_2";
"F_Inv_Parent_2" -- "F";

"A" -- "A_Inv_Even_Children_1";
"D_Inv_Parent_2"  -- "A_Inv_Even_Children_1" -- "E_Inv_Parent_2";
"D_Inv_Parent_2" -- "D";
"E_Inv_Parent_2" -- "E";
}


I have a problem in the 3rd level: D is drawn on top of the picture thus making a connection with E not ideal. 
I would like to have the same results as with C, B and A. 
I think the problem is with the order of nodes definition however, I can't manage to get it working whatever order I define them in. 
Can anyone spot another problem with my code and suggest a fix? 

I have cleaned up your code and re-arranged a few lines - after all, I think that introducing
F_Inv_Parent_2 -- D_Inv_Parent_2  -- A_Inv_Even_Children_1 -- E_Inv_Parent_2;

has been the key. You don't need to define edge arrows since you don't have a directed graph, and there is a typo in shape="cricle".
Here my edited version
graph G
{
    splines = ortho;
    rankdir = LR;

    // node definitions
    node [ shape="box" fixedsize = true width = 4 height = 1];
    C
    { rank = same; B A }
    { rank = same; F D E }

    node [ shape="point" width = 0 height = 0 ];
    { rank = same; 
        B_Inv_Parent_1
        C_Inv_Even_Children_0
        A_Inv_Parent_1 }
    { rank = same;
        F_Inv_Parent_2
        D_Inv_Parent_2
        A_Inv_Even_Children_1
        E_Inv_Parent_2 }

    // edges
    C -- C_Inv_Even_Children_0;

    B_Inv_Parent_1 -- C_Inv_Even_Children_0 -- A_Inv_Parent_1;

    B_Inv_Parent_1 -- B -- F_Inv_Parent_2;
    A_Inv_Parent_1 -- A -- A_Inv_Even_Children_1;

    F_Inv_Parent_2 -- D_Inv_Parent_2  -- A_Inv_Even_Children_1 -- E_Inv_Parent_2;

    F_Inv_Parent_2 -- F;
    D_Inv_Parent_2 -- D;
    E_Inv_Parent_2 -- E;
}

and the result:

EDIT: I may have misunderstood your intention how you want to connect the third level - if so, replace
F_Inv_Parent_2 -- D_Inv_Parent_2  -- A_Inv_Even_Children_1 -- E_Inv_Parent_2;

with
F_Inv_Parent_2 -- D_Inv_Parent_2[ style = invis ];
D_Inv_Parent_2  -- A_Inv_Even_Children_1 -- E_Inv_Parent_2;

which gives you

EDIT No. 2, in response to yr comment:
Adding weight to the edge helps straightening it - I give the full code even though only two lines have changed (plus comments), for easier copy & paste:
graph G
{
    splines = ortho;
    rankdir = LR;

    // node definitions
    node [ shape="box" fixedsize = true width = 4 height = 1];
    C
    { rank = same; B A }
    { rank = same; F D E }

    node [ shape="point" width = 0 height = 0 ];
    { rank = same; 
        B_Inv_Parent_1
        C_Inv_Even_Children_0
        A_Inv_Parent_1 }
    { rank = same;
        F_Inv_Parent_2
        D_Inv_Parent_2
        A_Inv_Even_Children_1
        E_Inv_Parent_2 }

    // edges
    C -- C_Inv_Even_Children_0;

    B_Inv_Parent_1 -- C_Inv_Even_Children_0 -- A_Inv_Parent_1;

    // add extra weight to the continouous connection between four levels:
    B_Inv_Parent_1 -- B -- F_Inv_Parent_2 -- F[ weight = 10 ];
    // no weight here:
    A_Inv_Parent_1 -- A -- A_Inv_Even_Children_1;

    F_Inv_Parent_2 -- D_Inv_Parent_2[ style = invis ];
    D_Inv_Parent_2  -- A_Inv_Even_Children_1 -- E_Inv_Parent_2;

    // F_Inv_Parent_2 -- F;  ### moved
    D_Inv_Parent_2 -- D;
    E_Inv_Parent_2 -- E;
}

Which gives you the disired straight line from B via F_Inv_Parent_2 to F which is actually the grandchild:


Thanks, this solution still produces an elbow connection style between B and F while ideally it should be connected in a straight line for just one child. Do you know maybe another tool that might be better suited to draw trees?
