Change pipe type (Pipes and pipe Fittings)

Hi,
Actually i have some pipe types in current project. i have modeled with pipe type as Drainage and i want change to pipe type as Water (some network). i have developed script but im facing the issue. could please any one can help this…

Pipe Type in current model
image

Script snap


Thanks

Bro. i think you are trying to change the family type of the element.
can you try with this node.

image

Bro,
i have tried its not worked. the intern is i want to change the Pipe Type in entire network.
inside of doing revit manually image. I’m developing dynamo program.

Thanks…