A very simple construction that would require a source of power in the same way pumps do, be it windmill, water wheel or a good ol' dwarf on a crank. Essentially it would be a track that must be connected to a wall in the case of vertical, floor/ceiling for horizontal. It would move a structure (idealy a singular room) along its length provided it is not connected to anything else.
The most obvious use would be, say a cargo elevator for lifting things up to the trade depot without so much hauling.
However the possiblities are endless. You could set a LOCKDOWN mechanism to slide solid, six tile thick steel walls into place incase of an emergancy, for added dwarf points have the place they slide out from your barracks or full of aligators.
You could have a series of successively larger elevators encasing one another on the same Z-level. Preferably the surface. So that at the flick of a switch you can convert it into an imposing pyramid. Bonus points if you designate the space directly below the hundreds of tonnes of now suspended rock as your trade depot. In fact, I'm almost positive someone could use a simmilar tactic to build a city that can rise out of the ocean, or engineered lava lake.
Connected to pressure plates you could make a labrynth of constantly shifting walls in such a way that once your in, you can never get out again. Set a presious object in the center and cackle as theives lose their way.
Heck, you could even make a working train.
HOWEVER. Each rail should have a set weight it can lift. So a large elevator might need two rails on each side, yet wall sliding up or out into place might just need two in total.
SECONDLY Rotating mechanism. I'm completely clueless as to what to call it proper. But the basic idea is, if you put say. A room with one doorway on top of it in the center of a + intersection you could have a self sealing, secure way to access sensitive parts of the fortress.
That's the BASIC use, however, as I said the possiblities are endless. By placing a batista on top of a rotating mechanism. And put that mechanism on a platform ON RAILS you could essentially have a network of batistas that you can reposition and aim as nessecary. Again I recommend both vertical and horizontal rotating mechanisms. As you could make for instance a dumping bridge. A bridge that is rotated in such a way as to turn completely upside down, casting unfortunate foes down into something equally unpleasant. Heck you could even set up your fortress so that the entire floor/walls everywhere are booby trapped on one side only. And switch it from completely safe to overly complex death trap with the pull of a single lever.
Anyone else think this is something worth thinking about?