Problem
I'm drawing flow diagrams in Tikz, and they basically include a header, followed by a list of flow components set below an arrow. I've written functions to take arguments in Tikz before, but I'm wondering if there's any way to take in a "list" of arguments and loop through these with a for loop of some sort.
I've tried searching for similar items on google, but haven't gotten very far as I'm not exactly sure how to phrase what I'm looking for.
Pseudocode
\newcommand{\FlowPipe}[3][FlowPipe]{ %first argument is x co-ord, second is array of text
\newcounter{i}
\setcounter{i}{0}
\draw[->] (#1,0) -- (#1+3,0);
\foreach\argtext in {#2}{
\node (#1,i) {\argtext};
\stepcounter{i}
}
}
Basically, for each item in the array, it should add a node at some specified distance below and put the text of that item there.


\foreachdo what you want, or do you need something more complicated? – Caramdir Nov 26 '10 at 19:16