This action was brought by appellee against appellants, to enjoin and restrain the latter from taking up, removing, or in any manner interfering with, a certain pipeline constructed along and across the right of way of said appellants, near the town of Eaton, Delaware county, Indiana.
On a verified showing made to the court, a temporary restraining order was issued. Appellants filed a motion to dissolve the restraining order, which motion was overruled. Issue of law was formed by appellants’ demurrer to the complaint, which demurrer was overruled. Issue of fact was formed by answer of general denial. Trial by the court, and oh request the court made a special finding of facts and stated conclusions of law thereon. To the conclu*334sions of law and to each conclusion appellants separately and severally excepted. Motion for a new trial was overruled, and judgment rendered on the conclusions of law, enjoining appellants from taking up, removing or in any way interfering with the pipe-line in question until February 11, 1917.
Errors relied on for reversal are (1) overruling motion to dissolve temporary restaining order; (2) overruling demurrer to the complaint; (3) error in the conclusions of law; (4) error in each conclusion of law; (5) error in overruling motion for a new trial. As the motion to dissolve the temporary restraining order was based on the alleged insufficiency of the complaint, the first two errors assigned may be considered together.
After averring that appellant, Lake Erie and Western Railroad Company, was operating the Port Wayne, Cincinnati and Louisville Railroad, and owned the entire capital stock of the latter company, the complaint proceeds substantially as follows: That on February 11, 1907, the Port Wayne, Cincinnati and Louisville Railroad Company entered into a certain agreement with the United Box Board and Paper Company, a corporation having a factory located at Eaton, Indiana, wherein and whereby the Port Wayne, Cincinnati and Louisville Railroad Company granted to said United Box Board and Paper Company the right to lay, maintain and use one six-inch pipe for gas along and across the right of way and under the tracks of said Port Wayne, Cincinnati and Louisville Railroad Company, near the town of Eaton, Delaware county, Indiana; ‘ ‘ that a full, true and correct copy of said agreement is hereto attached, herewith filed, and made a part of this complaint, marked ‘Exhibit A’ ”; that in accordance with said agreement, the United Box Board and Paper Company, of Eaton, Indiana, laid and caused to be laid a line of six-inch pipe along and across the right of way and under the track of said Port Wayne, Cincinnati and Louisville Railroad Company, for a *335distance of about 24,100 feet, near said town of Eaton; that said pipe was, ever since has been, and now is a part of a pipe-line running from said gas wells, then owned by the United Box Board and Paper Company, and located in Blackford county, Indiana, through said town of Eaton, and tlienee to the city of Muncie Indiana; that at said time the United Box Board and Paper Company used natural gas for fuel in the operation of its factories at Eaton, Indiana, and also sold the output of its wells, conveyed as aforesaid through said pipe-line, to various factories in and about said city of Muncie; that in a certain action then pending in the chancery court of the State of Now Jersey, wherein the Lockport Pelt Company was complainant, and the United Box Board and Paper Company was defendant, Thomas L. Raymond and Sidney Mitchell were appointed receivers of all the assets of said United Box Board and Paper Company, and said receivers were authorized to sell to appellee leases covering the gas field in Blackford county, and the right of way, pipe-line, gas and gas wells, including the right of way mentioned in the agreement heretofore referred to, executed between the Port "Wayne, Cincinnati and Louisville Railroad Company and the United Box Board and Paper Company. It is also averred in the complaint that in a certain action then pending in the circuit court of the United States for the district of Indiana, between the same parties, said court on July 6, 1908, appointed Sidney Mitchell as ancillary receiver of the United Box Board and Paper Company, and thereafter, an order was entered permitting and authorizing said ancillary receiver to sell to appellee the leases covering the gas field, situate in Blackford county, and the right of way, pipe-lines, gas, gas wells, pipe and fittings therein and thereto; that in conformity with said order the receiver did, on or about December 31, T908, sell and convey to appellee all the property above mentioned, including the right of way granted by the agreement executed between the Port Wayne, Cm*336cinnati and Louisville Railroad Company and the United Box Board and Paper Company; that ever since said time appellee has been and now is the owner of all of said property; that said pipe-line has for a long time been used to convey gas to factories in Delaware county, and particularly in the city of Muneie; that appellee owns and operates the property and property rights herein set out, and that the same are of great value, hot only to appellee but to the industries using gas conducted through appellee’s pipelines, acquired as aforesaid; that such industries are constructed for the use of gas and for no other fuel, and are entirely dependent on said pipe-line for the conveyance of said fuel, and without which said industries would be compelled to close, throwing out of employment a large number of employes, and causing great and irreparable injury and loss to appellee, by reason of damages to which said industries would be entitled by appellee’s failure to deliver such fuel gas.
It is further averred that appellee has paid the full consideration' and performed all the conditions of the agreement between the Fort Wayne, Cincinnati and Louisville Railroad Company and the United Box Board and Paper Company; that appellants knowing that said agreement does not, by its terms, expire until. February 10, 1917, and with full knowledge of the facts herein set out, threaten to, and, unless restrained by the court, will remove said pipe-line, thereby causing appellee great and irreparable damage, and making the balance of said pipe-line and all .of said gas wells, leases and contracts for the sale of gas, now belonging to appellee, of no value whatever; that such threatened action in the removal of said pipe-line would be in violation of the agreement, between the Fort Wayne, Cincinnati and Louisville Railroad Company and the United Box Board and Paper Company. The complaint further shows an emergency for the immediate issuance of a restrain*337ing order, and prays for a perpetual writ of injiuiction on the final hearing.
The contract, set out as an exhibit to the complaint, is shown to have been executed on February 11, 1907, for a term of ten years. No question arises on any part of this contract, except the sixth section, which provides that “the said pipe shall be used for the sole purpose of conveying gas, and this license shall not be assigned without the written consent of said first party being first obtained. ’ ’
1. Appellants insist that the court erred in overruling the several demurrers to the complaint on the ground that the contract between the Fort Wayne, Cincinnati and Louisville Railroad Company and the United Box Board and Paper Company not being the foundation of the action, could not be brought into the complaint by filing it as an exhibit thereto, and that no sufficient statement of the contract is contained in the complaint without the exhibit.
2. 1. It is true that under §368 Burns 1908, §362 R. S. 1881, “when any pleading is founded on a written instrument * * * the original, or a copy thereof, must be filed with the pleading.” This statutory requirement has been held to be imperative. In some cases, however, it is not always clear that the right declared on is directly founded on a written instrument. Injunction is a form of proceeding in which the relief sought is negative in character; that is to say, it is to prevent the commission of some threatened act involving the violation of a contract or duty. When the threat is carried out, and becomes an accomplished fact, the remedy of the aggrieved party is an action for damages for violation of the contract. In such a case, the written contract is clearly the foundation of the action, and must be copied into the complaint or set out as an exhibit to the complaint. We fail to see wherein a proceeding to enjoin a threatened act, *338whereby the complainant’s rights under a contract are about to be violated, is in any essential particular different from a direct action for damages for the breach of such contract, in so far as the contract in each case constitutes the foundation of the action.
In this case the complaint shows that a contract was entered into between the Port Wayne, Cincinnati and Louisville Railroad Company and the United Box Board and Paper Company, by the terms of which appellee acquired certain property rights, for the preservation of which and to avoid irreparable injury, this action was brought. Without the written contract, appellee would have no right of action, either for injunction or for damages. We think the contract was essentially the foundation of appellee’s right, and was a proper exhibit to be filed with the complaint as a part thereof. Old v. Mohler (1890), 122 Ind. 594, 596, 23 N. E. 967; Clupper v. Clupper (1904), 163 Ind. 418, 421, 72 N. E. 125; Williams v. Frybarger (1894), 9 Ind. App. 558, 560, 37 N. E. 202; State, ex rel., v. Adams (1896), 15 Ind. App. 310, 312, 44 N. E. 47.
Appellants make the further point that even if the contract is to be deemed a part of the complaint, still no right of action is shown, for the reason that the same provides that “this license shall not be assigned without the written consent of said first party being first obtained, ’ ’ and hence the instrument by its nature, as well as by its terms, is simply a license and therefore not assignable.
3. 4. *3395. *338It is elemental that courts in determining the nature of a written agreement will look to the engagements of the parties as therein set out, rather than to the designation of the instrument. The agreement before us, while characterized both as an agreement and a license, specifically provides that for a definite consideration the Fort Wayne, Cincinnati and Louisville Railroad Company grants to the United Box Board and Paper Company the right to lay, maintain and use a six-*339inch pipe for gas along and across its right of way for a period of ten years from February 11, 1907, subject to certain supervisory control by the chief engineer of the railroad company. This would clearly constitute an assignable agreement, but by its terms there is an express covenant against assignment without the written consent of the railroad company, and as there is no averment that such consent was first obtained, it is urged that the complaint states no cause of action in favor of appellee. This would doubtless be true, if appellee were claiming a right by virtue of an assignment, from the United Box Board and Paper Company. The complaint, however, shows that he obtained title to the property and leases through a judicial sale, and the rule generally applicable does not obtain in cases where title is taken by operation of law.
Covenants in leases against assignment or subletting, having the force of conditions, are not favored by the courts. It is said in Jones, Landlord and Tenant §464: “Covenants against assignments, or underletting, are not favorably regarded by the courts, and are liberally construed in favor of lessees, so as to prevent the restriction of extending any further than necessary. ’ ’ This proposition is stated even more strongly in Riggs v. Purcell (1876), 66 N. Y. 193, 198, wherein it is said: “Such covenants are restraints which courts do not favor. They are construed with the utmost jealousy, and very easy modes have always been countenanced for defeating them.” Again, in Jones, Landlord and Tenant §466, it is said: “An ordinary covenant against sub-letting and assignment is not broken by a transfer of the leased premises by operation of law, but the covenant may be so drawn as to expressly prohibit such transfer, and in that case the lease Avould lie forfeited by an assignment by operation of law. Where a lessee covenanted ‘not to let, set, assign, transfer, make over, barter, exchange or otherwise part with the premises,’ and after-*340wards gave a warrant of attorney to confess judgment, on which, the lease was taken and sold; this was held to be no forfeiture, for all the words used in the lease point to some act to be done by the tenant himself, and there is a distinction between acts that a party does voluntarily and those that pass in invitum; and judgments in contemplation of law always pass in invitum.”
In McAdam, Landlord and Tenant (4th ed.) §141, the rule is thus stated: “A covenant not to assign is broken by a voluntary assignment for the benefit of creditors, but is not infringed by an assignment by operation of law, as, for instance, under the bankrupt laws in case of the tenant’s bankruptcy, or under the insolvent laws in ease of his insolvency, or by means of an execution sale, for in such eases the assignment is not the act of the tenant, but of the law. ’ ’ This is not a new legal principle, but has been a recognized rule for more than a century. In Doe v. Bevan (1815), 3 M. & S. 353, Bayley, J., said: “In Doe v. Carter [(1798), 8 T. R. 57], it was decided that a proviso, that if the lessee, his executors, administrators, or assigns should assign, the landlord might re-enter, contemplated only a voluntary assignment, and not one which passed in invitum of the lessee, and where the party making the assignment acted in discharge of a duty cast upon him by the law. It has never been considered that the lessee’s becoming bankrupt was an avoiding of the lease within this proviso; and if it be not, what act has the lessee done to avoid it? All that has followed upon his bankruptcy is not by his act but by the operation of law, transferring his property to his assignees. Then shall the assignee have capacity to take it, and yet not to dispose of it ? Shall they take it only for their own benefit, or be obliged to retain it in their hands to the prejudice of the creditors for whose benefit the law originally cast it upon them? Undoubtedly that can never be.” Many other authorities support the propositions above stated, among which are the following: *341Doe v. Carter, supra; Jackson v. Corliss (1811), 7 Johns. *531; Jackson v. Silvernail (1818), 15 Johns. *278; Smith v. Putnam (1825), 3 Pick. (Mass.) 221; Bemis v. Wilder (1868), 100 Mass. 446; Farnum v. Hefner (1889), 79 Cal. 575, 21 Pac. 955, 12 Am. St. 174; Gazlay v. Williams (1906), 147 Fed. 678, 77 C. C. A. 662, 14 L. R. A. (N. S.) 1199; Wood, Landlord and Tenant (2d ed.) 714; 1 Taylor, Landlord and Tenant §408.
It is averred in the complaint before us that appellee purchased the right granted by the lease at a receiver’s sale, made pursuant to an order of the chancery court of New Jersey, and the circuit court of the United States for the district of Indiana. Under the authorities herein quoted and cited, the covenant which would have been broken by an assignment of the lease by the United Box Board and Paper Company would not be broken where the lease was sold on decree in a proceeding against the original lessee. We must, therefore, hold that the rights under the lease originally granted to the United Box Board and Paper Company passed to appellee, and that the complaint is not bad on account of the covenant in the lease against assignment.
Appellants also rely for reversal on error of the court in stating its conclusions of law. We deem it sufficient to say that an examination of the findings discloses that the substance of the contract was set out therein, as was also a description of the leased premises, from ' which a surveyor might locate the same. The law requires no greater exactness.
6. It is finally urged that the trial court erred in overruling appellants’ motion for a new trial, in that there was no evidence that the stipulated rental was paid. This seems to be true. There was no proof of the payment of $1 per annum in advance, as provided in the ¿agreement. Appellee, however, did prove by letters received from officers and agents of appellants that in 1909, a demand was made that appellee execute a new contract providing for *342the payment of an annual rental of $535, and appellee was notified that failure to execute such contract would result in the removal of the pipe-line from the railroad property.
It was fairly shown by the evidence that appellants did not recognize that appellee had any right in the leased premises. On July 28, 1909, the chief engineer of appellants wrote appellee, in part, as follows: “¥e have a pipeline located on our right of way extending for a distance of 24,100 feet north of Eaton, Indiana, which formerly belonged to the United Box Board and Paper Company. This pipe-line is not covered by an agreement, and it will be necessary to either have an agreement executed covering this pipe-line, or have the pipe-line removed.” In a subsequent letter appellants fixed the rental at $535 per annum, and still later appellee was notified that if he could not see his way clear to pay the rental named, steps would be taken to have the pipe-line removed from the railroad company’s right of way.
The evidence shows that appellants were acting throughout on the assumption that appellee had no right of any kind under the grant to the United Box Board and Paper Company. The threat of appellants to remove the pipe-line from their right of way ivas not made on account of appellee’s failure to pay an annual rental of $1, but clearly on account of Ms refusal to execute a new lease at an annual rental of $535. This was the theory on which the action was brought and defended. Another theory cannot be adopted on appeal.
Finding no reversible error in the record, the judgment is affirmed.
Note. — Reported in 100 N. E. 865. See, also, under (1) 22 Cyc. 932; (2) 22 Cyc. 741; (4, 5) 4 Cyc. 20; (6) 2 Cyc. 670. As to the construction of a restrictive covenant in a lease against an assignment or subletting, see Ann. Cas. 1913 B 889.