Although the order of the trial court purports to be a dismissal of plaintiffs claims, because the court considered matters outside of the pleadings, the order is actually a grant of summary judgment for defendants. A motion to dismiss for failure to state a claim is converted to a N.C.R. Civ. P. 56 motion for summary judgment when matters outside of the pleadings are presented to and not excluded by the trial court. Stanback v. Stanback, 297 N.C. 181, 205, 254 S.E.2d 611, 627 (1979). In this case, the order clearly shows the court considered the affidavits submitted by the parties in making its decision. Since the affidavits were not incorporated by reference into the pleadings pursuant to N.C.R. Civ. P. 10(c), the affidavits are matters outside of the pleadings. Consideration by the trial court of the parties’ affidavits and supporting documents converted the motion to dismiss into a motion for summary judgment.
Plaintiff suffered no prejudice by treating the motion to dismiss as one for summary judgment. Defendants filed their motion and supporting affidavit in May 1994. Since the court did not hear the motion until August 1994 and because the motion specifically stated the grounds upon which defendants sought relief, plaintiff had ample time to prepare to defend the motion and present supporting evidence. Plaintiff did in fact file two supporting affidavits and accompanying documents. Further, by attending and participating in the hearing without objection or without requesting a continuance, plaintiff waived any right to object to the summary judgment hearing on the ground of lack of notice. Raintree Corp. v. Rowe, 38 N.C. App. 664, 667-68, 248 S.E.2d 904, 907 (1978).
Because the court’s order acted as a grant of summary judgment for defendants, on appeal this Court must affirm if there are any grounds upon which to sustain the granting of summary judgment. Shore v. Brown, 324 N.C. 427, 428, 378 S.E.2d 778, 779 (1989). After reviewing the record, we find there are grounds to sustain the granting of summary judgment and affirm.
 The trial court held that: “Plaintiff’s complaint . . . fails to state claims upon which relief can be granted in that Plaintiff failed to comply with all conditions precedent to maintaining the alleged causes of action against Defendants.” The applicable statute of repose for plaintiff’s cause of action is six years. N.C. Gen. Stat. § l-50(5)(a). This *348statute is substantive in nature and requires as a condition precedent that a plaintiff establish that the action has been brought within the six-year period. Sink v. Andrews, 81 N.C. App. 594, 597, 344 S.E.2d 831, 833 (1986). This Court has held that under North Carolina law, statutes of repose are conditions precedent which must be specially pled pursuant to N.C.R. Civ. P. 9(c). Tipton & Young Construction Co. v. Blue Ridge Structure Co., 116 N.C. App. 115, 118, 446 S.E.2d 603, 605 (1994), affirmed per curiam, 340 N.C. 257, 456 S.E.2d 308 (1995). If a plaintiff does not aver compliance with a condition precedent, such as a statute of repose, then the plaintiffs case is insufficient as a matter of law. Id.
Plaintiff failed to allege in its complaint when the last act or omission of defendants or substantial completion of the construction of the condominiums occurred. Plaintiff also failed to allege that the last act or omission or substantial completion of the construction, whenever it occurred, occurred within six years prior to the filing of this action. However, plaintiff argues in its brief that even if the action was filed outside of the six-year statute of repose, this case falls within the exception contained in G.S. l-50(5)(d). Nevertheless, plaintiff also failed to specially plead in its complaint any grounds to show the exception applied in this case or any other grounds to show the six-year statute of repose should not apply. Under this Court’s holding in Tipton, because plaintiff failed to specially plead that its action was brought within the applicable statute of repose, plaintiffs cause of action is insufficient as a matter of law.
 The trial court also held that: “Plaintiff has further failed to show that it has standing to assert its claims against Defendants.”
