RS AutoConfiguration API?

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

Thanks

Zack