Thanks TIG.
I like this solution. It should work in principle for the objects whose properties I am going to change. I think I have to change the way I store the objects though. Let me explain.
The goal is to produce an insolation contour across the development (at ground level). To do this I do the following:
1 - mesh the surface that represents the interstitial space between buildings
2 - for each grid node I cast rays to cover the whole hemisphere
3 - for each ray I use raytest to verify whether I see the sky or I see an obstruction (this obstruction can be transparent or it can have an assigned temperature)
Each Ray is an object with properties: direction, shaded_state, temperature, transparency and so on (there is no reference to Sketchup objects)
Each grid node is represented by grid_node object with properties: coordinates and an array of Rays
In order to implement your solution I think I will need to store the reference to the actual object that the Ray sees (if it does). I am not sure I can store a reference to a SketchUp object? Would the search in the datafile be faster than the re-calculation? I will test.
Your proposed solution will not help though for the impact that a NEW object can have on specific grid nodes. My idea for this case was to replace the raytest with an intersection test between the new object (this is usually some form of local shading such trees, canopies, etc.) and the various rays for each grid node. I guess that the intersection test should be faster than raytest.
Thanks again.