The Ropes Creek line was named after a nearby creek bearing the same name. It was built during World War II to transport munitions factory workers to and from St Marys. The line opened from St Marys to Dunheved on 1 March 1942 and Dunheved to Ropes Creek on 29 June 1942. When electrification arrived in the 1950s, there was a plan to electrify the Ropes Creek line. For the most part all the sidings in the Dunheved station area were electrified to enable the New South Wales Government Railways (NSWGR) to use electric locomotives of the 46 class to shunt trains without the need to change to diesel-electric or diesel-hydraulic locomotives.