This is adding an alternative method to the great video by Tutorials Up found here - • Fence Along Path In SketchUp ===== Watch First
The slight variations I've used would be using the plugin Mc-Align Endpoints to drop the path onto the terrain. This is done instead of drape, as we don't want to add any additional endpoints. I'm also using the "node" option in the Path Copy plugin by setting the distance to "0". This causes a little bit of manual correction work to the post rotation, but it seemed unavoidable.
There are many different ways to accomplish any given task in Sketchup and no ways are technically right or wrong. Efficiency is always what matters most.