It shall be the duty of the county surveyor to execute all orders directed to him or her by any court of record for surveying or resurveying any tract of land, the title of which is in dispute or in litigation before the court, and to obey all orders of survey for the partition of real estate, and also to accompany viewers and reviewers of roads for the purpose of running and measuring any proposed road, whenever required by the viewers or reviewers.