how to code API/macros for creating a simple gear automatically using module, No of teeth and other data.

i am designing girth gear. The customer require to create gear model within short time by entering simple dat like module, number of teeth, helix angle. So, I planned to use macros/API. Kindly provide example problems like or model programs...etc to know about API/macros....plz

SolidworksApi macros