What would one do with the knowledge of the IDD (the index of a certain object in the list of picked objects) when all objects are picked ?
Certainly when calling a funtion. I suppose the function gets called from a situation where there is certain picked object list. And one wants the IID of that object in that specific list. There is not one correlation between the picked list (and its indexes) in the event with the function call and the picked list in the on function (all and theire indexes when picked all).
Just pick the instances (or objects with a famely) you want to pick. (make a picklist)
Run trought them with a for loop
Pick the instance by its IID (pick nth) = loopcounter
This instance has an UID, but that is not importand now at this moment yet
Set an instance variable to the IDD or to the loopindex
Now you can pick any instance with an UID, its IID is in the instance variable.