I want to connect some diagrams from different size and to change the style of the line:
The red-circled line I would like to make it a dotted line and to conect it from the side of both blocks, not from the side of one block to the bottom of the other. The same with the dark-circled line. Here is the code for that figure:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usepackage{mathtools}
\usepackage{amsmath}
\usepackage{amssymb}
\usetikzlibrary{shapes,arrows, positioning, calc}
% \usetikzlibrary{shapes,arrows}
% \usetikzlibrary{positioning}
% \usepackage{subfig}
% \usepackage{geometry}
\usepackage{float}
\title{Diagramas}
\author{}
\date{}
% Modificaciones
\tikzstyle{block} = [draw, fill=white, rectangle,
minimum height=3em, minimum width=6em ]
\begin{document}
\maketitle
\begin{figure}[H]\centering
\hspace*{-3cm}
\begin{tikzpicture}[auto, node distance=2cm,>=latex',anchor=center]
%Declara los nodos
% Producto final
\node[block, fill = gray!50] (system) {$\begin{array}{cc} \text{\textbf{Sistema de}}\\ \text{\textbf{Bola Balanza}} \end{array}$};
% Nivel 7
\node[block, below of = system, fill = gray!50, left = 5cm] (dis_soft){$\begin{array}{cc} \text{\textbf{Diseño}}\\ \text{\textbf{del software}} \end{array}$};
\node[block, below of = system, fill = gray!50, right = 4cm] (model){\textbf{Modelado}};
% Nivel 6
\node[block, below of = dis_soft, fill = gray!50, left = -1.65cm] (prom_control){$\begin{array}{cc} \text{\textbf{Programación}}\\ \text{\textbf{del controlador}} \end{array}$};
% Nivel 5
\node[block, below of = prom_control, fill = gray!50, left = 1.65cm] (prom_plant){$\begin{array}{cc} \text{\textbf{Programación}}\\ \text{\textbf{de la planta}} \end{array}$};
\node[block, below of = prom_control, fill = gray!50, right = 1cm] (dis_control){$\begin{array}{cc} \text{\textbf{Diseño}}\\ \text{\textbf{del controlador}} \end{array}$};
% Nivel 4
\node[block, below of = dis_control, fill = gray!50, right = 7.3cm] (ident_sis){$\begin{array}{cc} \text{\textbf{Identificación}}\\ \text{\textbf{del sistema}} \end{array}$};
% Nivel 3
\node[block, below of = ident_sis, fill = gray!50, left = 3.8cm] (plant_dis){$\begin{array}{cc} \text{\textbf{Diseño de }}\\ \text{\textbf{la planta}} \end{array}$};
% Nivel 2
\node[block, below of = plant_dis, fill = gray!50, right = 3.8cm] (analisis_mat){$\begin{array}{cc} \text{\textbf{Análisis}}\\ \text{\textbf{matemático}} \end{array}$};
\node[block, below of = plant_dis, fill = gray!50, left = 3.8cm] (dis_cad){$\begin{array}{cc} \text{\textbf{Diseño}}\\ \text{\textbf{de CAD}} \end{array}$};
\node[block, below of = plant_dis, fill = gray!50, left = 7cm] (prom_elem){$\begin{array}{cc} \text{\textbf{Programación de}}\\ \text{\textbf{cada elemento}} \end{array}$};
% Nivel 1
\node[block, below of = dis_cad, fill = gray!50, left = -1.05cm] (mat){\textbf{Materiales}};
%Ahora conectamos los bloques
% Nivel 7
\draw[-] (system) -| (dis_soft);
\draw[-] (system) -| (model);
% Nivel 6
\draw[-] (dis_soft) -- (prom_control);
% Nivel 5
\draw[-] (prom_control) -| (dis_control);
\draw[-] (dis_soft) -| (prom_plant);
\draw[-] (dis_control) -| (model);
% Nivel 4
\draw[-] (model) -- (ident_sis);
% Nivel 3
\draw[-] (system) -- (plant_dis);
\draw[-] (plant_dis) -| (prom_plant);
\draw[-] (plant_dis) -| (ident_sis);
% Nivel 2
\draw[-] (model) -| (analisis_mat);
\draw[-] (dis_cad) -| (plant_dis);
% Nivel 1
\draw[-] (mat) -- (dis_cad);
\draw[-] (mat) -| (analisis_mat);
\end{tikzpicture}
\caption{Estructura de todo el sistema}
\end{figure}
I appreciate the help.