I have a simply example to connect two node with a arrow line. but I doubt it's not the best way to do such things.
Requirement is:
- Node location is fixed but maybe distance is unknow.
- Connection line should be vertical or horizontal line.
- Change direction between the middle of two nodes.
Current MWE as below:
\documentclass[a4paper,10pt]{article}
\usepackage{tikz}
\usetikzlibrary{arrows,positioning}
\usepackage[active,tightpage]{preview}
\PreviewEnvironment{tikzpicture}
\setlength\PreviewBorder{5pt}%
\tikzset{
block/.style={draw,text width=2em,minimum height=1em,align=center},
arrow/.style={->}
}
\begin{document}
\begin{tikzpicture}[>=stealth']
\node[block] (N1) {N1};
\node[block,below=1cm of N1,xshift=-1cm] (N2) {N2};
\path (N1) -- (N1 |- N2) coordinate [midway] (C);
\draw [arrow] (N2) |- (C) -| (N1);
\path[fill=red] (C) circle (2pt); % help dot,not must have
\end{tikzpicture}
\end{document}
Current Output is:



