Get current material selection from render library panel

Is there a way to programmatically get the current selection of the render material in the Render Libraries Panel?

https://developer.rhino3d.com/api/rhinocommon/rhino.ui.panels/getpanel#(guid,rhinodoc)
this method^ returns an object type (render library panel) which I cant interact with.
it exposes a bunch of properties but I am havent been able to find current selection in there yet.

Thanks
Srujan

Hi @svichare, does below help ?

Note: the panel id i have for render library seems different than yours and there could be multiple selections in the thumb viewer…

RenderLibrarySelectedItems.py (1.6 KB)

_
c.

1 Like

Thanks for that. reflection helped!
I am making a command so translated this to C#