How to know the feature/body/parts name if it is selected using mouse

as topic says.

I just want to get its name if the feature/parts/body is selectedwith mouse and insert its name into database.

but, the first step to get its name is not easy for me now.

any suggestion will be appreciated!SolidworksApi macros