I'm no electromagnet expert and I was wondering if the following idea would work.
If I wound a core one direction, and halfway through, started winding in the other direction, could I create a usable electromagnet where the poles are the same on both ends?
I think they use that sort of thing on hum-bucking pickups for electric guitars. The guitar string excites only the first windings, but stray 60 Hz excites both windings out of phase to cancel.
I think "NO" is perhaps a glib answer. If you have a long bar and short windings the result will not be a null field. Suppose the bar is 32cm long, the midpoint being 16cm in from the ends. If the windings are each 8cm long centred 8cm from the ends then this is almost like putting two 16cm electromagnets facing each other with no gap.
Putting two electromagteic this close would produce a tremendous force on the bars/windings. I think you would stretch the bar and probabaly rip the winding off as well. So having thought it through, my answer is also NO