Hi @taha_ahmed_a,
Here is a LINK to a post which runs through a couple of scenarios. Screencast also added below.
Just to explain, looking at your main problem, which happens when you want to "render" piping in such a way to depict each system type in a different colour. I can see that you already created different pipe types with unique pipe segments associated to each. This will only control the pipe runs to display in different colours when rendering a view. As @Secttor mentioned, you are left with two main options in this case. [1] create pipe fittings, per system, according to the pipe segment material, or [2] which is the quicker, less maintenance intensive route.
Just to add to that route. Create a shared instance parameter which drives the material from the family. Remember to add the same parameter to your project and to the pipe fitting category. Then, create a schedule, which can be used to easily assign the correct material to fittings in bulk. Or, create a Dynamo script which takes care of this which is based on the condition that <IF> System Type = A, <THEN> Set Fitting Material to A (brief sample of what can be done).
LINK TO THE SCREENCAST
Just to run through what needs to happen in the family again.

Sample project used in the Screencast also attached.
Hope this helps!
Rudi Roux
MSc | Digital Engineering Manager
LinkedIn
Revit Mechanical & Electrical Systems 2018 Certified Professional | Revit MEP & Architecture 2015 Certified Professional
AutoCAD 2015 Certified Professional | Autodesk Building Performance Analysis (BPA) Certificate
If this post resolved your issue, kindly Accept as the Solution below. Kudos are always welcome ⇘