When you say "move or stretch", I assume you mean the pipe, as single Polyline, could be moved as whole, or one of its vertex is dragged/stretched.
There could be different ways to get things done. The simplest way would be simply handle Database.ObjectModified event in conjunction with Document.CommandWillStart/Ended/Cancelled (when user drag, the command in the CommandEnded event's argument is "GRIP-STRETCH"): in the ObjectModified event handler, you test whether the said pipe polyline is changed or not and set a flag (or save its ObjectId) in class level; when a command finishes, test if the changed flag or pipe ObjectId is set. If yes, go ahead to move all the pump blocks to the locations they should be.
The drawback of this simple/easy coding task is that while user drags the pipe polyline, the blocks will not go with the dragged "ghost polyline" and user only see the block position change after the drag is done, thus not so much user-friendly.
The other advanced method would be using Overrule, probably a combination of ObjectOverrule/TransformOverrule/GripOverrule and a Jig opertaion. I can imagine that a custom GripOverule would make a user-friendly drag grip, similar to the ones you often see with C3D Aecc objects: when the pipe polyline is selected, the custom drag grip shows. When user drag it, a special Jig runs that make the polyline and blocks all moves as ghost images. Well, it is easy to say, but the coding of it would be a bit of challenging, or very challenging, depending on your skill level.