Named Selection from Component Name

This script will find all components and create a named selection with the same name.

Transparent Transparent

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