Welcome! Here are the website rules, as well as some tips for using this forum.
If you've found help here, check back in to let us know how everything worked out.
It's a great way to thank those who helped you.
power vented water heater
One thing that I would consider is the condensation that will form in the pipe over that exposed run.
As for the code, ask the local inspector their thoughts. They are the ones that will give the final thumbs up.