I am trying to use a counter in the tikzpicture environment.
The counter needs to keep track of the slide from when the picture needs to be shown; that way, it is easy to add or delete a line.
\documentclass{beamer}
\usepackage{tikz}
\begin{document}
\newcounter{test}
\addtocounter{test}{1}
\begin{frame}
\begin{tikzpicture}
\onslide<\arabic{test}->{\draw (0,0)--(1,1);}
\addtocountour{test}{1};
\onslide<\arabic{test}->{\draw (1,1)--(2,0);}
\addtocounter{test}{1};
\onslide<\arabic{test}->{\draw (2,0)--(3,1);}
\end{tikzpicture}
\end{frame}
\end{document}

\value{test}instead of\arabic{test}. – Qrrbrbirlbel Sep 05 '13 at 18:46\begin{document}
\begin{frame} \begin{tikzpicture} \onslide<+->{\draw (0,0)--(1,1);} \onslide<+->{\draw (1,1)--(2,0);} \onslide<+->{\draw (2,0)--(3,1);} \end{tikzpicture} \end{frame}
\end{document}` without any manual counter manipulation.
– Gonzalo Medina Sep 06 '13 at 01:24