Hi Fran,
I’ve never heard about building code restrictions to a furnace or water heater PVC vent pipe painting. However, there might be some restrictions concerning PVC vent pipe installation and painting listed in the appliance’s installation manual, so you’d have to look into it.
Some manufacturers forbid PVC vent pipe installations in direct sunlight exposure. If such location is the only choice, the PVC vent pipe’s surface must be protected from UV rays, usually with coating / painted.
Unfortunately there are other issues with PVC pipes used for venting of the water heater and / or furnaces. Regular PVC (there are also CPVC and ABS types) vent pipe temperature rating is only 140°F, any temp above that may cause melting of the pipe and any coating / paint that has been applied to it… and the temperature of your exhaust gasses is usually around 20°F higher than the thermostat setting, what’s yours?
Going back to your PVC vent pipe painting, if the pipe overheats and starts melting, the pain could melt as well or start smoking emanating toxic fumes. Let me know if you have any further questions, just click “comment” below.