Revision history  [back]

To simplify things and avoid need to check what node has been removed, you might add the new pump first to the existing pump outlet node, then remove the unwanted pump.

next_node = selected_pump.outletModelObject.get.to_Node.get
new_pump.addToNode(next_node)
selected_pump.remove

To simplify simply things and avoid need to check what node has been removed, you might add the new pump first to the existing pump outlet node, then remove the unwanted pump.

next_node = selected_pump.outletModelObject.get.to_Node.get
new_pump.addToNode(next_node)
selected_pump.remove