Here you can find some detailed information about how to use SmartRefs.
General documentation about SmartRefs.
Documentation about the maxscript commands of SmartRefs.