He was a commissioner of the customs, king's remembrancer in the exchequer, and one of the trustees for improving fisheries and manufactures in Scotland. Both in his private and public capacity he promoted the agricultural and commercial interests of the country. At Dumfries he erected at considerable expense a linen manufactory, and he set on foot a variety of projects for the mining of lead and copper in the county. In 1755 he addressed two letters to the trustees for the improvement of the fisheries and manufactures of Scotland, regarding the common mode of treating wool, which were published by direction of the board in 1756. He was also the author of a paper on shallow ploughing, read before the members of the Philosophical Society, and published in the third volume of their essays. He was a remarkably clever draughtsman, and etched a variety of views of Scotland. On the death of his elder brother in 1782, he succeeded to the baronetcy and estates of Penicuik.