Can't write a program for assembly doc to incur one or two parts!

I tried to write a program for assembly document that should insert one or two parts by iteslf.

But it terminated by simply opening a assembly document and didnt insert the parts.

Any sample program available for this kind of problem?

Help!

SolidworksApi macros