How to get the guid of GH_BooleanToggle object

Hi ! I cant get the guid of a GH_BooleanToggle object, if anyone could give me a hand I will appreciate it.
Thank you

Hi
You should use string type output,like this

from Grasshopper.Kernel.Special import GH_BooleanToggle

objs = ghenv.Component.OnPingDocument().Objects
guids = []
names = []
for obj in objs:
    if(type(obj) is GH_BooleanToggle):
        guids.append(str(obj.InstanceGuid))
        names.append(obj.NickName)

a = guids
b = names

1 Like

Thank you so much !