Not sure if PVC in an attic was a code violation. could not find anything in the building codes and might need to change some work. another contracter brought pvc into an attic space and the run was continued with more pvc instead of transitioning to emt.