Named Selection from Component Name
This script will find all components and create a named selection with the same name.

all_parts=GetRootPart().GetAllComponents()
for part in all_parts:
bodies=part.GetAllBodies()
name=part.GetName()
Selection.Create(bodies).CreateAGroup(name)