Incorporating the suggestions over at the Hatch-pattern topic, try the attached.
The questions raised there remain....
EDIT: But just so that they'll be here with the adjusted code if they matter to you, here they are again:
If it's important to you which Layer the horizontal one goes on and which Layer the vertical one goes on [when they are, in fact, horizontal and vertical], that would require some additional code. Currently the routine simply draws between midpoints of segments [with extensions if specified], and doesn't know where a Polyline starts or in which direction it's drawn or whether its segments are orthogonal, or whether an Ellipse is orthogonally oriented, and therefore [except for a Circle] doesn't care whether the Lines it draws are horizontal and vertical. That could be determined if it matters. If it does, do your situations always result in horizontal and vertical Lines, and if not, what would determine which one goes on the Layer for horizontal ones and which for vertical?
Kent Cooper, AIA