Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Filtering exterior walls

6 REPLIES 6
Reply
Message 1 of 7
TorX85
1351 Views, 6 Replies

Filtering exterior walls

Hi,

 

I'm trying to get exterior walls only, but I'm having trouble doing so. At the moment I loop through all the walls in a project, and see if it's exterior or interior.

 

I can't use the WallType.Function, because this is not always correctly entered.

 

I thought the following code would provide an answer, but in my example project I also get faces from interior walls.

 

IList<Reference> sideFaces = HostObjectUtils.GetSideFaces(wall, ShellLayerType.Exterior);

 

Could anyone help me achieve this? I hope to avoid using a 3D view (ray projection) because of performance concerns and the requirement of having a 3d view in your project.

 

I've also found the topic Wall Interior or Exterior, but it's not exactly the same question (and there is no answer yet).

 

Thanks in advance.

6 REPLIES 6
Message 2 of 7
Revitalizer
in reply to: TorX85

Hi TorX85,

 

you wrote:

"[...] because this is not always correctly entered."

That's the point.

Garbage in, garbage out.

 

But there is another approach for you: the BuildingEnvelopeAnalyzer.

 

It says in the RevitAPI.chm:

"This class uses a combination of ray-casting and flood-fill algorithms in order to find the building elements that are exposed to the outside of the building. This method can also look for the bounding building elements for enclosed space volumes inside the building."

 

This may fit your needings.

 

 

Best regards,

Revitalizer

 

 




Rudolf Honke
Software Developer
Mensch und Maschine





Message 3 of 7
TorX85
in reply to: Revitalizer

Hi Revitalizer,

 

Thank you for your reply! Now that you mentioned, I remember finding the thread Finding Exterior walls by BuildingEnvelopeAnalyzer, but it states there are possible problems using this method.

 

However, I've used the sample code in that thread, and it seems to work in my project even with the default BuildingEnvelopeAnalyzerOptions. I hope this method will proof to be successful in different projects as well.

 

FYI, I forgot to mention that I need floors and roofs as well, but that was an easy modification in the code.

Message 4 of 7
TorX85
in reply to: TorX85

Oh no, I stand corrected. Interior walls are also marked as exterior walls using this method. Maybe the same problem as the thread I referenced.

Message 5 of 7
jeremytammik
in reply to: TorX85

I raised this issue with the development team, and they say:

 

BuildingEnvelopeAnalyzer is supposed to be a reliable method to achieve this.

 

If there are problems with the results, this should be filed as a problem report.

 

For us to do so, please submit a minimal reproducible case:

 

http://thebuildingcoder.typepad.com/blog/about-the-author.html#1b

 

To perform your own geometric analysis, you could also look for walls which don't have bounding rooms on both sides. That is easy, assuming rooms have been set in the model.

 

Cheers,

 

Jeremy

 

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 6 of 7
jeremytammik
in reply to: TorX85

After further discussion with the development team, they asked: Is the building model enclosed? It needs to be in order for the analyzer to work. In other words, do you have Roof and Floor elements to form enclosed spaces in the model?

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 7 of 7
TorX85
in reply to: jeremytammik

I wish I could give you an answer, but I raised this issue almost 3 years ago and it's not relevant to me anymore.

 

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community