How get spatial element from room

revit
python
dynamo

#1

Hello,
How can I get spatial element from room in Dynamo PythonScript ?

Im want to use spatial element method to room :
http://www.revitapidocs.com/2017.1/e73594e8-23aa-899f-82fb-3490def8ece2.htm


#2

Im get All rooms in view:

import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
clr.AddReference("RevitAPI")
from Autodesk.Revit.DB import*
clr.AddReference("RevitServices")
from RevitServices.Persistence import DocumentManager
doc =DocumentManager.Instance.CurrentDBDocument
collector=FilteredElementCollector(doc, doc.ActiveView.Id) 

rooms=collector.OfCategory(BuiltInCategory.OST_Rooms).WhereElementIsNotElementType().ToElements()

And later i want to get a spatial element from room :

spatial_rooms=[UnwrapElement(i).SpatialElement for i in rooms] ???
OUT = spatial_rooms


#3

in the end, I want to get surfaces areas of the walls , floors, ceilings from all rooms without the area of including windows and doors


#4

So the Element.Geometry node?


#5

if we will use Element.Geometry node then
we will get solids of rooms and then we can get the surfaces of this solids.
but I need to get the surface finish, probably… because I want to get the wall area of current room without the area of including windows and doors


#6

What is the end goal? couod you subtract door and window areas from the surfaces?


#7

yes) finish room areas dont includes doors and windows areas …may be…
Its could be wrong because of im not projecting the wall
if its true then i want to get this finish room areas)
this areas: