Get mass glazing geometry into Dynamo

Hi,
i am currently looking to obtain the geometry (faces/edges) of a conceptual mass, form/shading/glazing/floors, into Dynamo. i haven’t found a way to get the geometry of the glazing. I can get the element ID etc, but not the actual edges/faces.

i can manually select the glazing edges but this is not realistic when working with large complex building forms.

I have tried topology nodes / element.geometry / faces etc.,

I require this as i am looking to use the coordinates in other packages.

Thank you in advance,

Hi @Atkins14 ,

could you share a dummy file with your conceptual mass or drop some screenshots?

Hi!
Could you be more specific? Do you want to get geometry of a Curtain System applied to a mass face or a Divided Surface with panels? Or maybe the mass face itself?
Could you share a dummy file?

Hi,
i am setting the glazing % of the mass via the energy settings (i.e. 40%) - and want to get this geometry into Dynamo. Attached are some screenshots of the revit model and what i am currently using to bring the geometry into Dynamo.

@Atkins14
those geometries are a little tricky to get indeed. Here’s how you can do it :

import clr

clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import*
clr.AddReference('RevitServices')
from RevitServices.Persistence import DocumentManager
clr.AddReference('RevitNodes')
import Revit
clr.ImportExtensions(Revit.GeometryConversion)

doc = DocumentManager.Instance.CurrentDBDocument

opt = Options()

faces = []
for i in IN[0]:
	e = UnwrapElement(i)
	ref = e.GetFaceReferences()[0]
	r = doc.GetElement(ref)
	f = r.GetGeometryObjectFromReference(ref).ToProtoType(True)
	faces.append(f)



OUT = faces
2 Likes

@Mostafa_El_Ayoubi that worked a treat. thanks. The next thing is that the exterior walls are brought in as complete surface (no openings for the glazing surface). How could i extract the glazing geometry from the exterior wall geometry?
Thanks in advance,

@Atkins14 ,
I never found a way to access the exterior wall geometry with opening through the api. But here’s a little workaround … (same python code)

1 Like

That worked a treat. Thanks very much.