RS AutoConfiguration API?

I am trying program a function similar to RS AutoConfiguration, Can please tell me how to code it.

Thanks

Zack