Check if object is deleted from object browser in geomBuilder

Hello,
i have a list of objects, that I am publishing on the object browser, but then I delete one. is it possible to get a boolean flag for 1 or 0 if it was deleted from the object browser (manually on the GUI)?

eg.
g=[geompy.CreateGroup(compound, geompy.ShapeType[‘EDGE’]) for _ in gg]
disps=[geompy.addToStudyInFather( compound, group, str(nG)) for nG,group in enumerate(g)]
then in the GUI in the object browser select the object ‘1’ delete it and then do something like:
[group.GetStudyEntry() for group in g]
and get something like (where the element 1 is empty):
[‘0:1:1:45:169’, ‘’, ‘0:1:1:45:172’, ‘0:1:1:45:173’, ‘0:1:1:45:174’, ‘0:1:1:45:175’, ‘0:1:1:45:176’]
I dont care if it is empty/false or something in that realm, if i am able to distinguish that it has or not being deleted from the object browser.
dir(g[0]) did not give any method that looked like could work.

I would use:

isDeleted = salome.myStudy.FindObjectByPath('/Geometry/' + compound.GetName() + '/' + group.GetName() ) is None

to check if it is present. Maybe @fred has a better idea.

1 Like

thanks a lot @NabilG ,maybe not the cleanest but it does the job perfectly!
thanks a lot for the quick reply! this solves me a big issue that was quite anoying.