The National Building Museum opens to the public at 10 this morning after years of restoration and even more years of anxiety, for there was a time its very escape from the wrecker's ball was in doubt.

To celebrate the building's centennial and its grand opening, a unique exhibit of drawings of federal buildings (some never built, fortunately, but others glorious) is displayed on the first floor, along with some stunning ironwork by the late Samuel Yellin and an irresistible show on the Pension Building itself, the great structure that houses the museum at Fifth and F streets NW.

The architect was Gen. Montgomery C. Meigs, whom we have to thank for the city's water supply system, for the supervision of construction for the Capitol's astonishing iron dome and much else.

Meigs was an engineer trailing dreams of architectural splendor through his life, and whatever lapses from purity there may be in his masterpiece, the Pension Building, you have to admit he left more to look at than the architects of most government and business edifices of the capital.

He is the only architect in history to copy the Farnese Palace in Rome, only doubling its size, and to copy some of the Emperor Diocletian's heroic Corinthian columns while, again, exceeding them in height and bulk. It is true his fourth floor is squeezed between the third floor and the three-story clerestory, with no hint on the exterior that the fourth floor is there, and it is true he lapsed into virtual architectural insanity with his notion of 200-odd busts stuck in small niches 100 feet above the lobby floor where only a stray condor could see them.

His brickwork should get him into heaven, however. Nowhere else in the city has brick ever been handled so lovingly or with so satisfying a degree of skill. The workmen (who were paid $4 a day) wound up buttering 15.5 million excellent hard-baked bricks, not only in walls enclosing greater space than most cathedrals or any American football field, but in such wonders as the eight interior columns 75 feet high (largest Corinthian exercises in the world). Meigs fetched many of his best bricklayers from Baltimore and Philadelphia and kept them going full time.

And yet, such is the human tendency to detraction, scarcely was the building completed after seven years (for $886,614.04, a very low price indeed) than people said what a pity the thing was fireproof -- a remark said to have been uttered by Gen. William T. Sherman, the incendiary of Georgia.

There were 1,500 clerks working on pensions in the building, and some of them hated Meigs' notion of a healthy work environment, which included a steady flow (gale, some said) of fresh air. Below every window three bricks were omitted, and through these holes the tonic breezes of the capital entered every office, summer and winter. Meigs said it was merely damned nonsense that (as some said) a man could make a fortune selling wool socks and underwear in the lobby. There were four steam boilers for winter heat, he kept pointing out. Just a few "thin-blooded clerks" complained. (The Building Museum softies, however, have plugged up all the holes now.)

Still others called it Meigs' ugly red barn, and sneered at it as if it were as hideous as the Rayburn Building.

Meigs was quite keen on the frieze that runs 1,200 feet around the exterior, a terra-cotta procession of soldiers and sailors (modeled realistically from genuine specimens serving in the Boston quartermaster depot). It insistently echoes the Parthenon frieze, which is marble rather than clay, and the work of a supreme sculptor instead of Casper Buberl. To avoid monotony (Meigs hoped, for the frieze repeats itself a good bit in its quarter-mile run) a soldier smoking a pipe in one section appears later on, this time with his pipe knocked off. Still, the firing was good enough that a century later it looks brand new.

The pension clerks moved out in 1926 and the General Accounting Office moved in, remaining until 1950, followed by various agencies including the Civil Service Commission, which remained until 1963. City courts occupied it for a time after that, but in recent years it has largely sat there like a red elephant.

It is one of those buildings that looks better close up than at a distance, where the fine craftsmanship is lost, but the glory of the building is its interior, which is noble. Gen. Meigs carried on considerably about having a "park" in the lobby or interior courtyard, and said wistfully that somebody had already given him two fine palm trees. The fountain is his idea, along with the tile floor (in poor repair beneath its present new carpet); the paving under the arcades, now terrazzo, was originally tile.

People said the food froze at one of the 10 inaugural balls held here, and one of the legends of the capital (along with the frozen food) is that canaries were liberated at a ball, flew to the great clerestory and rained down frozen on the merrymakers. But Isabel Lowry, an archivist of note for the building and wife of its director, Bates Lowry, says surely that was long ago and in another country, as it were.

Neither is there any truth to the firm belief of many that horses once lived up on the fourth floor. Some scholars think this rumor started because the stairs are shallow, to accommodate crippled war veterans, while others think it originated in a ramp at the east end for horses to draw carriages up to the entrance. Still others (and this is the obvious source of the story) figured that if the place looked like a barn there were undoubtedly horses in it, especially since there were no offices in the fourth-floor cubicles, used for storage and possibly messy with things sticking out.

Gen. Meigs was very particular indeed that the offices, all opening to columned arcades around the great lobby, should not have doors. Public business should be done without closed doors. Besides, you'd freeze to death if the offices, each with those three bricks missing in the wall, did not get some warm air wafting in from the courtyard. He also thought the ceilings of those offices visited by the public should have at least moderate decoration. (Director Lowry said some of this has been uncovered by the simple expedient of rubbing the vaulted ceiling with an unbelievable amount of art gum.)

If it is the fate of any building, no matter how beautiful, to be carped at and deplored by critics sooner or later as the centuries roll, it is also the fate of any building, beautiful or not, to attract the affection of all if it just sits there long enough. This is because subsequent buildings are even worse, or else because no nation has energy enough to keep on hating something too large to be ignored.

Of course, if you work like a dog for years on any project, especially on any building, it becomes more precious as your fight goes on to save it.

As long ago as 1968 such lovers of great space as architect Chloethiel Woodard Smith were suggesting the Pension Building be turned into a museum of the building arts. By 1974 a small committee was meeting to brainstorm this idea. Lawyers, architects, critics and government officials pitched in to make the dream (a pipe dream, some said at the time) come true.

Wolf Von Eckardt, then architecture critic for The Post, at first thought it should be a community center of some kind but wound up committed to the building museum project, writing the brochure that was presented to Congress. Cynthia R. Field twisted an infinitude of legislative arms, showing how every right-thinking congressman would wish to support such a museum. Dozens of others, all volunteers, spent roughly a trillion hours before the museum was to open. Director Lowry yesterday saluted all who had guided the project through "tricky waters."

The building is still owned by the federal government, which lends it to the museum board, a private group. Taxes pay the building upkeep, and a variable (depending on the political climate of the time) amount of money for operation, but sectors of the building industry will, it is hoped, pay for many knockout exhibits. Even before the museum opened, there were two festivals conducted by trade groups, at which one could learn more about bricklayers, steamfitters and the endless unsung heroes without whom there would be no buildings.

Congress appropriated money for the museum, but this is not a priority of the present government, which feels the private sector should not expect tax dollars to be used for things like building exhibits. Thus the present show is being paid for by United Technologies Corp. Many of these rare drawings have never been exhibited, some required restoration work and all are vulnerable to light. After this show, which ends Feb. 2, they will be returned to the security of dark storage. United also paid for a superb catalogue of the show, written by Lowry, lavishly illustrated and available for sale at the museum.

Lowry plans to keep the museum's exhibits in the rooms opening to the arcades, rather than to detract from the stupendous space of the lobby. The museum will not be a collection of architectural relics -- a cornice here, a fanlight there -- but it will become in future years a center from which one could find where to go, for example, for information and examples of buildings throughout the country. Its educational programs will eventually become a major part of the museum effort, and instead of a repository of drawings and fragments it will become a site of celebration for building in general, not just for architects but for all the trades and crafts of building. Before the museum opened, a small check was received from two retired electrical workers in Detroit, marked "for our showplace," and to the director this was a gift of major significance.