First time here? Check out the Help page!
I'd do the following...
WaterUseConnections
objectsHVACComponent
function loop
to get their respective plant loopsLoop
function supplyComponents
to get all supply components for the loop returned as a model object vectorremove
the existing objectsPlantLoop
function addSupplyBranchForComponent
to add the new object to the loopHopefully that helps.