You can't stylize individual segments of a path. You can create an ArtBrush to make several differently-styled paths act as one path, but I suspect you will want more on-page, per-instance control over where the dashed portions end and begin.
If your purpose is to create leader lines as in an exploded assembly, the typical way is to just:
- Set up two Graphic Styles (ex: Leader and LeaderHidden).
- Draw the entire leader as a single path start-to-end. Apply the Leader style.
- Cut it where it passes "behind" an object. Apply the LeaderHidden style to the "behind" portions.
You could, if you want, create a Group from three (or more) such individually-styled paths, move copies of it around, and then use the white pointer to select and move the coincident endpoints. But again, I think you'll find that more tedious than just cutting a path and applying two styles as needed, as described above.
JET