In all actions at law, or suits in equity, in any of the district courts of this state, wherein the title or right of possession to any mining claim, or ores and minerals is in dispute, any party to such action or suit shall have the right to go upon or enter the workings of said mining claim for the purpose of measuring or surveying the same, either upon the surface or in the workings thereof, peaceably, and without molestation; the costs and expenses of such measurement or survey to be paid by the party for whose use and benefit the same was done.
NMS § 42-4-26