Let's say we have many overlapping objects. Why are they overlapping? Could be any number of reasons, but most likely because they were generated from a script and the script put them all in the same spot. They are each a little different, so rather than generating new objects we need to clean up our existing ones.
How can we write a script (or use some other method) to distribute these objects in a straight array-like line?
Sure, we can select any individual object by Alt-RClicking, but we would still need to place each one manually.
In the end we want something like this:
Not so difficult to manually place a few of these, but when you have hundreds of objects that's a different story.
There is a question similar to this one, but the answers provided did not work for me. One answer was to use a particular add-on (Oscurart Tools), but when I tried it the Distribute button did not work, so I suspect the add-on is not functioning properly in more recent versions of Blender. The other answer was basically "repeat the last thing you did using Shift R" but obviously that only works at the time of creation, and is of no use when faced with an existing heap of overlapping objects.
Any help appreciated.