Every party to a-suit shall be entitled at any time to give notice to any other party, in whose pleadings or affidavits reference is made to any document, to produce such document for the inspection of the party giving such notice, or his pleader, and to permit him or them to take copies thereof; and any party not complying with such notice shall...