What I will probably do is set the environment tikzpicturein the field and then find the width of the field:
\setbox0=\vbox{\hbox{%
\begin{tikzpicture}
% ...
\end{tizpicture}%
}}
The width of the following picture is {\the\wd0}.
\box0
Please note that after starting the \box0window will be inserted into the document and its contents will be destroyed; you need to request the width of the window before you do this. If you want to keep the width, you can save it in the measurement register with \dimen0=\wd0; alternatively, you can use \copybox0one that inserts the field but does not destroy it (although this may lead to a memory leak).
, , , < \vbox (, , ); , \hbox, - unboxing ( ). , , - , TikZ PDF .