What is the simplest way to create a horizontal or vertical dashed 2D line in Blender?
You can create a long cylinder.
Under Edit mode, insert several "loop cuts" to the side of the cylinder; with "face select" activated, you press "a" once or twice to select all faces.
Press "space" and write "checker deselect".
At this time, you have 2 options, assign a transparent material to these faces, or you just delete them (I would go for the transparent material, so you get a single object all connected).