This question is based on Draft option in TikZ like graphicx.
From pgf manual,
33.4 Externalizing Graphics
The probably most comfortable way is to use the default conguration with pdflatex -shell-escape main which authorizes pdflatex to call itself recursively to generate the images.
Also manual says "users will need to issue the required commands manually (or with make)"
How to issue the required commands manually?
or
How to issue the required commands using makefile?
I am using TeXstudio with Miktex