This is what we did, it worked, but quite possibly there are other methods.
1) Before the swarming season, set up another (empty) hive a few feet from the current hive. (We didn't do this, and it would have been less stressful if we had! It needs a brood box full of foundation, less one frame.
2) Spot queen cells in the current hive, preferably before they swarm!
3) The objective is now to make the queen think she has swarmed. So you find the queen, and move her on the frame she is on to the brood box of the spare hive. Move supers as well. So you end up with a queen + frame of bees/brood + an optional super in the "new" hive position, and a load of bees + brood in the old hive position.
4) Now swap the hives over. What will happen is that the queen will end up with all of the flying bees, because she is in the "old" hive position. Every flying bee that leaves either hive will return to the hive with the queen in it. This is good, because a real swarm is a "queen + flying bees" - and you have created that.
5) The "old" brood box in the "new position" will be depleted of flying bees. As it has most of the brood frames, it will have sufficient stores to survive quite happily while it matures more flying bees and hatches the queen out from the swarm cells.
6) If the "old" brood box is a big colony, then you may want to move it again in a weeks time. Move it to the other side of the original hive location. Again, this is to deplete the flying bees. Say it was on the right of the original location, and then you move it to the left. All of the flying bees will return to their location on the right, fail to find a hive,
and go to the nearest hive - which is the hive with the original queen in it. By depleting the flying bees further, you are reducing the risks of casts being thrown.
6) After my experiences of last year, I would be inclined to reduce the number of swarm cells in the old brood, or split it into a couple of nucs. We did all of the above, and they still chucked casts out.
7) Depending on the amount of food with the original queen, you may want to add syrup. We moved a nearly full super with her, so didn't bother. If you don't have this, and foraging suddenly turns bad, then they could get hungry.