In order to maintain the reference set contents for Body assuming it is your main solid reference set then the system will maintain that for you with a couple of simple declarations. Under the Assemblies>Site Standards portion of your customer defaults you can set a reference set name for the Model and Lightweight reference sets. There are also a couple of extras that you can define. Once declared and populated the system will maintain them for you by keeping changes to the faceted representations up to date.
New parts will have these reference sets declared by default but not necessarily populated with any geometry. The first model created automatically becomes the content for the Model reference set, and the lightweight reference set is its faceted equivalent. The system should assume this for you. In order to correctly populate according to your layer assignments I would try using a macro to begin with, and see if you can't get that to work.
You could also do the same thing by creating named groups or by naming the solid bodies in order that they can be selected by name to be added into the reference sets.
Again you might want to run a macro to perform the updating task. It may even be a good idea to set up a system whereby you run such a macro whenever you save a part, but only if all parts on your system conform to this standard. That is unless you conform closely to what macro's expect to see then they will fail. To get around that you'd need a proper program using one of Grip, Journal, or NX Open programming add ons.
You can create as many reference sets as you like and add whatever you like to them. If you wanted to automate the process of adding components to reference sets take care about what you do. Firstly many people avoid doing that at all because of a problem you get managing the reference set of the reference set when you talk about three levels of an assembly tree. Secondly be sure that if you are using layers to pick your contents that people understand to add the components to that layer, or move them there fully, not just elements of their content, otherwise they may go unselected in the process of trying to add them to your reference set. For these reasons some sites choose to never create reference sets in assemblies and to define an assembly strictly as a file containing only components with no other geometry.
Best Regards
Hudson