I downloaded and installed a copy of http://woodgears.ca/gear/.

When I wrote this instructable the price was $26 and totally worth it. Have you seen my open source robot arm? It uses the same gear templates. By the time you read this I'll have 3 or 4 robots that use gears generated with this program.

I set the "shaft spacing" to the distance between the center of the gears. I set the same number of teeth on both gears. I picked the size of the hole in the center that I wanted. Feel free to change these options to suit your tastes.

Remember: The diameter of the gear is different than the shaft spacing because the teeth have to overlap.

I turned off most of the options on the right and turned on "draw unmeshed".

I saved my project and then exported as a DXF file.