Dear Ricky,
Have you taken look at the Revit SDK FabricationPartLayout sample?
It shows how to use the Fabrication Part API to create a sample layout, which includes rectangular and round ductwork, tap placement, rotations and straight optimizations and connections to a generic Revit family instance.
I hope thta helps.
Please let us know how you end up solving the issue.
Thank you!
Cheers,
Jeremy