I've found the following How can I compute the distance between two coordinates in TikZ?. So, I know how to find the size of a TikZ picture as follows:
\documentclass{article}
\usepackage[margin=0.5in]{geometry}
\usepackage{fp}
\usepackage{tikz}
\usetikzlibrary{calc}
\makeatletter
\def\calcLength(#1,#2)#3{%%
\pgfpointdiff{\pgfpointanchor{#1}{center}}%%
{\pgfpointanchor{#2}{center}}%%
\pgf@xa=\pgf@x%%
\pgf@ya=\pgf@y%%
\FPeval\@temp@a{\pgfmath@tonumber{\pgf@xa}}%%
\FPeval\@temp@b{\pgfmath@tonumber{\pgf@ya}}%%
\FPeval\@temp@sum{(\@temp@a*\@temp@a+\@temp@b*\@temp@b)}%%
\FProot{\FPMathLen}{\@temp@sum}{2}%%
\FPround\FPMathLen\FPMathLen5\relax
\global\expandafter\edef\csname #3\endcsname{\FPMathLen pt}%%
}
\makeatother
\setlength{\parindent}{0pt}
\begin{document}
\begin{tikzpicture}[baseline=(B)]%%
\coordinate (A) at (0,0);
\coordinate (B) at (10,3);
\draw (A) -- (B);
\coordinate (PUL) at ($(current bounding box.north west)+(-1ex,1ex)$);
\coordinate (PLR) at ($(current bounding box.south east)+(1ex,-1ex)$);
\coordinate (PUR) at (PUL-|PLR);
\coordinate (PLL) at (PUL|-PLR);
\draw (PUL) rectangle (PLR);
\calcLength(PUL,PUR){mywidth}%%
\calcLength(PUL,PLL){myheight}%%
\end{tikzpicture}%%
Here's a rule the width of the picture:
\rule{\mywidth}{4pt}
Here's a rule the height of the picture:
\rule{4pt}{\myheight}
\end{document}
What I'm curious about is whether isn't an easier way to go about this since all I'm interested in is the dimensions of the finished picture.
\ht
,\wd
fot he box?:p
I even hesitated linking to that question because you had commented on it, but heh, you're not expected to remember every single question or comment on the site. I'll vote to close this one as a duplicate.