The following code results in an error:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{positioning}
\def\aebelowof{below=of A}
\begin{document}
\begin{tikzpicture}
\node (A) at (0,0) {NODE A};
\node[right=of A] {NODE B};
\node[\aebelowof] {node C};
\end{tikzpicture}
\end{document}
The error is:
! Package pgfkeys Error: I do not know the key '/tikz/below=of A' and I am goin
g to ignore it. Perhaps you misspelled it.
See the pgfkeys package documentation for explanation.
Type H <return> for immediate help.
...
l.12 \node[\aebelowof]
{node C};
?
I know I can get around this by writing:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{positioning}
\def\aebelowof{below=of A}
\begin{document}
\begin{tikzpicture}
\node (A) at (0,0) {NODE A};
\node[right=of A] {NODE B};
\expandafter\node\expandafter[\aebelowof] {node C};
\end{tikzpicture}
\end{document}
But for the code this is supposed to be embedded in, it'll be difficult or near impossible to get the \expandafters placed in there.
Basically what I would like to do is store information about how the nodes should be formatted and placed in various macros.
What I would like to know is whether there is a tikz or pgf trick I'm unaware of that could come to the rescue here.
UPDATE
Here's a bit more involved example. There's to be some kind of user interface where the user sets the position, but I don't force the user into a particular kind of configuration/positioning.
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{positioning}
\def\aeposition{}
\newcommand\setposition[1]{\def\aeposition{#1}}
\begin{document}
\setposition{left=of A}
\begin{tikzpicture}
\node (A) at (0,0) {NODE A};
\node[right=of A] {NODE B};
\expandafter\node\expandafter[\aeposition] {node C};
\end{tikzpicture}
\setposition{below=3in of C}
\begin{tikzpicture}
\node (C) at (0,0) {NODE C};
\node[right=of C] {NODE D};
\expandafter\node\expandafter[\aeposition] {node E};
\end{tikzpicture}
\end{document}
In short, the key word, the equal sign between key word and value, and the value are all being stored in the macro.

\tikzsetinstead of\pgfkeysbecause as you seem to correctly assume, this macro is getting created by a set of keys from another library. – A.Ellett Jan 25 '14 at 16:01