He was a Liberal in favour of social reform. He gained a parliamentary seat from the Unionists at the Ayr Burghs by-election of 1904.
He was a Member of the Departmental Committee on Housing in 1908. He was Chairman of the Royal Scots Recruiting Committee from 1914 to 1916.[1] He attempted a return to parliament after a 12-year break, without success, when he contested Edinburgh Central at the 1918 general election.
He did not stand for parliament again.[2] Dobbie was knighted in the 1920 Birthday Honours for public and local services in Edinburgh.[3] He was Head of Dalgleish, Dobbie & Co., SSC, Edinburgh. He was a Justice of the Peace in the City of Edinburgh. He was a Legal Member of the Edinburgh Military Tribunal. He was President of the Scottish Vernacular Association.[1]