I want to retrieve the length of a segment in cm for display in a node
As in the example below, I would like to display the length of three vectors
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{calc}
\begin{document}
\begin{tikzpicture}
\coordinate (A) at (0,0);
\coordinate (B) at (4,2);
\coordinate (C) at (1,3);
\coordinate (D) at (5,3);
\draw[-latex, green, thick] (A) node[left,black]{A} -- (B)node[above left,black]{B} ;
\draw (A) -- (C)node[left]{C} ;
\draw (B) -- (D) node[left]{D};
\draw[thick,-latex,red] (B) -- (intersection of A--C and B--D) coordinate(I) node[left,black]{I} ;
\draw[thick, -latex] (I) -- (A) node[left,midway]{lenght cm};
\end{tikzpicture}
\end{document}


\veclen(\x1,\y1)/1cmworks and is more readable... – Paul Gaborit Sep 30 '12 at 16:41