I don't really get the question so I hope this is what you wanted. If you include a full document (such that we copy paste and see the problem on our systems) things are much more easier.
Here, you can change the default setting within a scope but your block
style had a node distance
which was resetting every time it is issued. I've made it 2mm such that we can see the difference easier.
\documentclass[tikz]{standalone}
\usetikzlibrary{arrows,shapes.geometric,positioning}
\begin{document}
\begin{tikzpicture}[decision/.style={diamond, draw, text width=4.5em, text badly centered, node distance=3.5cm, inner sep=0pt},
block/.style ={rectangle, draw, text width=6em, text centered, rounded corners, minimum height=4em, minimum height=2em},
cloud/.style ={draw, ellipse, minimum height=2em},
line/.style ={draw,-latex'},
node distance = 1cm,
auto]
\node [block] (1st) {1st};
\node [block, right= of 1st] (2nd1) {2nd1};
\begin{scope}[node distance=2mm and 10mm]%Here we change it for everything inside this scope
\node [block, above= of 2nd1] (2nd2) {2nd2};
\node [block, below= of 2nd1] (2nd3) {2nd3};
\node [block, right= of 2nd1] (3rd1) {3rd1};
\node [block, above= of 3rd1] (3rd2) {3rd2};
\node [block, above= of 3rd2] (3rd3) {3rd3};
\end{scope}
\node [block, below= of 3rd1] (3rd4) {3rd4};
\node [block, below= of 3rd4] (3rd5) {3rd5};
\path [line] (1st) -- (2nd1);
\path [line] (2nd1) -- (2nd2);
\path [line] (2nd1) -- (2nd3);
\path [line] (2nd2) -- (3rd3);
\path [line] (2nd1) -- (3rd1);
\path [line] (1st) -- (2nd1);
\end{tikzpicture}
\end{document}
edge
is a bit of a strange beast, and you need to use to
here instead:
\documentclass[11pt]{article}
\usepackage{amsmath}
\usepackage{tikz-cd}
\usetikzlibrary{arrows}
\title{}
\date{}
\tikzset{
commutative diagrams/.cd,
arrow style = tikz,
diagrams={>=latex}}
\begin{document}
\begin{tikzpicture}[commutative diagrams/every diagram,column sep = 3em]
\matrix (m) [matrix of math nodes, nodes in empty cells]{
|(A)|A\\
|(B)|B\\
};
\draw[commutative diagrams/.cd, every arrow, every label,dashed]
(B.north east) to [bend right, dashed] (A.east);
\draw[commutative diagrams/.cd, every arrow, every label]
(B) edge [bend left] (A.west);
\end{tikzpicture}
\end{document}
I think what is happending with the edge
is that there are two paths, the first a very short one from (B)
to (B.north east)
. But I haven't yet be able to verify this.
Update: thanks to the pointer to https://tex.stackexchange.com/a/82495/15925
from Torbjørn T. this is indeed the case. In your code the main path, i.e. with the edge
parts removed, is
\draw[commutative diagrams/.cd, every arrow, every label,dashed]
(B.north east)
(B);
which in the above code produces
with the strangely placed arrowhead you experienced.
The full code for this last diagram is:
\documentclass[11pt]{article}
\usepackage{amsmath}
\usepackage{tikz-cd}
\usetikzlibrary{arrows}
\title{}
\date{}
\tikzset{
commutative diagrams/.cd,
arrow style = tikz,
diagrams={>=latex}}
\begin{document}
\begin{tikzpicture}[commutative diagrams/every diagram,column sep = 3em]
\matrix (m) [matrix of math nodes, nodes in empty cells]{
|(A)|A\\
|(B)|B\\
};
\draw[commutative diagrams/.cd, every arrow, every label,dashed]
(B.north east)
(B);
\end{tikzpicture}
\end{document}
Best Answer
You can use relative coordinates on the left side. (On the right side you have to use calc.)
An even simpler solution: