Hi All,
Im tryng to use the wall by face node using a mass i created from a linked cad, and works fine but just with some faces, when i try to select all the faces of the mass using the select faces node, it just allow me to select some of the faces and not all of them, i guess is because of the number of the faces as there are many, any idea how to solve this?
I think alternatively you can query mass geometry, get faces from there and convert them to proto geometry or work with proto from the beginning, get the geometry and explode it then filter by face normals to get either bottom or top faces.
i guess is because of the number of the faces as there are many
Quick test can tell if this is true though. I mean you can select multiple times put the faces into several group.
Thanks for the reply, i tried different methods to get the geometry of the mass but no luck for now, not sure if you can explain with more detail how to do it. The selection faces node just allow me to make one selection, i created 5 nodes so i can multiply the selection and seems to work, so the number of the triangles is not an issue, i would like to have a better and more clean solution to select the faces
Would help to have a sample model to reproduce with - can you post the .rvt or a model with a similar condition?
Indeed a sample would help.
I was thinking that extracting faces from the Geometry Property of an Element is an option. This way, the step of selecting through UI can be avoided, and peculiar issues related to UI selection might be skipped then. And I am using Revit 2025 and thereâs a neat little one called Element.GetGeometry, though I am not sure if it is available in earlier builds. Once you hook the node to the ones you cant select, see if there are faces. It gets interesting if there are no faces in the output.
Some useful links (get geometry through code which I think it is what the node does)
API usage of âget_Geometryâ command to retrieve element geometry - Developers - Dynamo
Project1.rvt (3.1 MB)
i tried with different nodes to get something similar, i think is not working because the mass have been made with a linked cad, i just get an empty list. Maybe im in the wrong direction, im just trying to covert the linked cad in something solid, like a wall in this case
so my main problem is to select the faces, when i make the window selection there is an issue, if the window is small i can select all the faces inside, but if i increase the window i can just select a portion of them( like in the first picture), looks like this node has a limitation for the number of faces that can be selected
I think by zooming out Revit is not maintaining the fidelity needed to maintain the faces, which is a function of the graphics display. The theory being that if Revit doesnât draw them as theyâre too small to render then you canât select them - this is a function of the UI. Trying with a programmatic means of pulling the faces should result in a better outcome. Youâre still going to have a triangulated form but it should give you a collection of triangulated walls instead of a mesh.
I hope this works on your machine. I rely on the python node to accomplish this but if nodes at the upper part of the image are available to you, you can stick to nodes as well. After all, the indices and vertices are all there.
In case the nodes are not available:
# Load the Python Standard and DesignScript Libraries
import sys
import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
from Autodesk.Revit.DB.Structure import *
clr.AddReference('RevitAPIUI')
from Autodesk.Revit.UI import *
clr.AddReference('System')
from System.Collections.Generic import List
clr.AddReference('RevitNodes')
import Revit
clr.ImportExtensions(Revit.GeometryConversion)
clr.ImportExtensions(Revit.Elements)
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument
uidoc = DocumentManager.Instance.CurrentUIApplication.ActiveUIDocument
#Preparing input from dynamo to revit
elems = UnwrapElement(IN[0])
test = []
#Do some action in a Transaction
TransactionManager.Instance.EnsureInTransaction(doc)
TransactionManager.Instance.TransactionTaskDone()
opt = Options()
opt.DetailLevel = ViewDetailLevel.Fine
mesh = None
for x in elems.get_Geometry(opt):
if isinstance(x, GeometryInstance):
mesh = [y for y in x.GetInstanceGeometry()][0]
for i in range(0, mesh.NumTriangles):
tri = mesh.get_Triangle(i)
test.append([tri.get_Vertex(0).ToPoint(), tri.get_Vertex(1).ToPoint(), tri.get_Vertex(2).ToPoint()])
OUT = test
To be honest, I had a little trouble making them wall by face. The WallByFace node gave me a full list of null. But I managed to make them directshape walls. If you run into the same problem, directshape might be an option for solid placeholders.
This is because for the node to work the surface has to be tied to a geometry reference of a Revit element.
Such references are fairly easy to construct with solids in the Revit API, but I do not see an easy method to do so for meshes⌠backing into one by playing with the stable representation might be the only way, and that is⌠alot.
Thank you very much, you are a legend!!!
thanks for your help Jacob!!!
Did a little more poking at this⌠there is no âfixâ for your current mesh predicament. In place CAD imports are NEVER a good idea as the geometry is allowed to be invalid, as many CAD apps donât force validation. In this case it has resulted in a surface with a zero length line. If you can take a few steps back in the process and import the data as a solid, or bring the data into Dynamo and clean up it (mesh toolkit can work wonders) you can get a better result in the end.
Thanks Jacob, BimAmbit solution is what i was looking for and works quite well, from pointcloud to wall when the wall is very old and has a crazy shape, i guess there are another ways to do it and achieve something similar or better.
Glad youâre sorted out!
If you have the mesh you originally imported you might want to look at processing that directly via Dynamo and generate the family or direct shape with thickness (skipping the need for the import as an in-place family and then converting to a direct shape). Your file performance will likely be much better without the extra in-place one, so delete that when done either way.
yes you right, sounds good, i think is a better solution, will try that this weekend, thanks Jacob