Can you use the generate terrain tool in scripts?

I was wondering if you can use the auto-generate terrain tool in a script to generate basic maps with ease while in game.