“[I]t is elementary that the substantive issues cannot be considered unless the party raising them has the capacity to do so.” Property Owners’ Assoc. v. Current and Property Owners’ Assoc. v. Moore, 35 N.C. App. 135, 136, 240 S.E.2d 503, 505 (1978). If a party is not a natural person, it must affirmatively allege its legal existence and capacity to sue. N.C.R. Civ. P. 9(a). Evidence in the record and presented to the trial court shows the plaintiff was incorporated in October 1985 under the name of “Richland Run Condominium Association, Inc.” as a homeowners association for Richland Run Condominiums. As stated in the declaration establishing the condominium, and because of the date of incorporation, the association is *349governed by N.C. Gen. Stat. § 47A-1 et. seq., commonly known as the “Unit Ownership Act” (the Act). Under the Act, any cause of action relating to common areas and facilities is to be brought by “the manager or board of directors, in either case in the discretion of the board of directors, on behalf of two or more of the unit owners, as their respective interests may appear . . . .” N.C. Gen. Stat. § 47A-26.
In construing who may bring an action under the Act, this Court has said:
Where the legislature has specifically designated certain statutory procedures, it has by implication excluded other procedures. To hold . . . that the statutory designation of parties who may maintain an action is merely illustrative, would make the statutory designation meaningless and contrary to both its implication and the rule of strict construction. This is especially so since the corporation here exists by virtue of statute and operates under the statutory scheme established by G.S. Chapter 47A ....
Laurel Park Villas Homeowners Assoc. v. Hodges, 82 N.C. App. 141, 143, 345 S.E.2d 464, 465-66, disc. review denied, 318 N.C. 507, 349 S.E.2d 861 (1986) (citation omitted). As in Laurel Park, we find nothing in plaintiff’s articles of incorporation and bylaws giving the homeowners association the power to bring this action. The bylaws give the board of directors the power to “enforce by any legal means or proceedings” the provisions of the bylaws and articles of incorporation and to “hir[e] attorneys and other professionals.” The bylaws do not address whether the plaintiff association has the power to bring an action such as the cause of action in this case. Nor has plaintiff alleged other grounds which might give the homeowners association standing in this case. Therefore, the Act controls and only the board of directors or the manager, not the homeowners association, may bring this action on behalf of the aggrieved property owners. See Laurel Park, 82 N.C. App. at 143-44, 345 S.E.2d at 465-66 (where plaintiff homeowners association has not been given power to bring suit, association has not alleged it owned any land, association has not alleged that the action is maintained by its board of directors or manager, and no aggrieved owners are involved, association has no standing and action must be dismissed).
Plaintiff argues it could have cured the lack of standing if the trial court had granted its motion to amend the complaint. We disagree. The motion to amend and the proposed amended complaint show that had the motion been granted, the caption and body of the com*350plaint would reflect plaintiffs true corporate name. However, the plaintiff homeowner’s association, even under its true name, would not have been the real party in interest. “The real party in interest is the party who by substantive law has the legal right to enforce the claim in question.” Insurance Co. v. Walker, 33 N.C. App. 15, 19, 234 S.E.2d 206, 209, disc. review denied, 293 N.C. 159, 236 S.E.2d 704 (1977).
Notwithstanding the fact that plaintiff’s proposed amendment would not have cured its lack of standing, plaintiff argues in its brief that it should have been allowed to amend its complaint pursuant to N.C.R. Civ. P. 17 to reflect the real party in interest, and that the amendment “would have included all information about the parties and their organizational history that became clear following the hearing.” (emphasis added). Rule 17 states, in part:
No action shall be dismissed on the ground that it is not prosecuted in the name of the real party in interest until a reasonable time has been allowed after objection for ratification of commencement of the action by, or joinder or substitution of, the real party in interest....
N.C.R. Civ. P. 17(a). However, based on the facts of this case, the trial court did not err by refusing to allow plaintiff to amend the complaint.
Plaintiff originally alleged in its complaint that it was incorporated in 1989 under N.C. Gen. Stat. § 47C-1-101 et. seq., commonly known as the “North Carolina Condominium Act.” Under N.C. Gen. Stat. § 47C-3-102(4), a homeowners association may institute litigation in its own name regarding matters affecting the condominium. However, as discussed above, the evidence showed plaintiff was actually incorporated in 1985 under the Unit Ownership Act, which requires that litigation be instituted by the association’s board of directors or manager. Upon discovering this information, defendants filed their motion to dismiss. One of the grounds for the motion was that “a homeowner’s association is not the real party in interest to the claims asserted in the complaint and is not authorized to bring this action.” Therefore, when the motion was filed and served, plaintiff was on notice of defendants’ objection to plaintiff’s capacity to bring this action.
Rule 17 requires that a party have a reasonable time after an objection to substitute or join the real party in interest. Here, plaintiff *351had almost three months from the filing of the motion until the hearing to attempt to substitute the real party in interest. Plaintiff did attempt to amend the complaint to reflect its true name and date of incorporation. However, none of the proposed amendments addressed the question of the real party in interest, and in fact, the proposed amended complaint continued to allege that plaintiff was incorporated under the North Carolina Condominium Act rather than the Unit Ownership Act. N.C. Gen. Stat. § 47C-l-102(a) states that the North Carolina Condominium Act only applies to condominiums created after 1 October 1986. The evidence shows plaintiff was created in October 1985. Likewise, the affidavits and materials submitted to the trial court by plaintiff show that plaintiff was governed by the Unit Ownership Act. Based upon defendants’ objection to plaintiff’s capacity to bring this action, combined with plaintiff’s possession of its own bylaws and articles of incorporation, plaintiff could have and should have discovered in the three months between the motion and the hearing that its board of directors was the party with standing to bring this action. Plaintiff’s argument that this information and plaintiff’s organizational history “became clear after the hearing” rings hollow. Therefore, under the facts of this case, plaintiff had a reasonable time to substitute the real party in interest as required by Rule 17. When plaintiff failed to attempt to correct the problem after a reasonable time, the court did not abuse its discretion by granting defendants’ motion. Further, plaintiff’s right to amend the complaint terminated upon entry of judgment. See Johnson v. Bollinger, 86 N.C. App. 1, 7, 356 S.E.2d 378, 382 (1987) (plaintiff’s right to amend terminates upon dismissal unless judgment is set aside or vacated under Rule 59 or Rule 60).
Because we find that plaintiff did not specially plead compliance with a condition precedent and also had no standing to bring this action, we do not reach the issues of whether the trial court properly found that plaintiff’s claims were barred by the applicable statutes of limitation and repose. For the reasons stated, the order of the trial court is affirmed.
Judge WYNN concurs.
Judge GREENE dissents.