All External Elements


Hi Guys,
I am trying to create a dynamo script to hide all internal elements of a building. My aim is to use a BIM Model in a city scale model so I want to somehow remove most of the internal elements like internal doors, walls etc. Anyone has any clue or any idea on how we could possibly go ahead with this.
Over riding all materials with an opaque material and doing a lighting analysis and hiding all elements that receive 0 light seems like a full proof method but I haven’t been able to find a solution to do this.
Currently I am creating rooms in a new phase and kind of removing walls which have 2 adjacent rooms but it is not really a full proof method, Any ideas would be really great.


Two ideas:

  1. Use worksets. If workshare was enabled is set up correctly, only load partial worksets into the city model - that is ignore every workset but the shell. If workshare wasn’t enabled, enable it and move the interior elements to the interior workset.

  2. Generate a new mass (or family) from the geometry of all walls with exterior function, all windows, all exterior doors, generic models, and all roofs.

For what it’s worth if you’re asking this question workshare should be enabled so that’s likely the best way to go.


@Amrit_Banerjee Here is a possible approach that uses the floor slab edge to help determine the exterior walls.
As of now, would fail where you have slab projections (balconies). Would require more thought and work to be fool proof.
Below is an example considering one floor
ExteriorWalls.rvt (1.3 MB)
ExteriorWalls.dyn (18.0 KB)


Hi Jacob,
Thanks for taking the time for your input. As for using worksharing or making a new mass… All of these process are more of like a manual method and I am looking for an automated method which I can run on multiple buildings one after the other.
Also Worksharing shouldn’t really be used for what you are saying. A much neater idea would be adding a External/Internal Instance Parameter to the project and filter it based on that if it was to be done manually.


I guess what I was saying about the worksets is that the envelope is usually it’s own workset or two that contains all exterior walls, windows, doors, curtain wall elements, roofs and the like which make up the shell. Just about every model of significance I have ever worked on has been set up like this. If you want to delete all the interior elements then filter by the workset they are in, and delete the elements on all worksets but the shell/envelope workset. Script would be something like this:

  1. Generate a new 3D view.
  2. set the new view to the last phase, and show complete phase filter.
  3. Get all elements in the new view.
  4. Group all elements by their workset.
  5. Trigger UI pop up with datashapes to generate a radio button to generate booleans for each workset name.
  6. Filter out groups based on the results of the UI node.
  7. Mass delete elements in the selection set with the tool.eraser node or similar.

Concern is this might purge a roof or other improperly placed element. Garbage in, garbage out.

The creation of a mass or in place family was referring to trying something based on selecting all walls with an exterior function. I suppose the mass or inplace family could be redundant, and maybe you would prefer to keep the elements as they are.

Something like this:
Same step 1-3.
4) Filter the list into wall elements and non-wall elements.
5) Get the function of the walls, and filter out walls with any function other than exterior.
6) Get all elements hosted to these walls.
7) Remove the roofs and other ‘exterior only’ categories from the set excluded in step 4.
8) Remove the items gathered in step six from the list.
9) Delete the elements still included in the list.

Again, this will suffer if your model hasnt been set up right. Stuff like exterior walls having an interior function, or roofs modeled as floors. Garbage in…


Hi Vikram,
Yes this was also a thing that I thought of but

  • balconies
  • cutouts in the floor
  • smaller multiple walls running along same floor edge
    gave us a lot of trouble.
    Other possible solutions we came to but couldn’t find an effective process were
  1. How does revit find external walls when making Area Plans. I couldn’t find any API call or reference for it.
  2. A lighting analysis seems to be the most fool proof method but I couldn’t really figure out a method with ladybug or Honey bee for that matter.
  3. Currently I am working with spliting all walls at all joints and then hiding all walls which have 2 rooms associated with it. This method works fine but it is quite system hugging and Dynamo crashes out on most bigger buildings. Also Placement of windows and doors become a complicated scenario cause of how Revit references hosts and removes them when long external walls are split.
    A possible alternative to this method would be if we could somehow figure out wether rooms around a wall are on both sides or only one side. Thats again something I have tried and failed at.
    Any insight on any of these methods would be great. :slight_smile:


Ok now I understand why you wanted me to reference out and use Worksets,but the issue here is am getting models from multiple users and there is not really a fixed method of modelling. In fact few of the models for smaller house and landed accommodations don’t even have worksharing enabled.
So from the start the biggest concern is to actually segregate the external and internal elements sohow automatically.
The next steps are actually relatively simple and there are multiple methods for it. And I am actually using something like creating a new view and hiding elements that are internal and exporting out an fbx.
But the key here is still segregating the interior and the exterior elements automatically.


Ah, now I see your issue and why all the given options may not produce the result. I have more questions than answers as a result.

Simplest solution would certainly be to require the individuals meet some sort of quality control standard in the content they send, which I assume isn’t an option.

Might be able to do one of the ray bounce selection methods using a skydome with multiple ray vectors from a tightly spaced UV grid. Although the computation time might be a little intense, specifically as you wouldn’t be able to limit the dataset with any of the usual filters.

What is the end goal once you have the elements in a cleaner model?


Don’t know how, but could probably use this feature to extract the exterior walls
ExteriorWalls-2.dyn (12.4 KB)

Check by Rooms if a Wall is External

Thanks a lot. This was something I was looking for. Now I am trying to automatically create area plans with automatically create boundaries associated with External Walls selected to yes.


End goal is to actually hide up internal elements and export out an fbx for city model.
The idea is to decrease the fbx models drastically by hiding elements which wouldn’t really be required or needed in the city model.
Now the quality control standard is certainly a way to move forward but I still need to somehow Automate a way for all of the BIM Models (1000s of it) which I already have and need to place in the city model. :roll_eyes:


@Amrit_Banerjee You could also consider this work flow …

  1. Create a temporary bounding box (with walls or room separators) that encloses all elements
  2. Create a room in this space
  3. The interior boundaries of this enclosing room would be the exterior walls

Shouldn’t be too difficult to automate the above steps with Dynamo.
The temporary walls and rooms could be deleted later