How to get gametes from urchins
The most common method is to inject potassium chloride (KCl) into the body cavity. The injected solution is 0.55 M KCl in distilled water. You need 1-2 ml per urchin, less than 1 ml per sand dollar. There is no need to sterilize it.
KCl stimulates the gonad wall to contract; ripe gametes emerge from the gonopores surrounding the anus on the aboral (up) side of the animal. Use a syringe and 18 gauge or smaller needle (22 gauge is ideal for both urchins and sand dollars). Insert the needle, angled radially away from the mouth, into the edge of the disc of soft tissue surrounding the mouth. Don't force it. Go straight in about 1 cm or so and inject slowly, no more than 2 ml (1 ml is usually sufficient), making sure not to inject any bubbles. Sand dollars initially seem trickier because there is so little space in the body and it's hard to find the soft spot around the mouth, but with a little practice they are just as easy. Insert the needle near the mouth, then tip it to a steep angle, and insert further until you feel the firm test on the opposite side. You should inject less: 0.5 ml is usually adequate for a medium-sized sand dollar.
Injected animals may not begin shedding immediately. Give them a bit of a shake, and then set them down dry (sprinkle them with seawater occasionally) until you see something coming out of the gonopores. Be patient; some animals take up to 10 min. to spawn, and some just aren't ripe. Often not all the gonopores emit gametes. If it's milky-white, it's sperm. Either use a glass pipette to transfer dry semen from the top of the spawning male to a test tube (sand dollars usually don't make enough semen to allow this), or invert him over a shallow dish with just enough water to cover the gonopores. If it's yellow, it's eggs. Invert the spawning female over a small beaker (that is, smaller than the urchin!) filled to the brim with chilled seawater. She will release eggs in streams and clumps which accumulate on the bottom. When the animals are done spawning, or when they've provided enough gametes, return them to a tank — BUT: not to the tank with all your other animals, because they may be induced to spawn by the presence of gametes in the water.