Why you want to do it via API?
You can use options like DriveWorksXpress, Design table or configuration publisher.
Thanks for your reply Mr. Deepak Gupta.
I am new to SOLIDWORKS... I need to model a girth gear with some data like- PCD, module, profile shift, etc... I have done all the theoretical calculations and designed using AGMA standard. And I modeled the parts also.
But I have to enable the user to model the gear by entering the above-stated data.
can you suggest the right procedure/method for attaining my goal??
Why not use Camnetics Gearteq. It does come at a cost of approx 1000$ but that is reasonable considering your goal. Otherwise you can produce the gear tooth using analytical methods and splines. I think even Camnetic is modeling the tooth that way.
It is surprisingly hard to find good information about gears on these forums when I search. I'm glad I bookmarked this thread:
I hope that thread helps you.
You can create the desired user form in the DriveWorksXpress and then let user enter those values. This would create a new gear every time when values are different but the file name has to be different also. Again you can set the file names rules also.
Check for DriveWorksXpress tutorials in the SOLIDWORKS tutorials or check here: DriveWorksXpress