This is a dumb basic Python question I have after not doing any scripting for months, but I’ve got a script using doc.Objects.GetSelectedObjects and I somehow just realized that having nothing selected doesn’t return a null value as I assumed, it returns an empty enumeration, and there seems to be no quick easy way to just check if it’s empty?
I tried stepping through it and setting a flag if there is anything in it, and that works to check that it’s empty but if it’s not the script subsequently fails to do anything with the selected objects, like trying to look into this has changed it?!? Am I losing my mind here?
8 posts - 4 participants