If you use blocks, flatten is a terrible command, 4 blockrefs called A will become A-flat1,A-flat2 etc.
Another way is to use quick select to select polylines and using the elevation property and operater "not equal" to zero.
This will select them all and in the properties palette set the elevation to 0, use similar for the arcs (center.Z=0)