How Create Railing from Path

Last time I looked at railings, we could only add them programmatically to stairs. As Konrad mentioned, Revit 2017 has a new Railing.Create method that accepts curves, but for earlier versions I had to resort to using slab edges. Here’s an old thread with a sample: