You might be surprised at some of the cool samples that are included in the Revit SDK – which is likely already installed on your system.  Here are a few notes on pathing that may assist:

Build Revit API Samples:
C:Revit 2014 SDKSamplesSDKSamples2014.sln

Copy these files

to
C:Program Files (x86)Reference AssembliesMicrosoftFramework.NETFrameworkv4.0

Build solution

Modify DLL path in:
C:Revit 2014 SDKSamplesRvtSamplesCSRvtSamples.addin
to
C:Revit 2014 SDKSamplesRvtSamplesCSRvtSamples.dll

Save the .addin to:
C:ProgramDataAutodeskRevitAddins2014

Stairs and railings in Revit can be extremely frustrating.
In fact, I’m often annoyed that I can’t even model a Railing in-place, as the Railing category isn’t available for in-place families!
So, how do you make an unusual ‘custom’ railing connection work?
In 10 steps:
  1. Create a 3D view with section box around the connection you would like to resolve
  2. Export this 3D view to a DWG file.
  3. Create a new Generic Model family.
  4. Import the 3D DWG.
  5. Using the context you have now imported, model the rest of the baluster / railing connection.  I recommend that you use Reference Lines and then create Sweeps using ‘Pick Lines’.
  6. After you have modeled the custom 3D geometry in the Generic Model family, create a Baluster Post family.
  7. Load the Generic Model family into the Baluster Post family.
  8. Load the Baluster Post family into the Project.
  9. Apply your new custom Baluster Post to the Start / Corner / End post of the Railing you are trying to correct.
  10. In the Baluster Post family, rotate and move the Generic Model family around until it is in the right place and reload into the Project.
For a sample project showing one of these connections, open the following file:
For a sample Baluster Post family, download the following file:
I found this ‘section box’ technique in the book Mastering Revit Architecture 2011.