You can use Rectangular/Non-circular vessel module in CodeCalc for the header box. It is based on Appendix 13. There is also an example file supplied with the program called "Rctexmpl.cci" that you review.
_________________________
Best Regards,
Mandeep Singh
CADWorx & Analysis Solutions
Hexagon PPM