Maryland Del. Patricia R. Sher recalls the sobering assessment she once got from a fellow state legislator during a campaign: "He said, 'We're invisible people running for invisible offices.' "

If the candidates for the General Assembly in Montgomery County's 18th District at times sense the validity of such a sentiment, they are going to lengths this year to dispel it.

Sher is challenging the incumbent, Sen. Margaret C. Schweinhaut, in a vicious, highly emotional battle for the Democratic nomination at stake in the Sept. 11 primary. The primary will decide who wins the Senate seat for the district that encompasses Chevy Chase, Kensington and Wheaton because no Republican sought the office.

The Senate race, which prominently matches Sher's support for abortion rights against Schweinhaut's antiabortion stance, has touched off a scramble for the three House of Delegates seats in the district. Nine Democrats will be on the House primary ballot. The top three Democratic vote-getters will join two Republicans -- John Joseph Heil, of Silver Spring, and Jamie M. Staines, of Wheaton -- in the Nov. 6 general election.

In such a large field, the Democratic House candidates are struggling for recognition. Full slates have lined up behind Sher and Schweinhaut, while three other candidates are campaigning on their own. The House primary promises to be one of the most expensive in the state, with many of the nine candidates spending $30,000 to $50,000 to win a part-time job that pays $25,000 a year.

The abortion battle in the Senate race also has spilled over to the House Democratic primary in a district in which polls show voters strongly in favor of abortion rights. Since eight of the nine Democrats say they favor keeping abortion legal, many are trying to one-up the field by emphasizing the length and depth of their support.

Said Chris Van Hollen, a 31-year-old Kensington resident who is allied with Sher, "The main difference between the two slates is the degree of importance you give abortion."

Del. C. Lawrence Wiser, who supports abortion rights but is running on the ticket with Schweinhaut, said some legislation ensuring continued access to abortion is certain to pass in the 1991 General Assembly. "With that out of the way, people better pay attention to who we elect for the rest of the agenda," said Wiser, 60, who has served one term in the Senate and three in the House of Delegates.

In the House Democratic field, only Timothy F. Ryan, 22, a businessman from Chevy Chase, identifies himself as being antiabortion. "I really don't believe the residents of Montgomery County are for abortion on demand," Ryan said.

The Senate race is a meeting of former longtime allies that Montgomery County political analysts say presents a painful choice for Democrats. Even though a majority of voters may support Sher's stand on abortion, Democrats may find it difficult to give up Schweinhaut's 28 years of seniority in the Senate, observers said.

Sher, 59, the deputy majority leader in the House, was put on the defensive early in the summer when the Montgomery Journal reported that she frequently missed votes in Annapolis. Supporters of Sher, who lives in Silver Spring, replied that many of the missed votes were on unimportant issues.

Schweinhaut, 85, of Kensington , has sought to discuss issues other than abortion, emphasizing her concern about development and the possibility of state tax changes that could particularly hurt Montgomery County. "We have to be very careful that Montgomery County doesn't get financially raped," Schweinhaut said.

In the House races, the slate running with Sher includes Del. Patricia H. Billings, 53, Silver Spring; John A. Hurson, 36, a Bethesda lawyer; and Van Hollen, an adviser in Gov. William Donald Schaefer's Washington office.

Running on the slate with Schweinhaut are Robert Abrams, 59, a retired civil engineer and teacher from Silver Spring; Richard Davis, 64, a retired principal and teacher from Wheaton; and Wiser, a lawyer from Kensington.

Besides Ryan, the other"independent" Democrats seeking House seats are Stephen Silberfarb, 28, of Bethesda, a legislative liaison for the American Israel Public Affairs Committee, and David Weaver, 29, of Wheaton, assistant director of state legislation for Handgun Control Inc.

Many of the House candidates concede that they hold similar positions on issues such as traffic congestion, development, the environment and shielding Montgomery County residents from expected changes in Maryland's tax structure. Beyond those issues, they are seeking to distinguish themselves by experience or devotion to abortion rights.

Abrams described himself as supporting abortion rights, but said that is the only issue on which he disagrees with his Senate running mate, Schweinhaut. "We're hopeful that abortion will not be the only issue," Abrams said. "My high priority would be to increase aid for infant and prenatal care, along with battered wives and abused children."

Billings, who was appointed to a vacancy in the House of Delegates in January 1989, said the slate of candidates running with Sher considers abortion a "key" issue. "There are those among our colleagues who claim to be pro-choice but are trying to elect an anti-choice senator," Billings said. "Our team is united on this issue."

Davis, who unsuccessfully sought appointment to the House vacancy in 1989, said voters shouldn't base their support for a candidate on "emotional single issues." He said potential tax changes that could shift the burden to wealthier counties are a significant long-term threat to Montgomery County.

Hurson, who gained visibility in July when he was removed from his parish council in Bethesda because of his abortion-rights position, said abortion may be a more important issue in the Senate race. "In the long run, I think the things you do in a campaign are going to make a bigger difference," Hurson said.

Part of the credit for such a scrambled House race this year goes to Silberfarb. Early this year, he indicated plans to run against Schweinhaut, and polls showed her vulnerable on the abortion issue. Seeing that the Senate seat might be taken, Sher jumped into the race against Schweinhaut. In so doing, she left a vacant House seat, always an occasion for a multi-candidate race.

Silberfarb said it has been difficult running for the House without the aid of a slate, but added that it shows he can be independent. "I'm willing to take on the party bosses," he said.

Weaver, also running by himself, has had to find ways to stand out in the crowd. One tactic is to stand during the morning rush hour at busy intersections, holding a campaign sign and waving at passing commuters.

"Sometimes it feels absurd, but you have to find ways to communicate with voters," Weaver said. "Name {identification} can account for 60 percent of the vote."