Is there a script that will replace a shape with another shape?

 From:  Matadem
11945.3 In reply to 11945.2 
Would it be possible to replace the shape based on the center of the object...that would work as well.
So not to worry about the shape but the items selected.

So I have shape and I want to replace it with the selected items while deleting them as well and putting them in the center.

Tnx!