How to insert a family on each pipe?

Short answer: it’s not possible.

Long answer:I’ve thought about this a few times but there’s a series of steps involved that might make it possible, but I haven’t tried it myself. The Revit API won’t allow you to insert a pipe fitting or pipe accessory directly into a pipe so a workaround is necessary. These would be my presumed steps:

  • Break up the pipe at the point of insertion by shortening the existing pipe
  • Insert the family and connect with the existing pipe
  • create a new pipe from the fitting to replace the pipe that was shortened and connect with the fitting and existing fitting on the other side

The problem with the above workflow is that the fitting is always a loadable family and it’s parameters for diameter can vary per family, so you can never be sure which parameter to use. Furthermore the fitting will probably be placed first before the diameter can be set, resulting in auto-generated transitions by Revit which might cause nearby fittings to generate warnings.