If those are to be straight line segments, it couldn't get any simpler. It gets interesting with curves. Enclosed are a few examples, and I agree - it's too complicated. Clipping is the most accurate way to tell where the solid part should stop, but it requires its own scope. Fading is good for smooth transition but probably would only give headache if the path doesn't run more or less in one direction.

I'm quite sure there is a way to have a procedural stroke of the path, but I haven't found any information about that so far. I would personally enjoy a simple style that allows to easily morph the line type from start until end of a path, doing something similar to the second custom dash pattern but without all the typing. But for now, this is what I did:
\documentclass[12pt,a4paper]{minimal}
\usepackage{times}
\usepackage{tikz}
\usetikzlibrary{fadings}
\begin{document}
\begin{tikzpicture}[line width=1.5pt]
\node at (200pt,40pt) [label=right:{2 line segments}]{};
% for straight segments this is the easiest:
%
\draw[dashed] (200pt,40pt) -- (60pt,40pt);
\draw (60pt,40pt) -- (0pt,40pt);
\node at (200pt,10pt) [label=right:{custom dash pattern}]{};
% for curves you can specify custom dash pattern, but it's cumbersome
% having to specify every singly dash untill the line becomes solid:
%
\draw[dash pattern=on 10pt off 10pt on 10pt off 10pt on 10pt off 10pt on 10pt off 10pt on 10pt off 10pt on 10pt off 10pt on 10pt off 10pt on 100pt] (200pt,10pt) .. controls (40pt,40pt) and (90pt,-30pt) .. (0,20pt);
\node at (200pt,-10pt) [label=right:{custom dash pattern}]{};
% it does however allow for nice density modifications (but also by hand):
%
\draw[dash pattern=on 10pt off 9pt on 9pt off 8pt on 8pt off 7.3pt on 7.3pt off 6.7pt on 6.7pt off 6.3pt on 6.3pt off 5.9pt on 5.9pt off 5.4pt on 5.4pt off 5.0pt on 5.0pt off 4.0pt on 4.5pt off 3.0pt on 4.0pt off 2.4pt on 3.5pt off 1.8pt on 100pt] (200pt,-10pt) .. controls (40pt,20pt) and (90pt,-50pt) .. (0,0pt);
\node at (200pt,-30pt) [label=right:{2 curves: dashed $+$ clipped solid}]{};
% now there's 2 paths - a long dashed one and a clipped solid one:
%
\begin{scope}
\clip (-5pt,-70pt) rectangle (60pt,5pt);
\draw (200pt,-30pt) .. controls (40pt,0pt) and (90pt,-70pt) .. (0,-20pt);
\end{scope}
\draw[dashed] (200pt,-30pt) .. controls (40pt,0pt) and (90pt,-70pt) .. (0,-20pt);
\node at (200pt,-50pt) [label=right:{2 curves: dashed $+$ faded solid}]{};
% for a gradient toning down of the solid line you can use fading:
%
\draw[path fading=east] (200pt,-50pt) .. controls (40pt,-20pt) and (90pt,-90pt) .. (0,-40pt);
\draw[dashed,path fading=west] (200pt,-50pt) .. controls (40pt,-20pt) and (90pt,-90pt) .. (0,-40pt);
\end{tikzpicture}
\end{document}
\draw [dashed] (3,0) -- (1,0) ; \draw (1,0) -- (0,0)[solid] ;
? Yes, but the junction of the lines is not as clean as if the line is define in one command (the first dash is closer to the solid line than to the second dash). This is the reason why I ask for a complete command... But maybe there is other ways that can solve the problem.\draw (0,0) -- (1,0);\draw[dashed](1,0) -- (2,0);
) The first dashed part is connected to the solid line. What is it you want to achieve exactly?line
instead ofpath
also my answer is not really appropriated to your question. It's possible to begin the dash line withpos=...
but it's very complicated Then the junction of the lines will be not very clean and it's what you want. If you want a good junction you can draw like this :\draw [dashed] (1,0) -- (3,0) ; \draw (1,0) -- (0,-1)[solid] ;
You need to draw from the corner. The problem with the dash pattern is complicated.