External wall information

I hope someone can help me. I know it’s simple, but since I’m new to dynamo, I’m not getting it.
I need to get the area and coordinates of the external faces of my external walls. In other words, I want to know about the project’s surroundings, the total area, the perimeter or coordinates.
I tried to take all the walls, create a solid element and get information from the surroundings of that solid. But I stopped in the process.
How can I do it?

1 Like

This will depend how clean your model is but some options here:

2 Likes

This didn’t work for me. In fact, not even the graphics I managed to make.
I can’t create a mass, because I can’t have something on the floor or ceiling, I need to somehow identify the external faces of only the external walls of the apartment.
Because I need to send it to json later and this file will be sent for development in other software. It’s as if a line was created around the apartment, identifying its coordinates, but automatically, using the external faces of the reference walls. How can I do it? Would you help me?

Maybe worth having a look / try at this https://www.youtube.com/watch?v=leDt4I8uuJI

I’m trying the following script below and it gave the error;

Joining the curve produced more than one thread in the polycurve. A polycurve must have exactly one thread.

What can it be? Where could I be going wrong?

@jacob.small Can you help me?

What can it be us pretty clear. You have multiple curve loops as you are trying to build a PolyCurve from a surface with a hole in it.

Where you are going wrong isn’t clear as I don’t understand what you want to do. By the sounds of it you want to build a custom exporter which isn’t something that can just happen without sanitizing your data or otherwise limiting the scope (remove the window loops).

As far as can I help you, you’ll need to provide more info for anyone to help. A Revit model is a good place to start.

2 Likes

Hi @arqurb i would try get the walls solid without opening as mention, try element.geometry + from clockwork it had that option…probably a overall room could work as well

2 Likes

Hi
a track regarding the layers and use of the Genius Loci package

in this case the finish is equal on all exterior walls
otherwise offset according to different thicknesses then creation of the polycurve
sincerely
christian.stan

2 Likes

Hi,

you can try to use BuildingEnvelopeAnalyzer but results are not perfect, especially if the geometry of the building is complex

import clr
import sys
import System
#
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
import Autodesk.DesignScript.Geometry as DS

#import Revit API
clr.AddReference('RevitAPI')
import Autodesk
from Autodesk.Revit.DB import *
import Autodesk.Revit.DB as DB
#import specify namespace
from Autodesk.Revit.DB.Analysis import *

#import transactionManager and DocumentManager (RevitServices is specific to Dynamo)
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

doc = DocumentManager.Instance.CurrentDBDocument

out = []
scale_GridCellSize = 0.6 # you can ajust here the cell size for the uniform cubical grid
lst_walls = FilteredElementCollector(doc).OfClass(DB.Wall).WhereElementIsNotElementType().ToElements()
nbr_level = len(set(w.LevelId for w in lst_walls))
all_bbx = [w.get_BoundingBox(None) for w in lst_walls]
avg_height = sum([b.Max.Z - b.Min.Z for b in all_bbx]) / len(lst_walls)

# build a building envelope analyzer options object
analyzerOpts = BuildingEnvelopeAnalyzerOptions() 
analyzerOpts.GridCellSize = avg_height * scale_GridCellSize
analyzerOpts.OptimizeGridCellSize = True
analyzerOpts.AnalyzeEnclosedSpaceVolumes = True

envelopeAnalyzer = BuildingEnvelopeAnalyzer.Create(doc,analyzerOpts) 
boundingElems = envelopeAnalyzer.GetBoundingElements()
for linkId in boundingElems: 
    if linkId.HostElementId != ElementId.InvalidElementId:
        elem = doc.GetElement(linkId.HostElementId  )
        if isinstance(elem, DB.Wall):
            out.append(elem)
OUT = out

other possibilities

  • use the alphasahpe algorithm (per level)
  • use Raybouces from outside

related topic

2 Likes

Hi,
Thank you for sharing this class.
You can also make a room outside by serving as the framing zone and filter the walls in contact with the geometric definition of the room (does not work if there are beams outside)
Sincerely
christian.stan

2 Likes

This solution is very good. Thanks!
I got something similar, but I would like something more automatic to sequence the automation without having to stop to select something.

Guys, @jacob.small , @sovitek , @christian.stan , @c.poupin , thank you to everyone who collaborated. I ended up creating something depending on doing something manually, but at least I can do it before running the routine. It’s still not what I would like, but it works.
I create a reference line in the surroundings and the script reads the reference line.
Here’s the solution in case anyone needs something similar.


1 Like

hi, I made a rather quick explanation with an external part, here is something a little more illustrated


cordially
christian.stan

2 Likes