Can you post a small sample drawing? What kind of connecting? If it's a corridor situation, are you talking about going across door openings, but not including the edges of those openings? Etc.
If you have door-head Lines such as for a reflected ceiling plan, and you turn off the Layer of any doors that might swing into the corridor [as well as Layers of other internal stuff like room names], BOUNDARY should do what it sounds like you want.
[By the way, this really belongs in the Customization Forum, where "AutoLISP" is not a good Subject -- a pretty large percentage of threads there are about that in one way or another. If you made it more descriptive of the particulars, you could catch the attention of someone who may have a solution but might ignore just-plain "AutoLISP" as too generic to bother with.]
Kent Cooper, AIA