I'd like to create tikzpicture (animated in fact) that would read numbers from text file and use them either as coordinates or nodes or for further calculations. It seems that datatool package would be suitable, but I can only make it work if I pass the arguments directly, as in MWE: 

```
\documentclass{standalone}
\usepackage{filecontents}
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{datatool}
\usepackage{animate}
\begin{filecontents*}{test.csv}
f wzb em
380 5 3
400 1 2
405 2 5
410 43 5656
415 4   94
420 4 6
\end{filecontents*}
\DTLsetseparator{ }
\DTLloaddb{widmo}{test.csv}
\begin{document}

\begin{animateinline}[label=graph_switch,controls=step]{1}
\multiframe{5}{iFrame=400+5}{       
\begin{tikzpicture}
   \useasboundingbox[draw] (-3,-2) rectangle (5,6);
\pgfmathparse{1000/\iFrame}
\edef\dlugosc{\pgfmathresult}
\DTLassignfirstmatch{widmo}{f}{405}{\wzb=wzb,\em=em}
%\DTLassignfirstmatch{widmo}{f}{\dlugosc}{\wzb=wzb,\em=em}
%\DTLassignfirstmatch{widmo}{f}{\iFrame}{\wzb=wzb,\em=em}
\draw[->] (0,0) --  (\wzb, \em) --(\dlugosc:1) node[left] {\dlugosc};
\node at (2,0) {em=\em, wzb=\wzb};
\end{tikzpicture}
}
\end{animateinline}
\end{document}

```

The two commented lines don't work as I with they would. Is there a simple way to fix it or other package that would allow me to look through the text file, pick value from specific line and use is as a variable?
I'd appreciate any suggestions on that.