Creating Rooms from Spaces

Hi Guys,
I want to know, is there any way to create rooms from spaces?. If any nodes available for that?. I searched all websites and our forum, but i didn’t get any solution for that.If anyone knows, please guide me to create.

Thanks in advance.

From the MEPover package:

image

Collect the location point from the Spaces and use them as input.

Hi martin,
Thanks for the reply. I can’t get the location point of the spaces. I don’t know which node is suits correctly for that. Can you tell me which package and node suits correctly.

Hi @vignesh0t,

Try the Element.GetLocation node. It should do the job :slight_smile:

Thanks martin. Now, i get some idea. But, i don’t know what node i need to use before phase input.phase

import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
# Import ToDSType(bool) extension method
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)
# Import geometry conversion extension methods
clr.ImportExtensions(Revit.GeometryConversion)
# Import DocumentManager and TransactionManager
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
from System.Collections.Generic import *
# Import RevitAPI
clr.AddReference("RevitAPI")
import Autodesk
from Autodesk.Revit.DB import *

doc = DocumentManager.Instance.CurrentDBDocument
uiapp = DocumentManager.Instance.CurrentUIApplication
app = uiapp.Application
uidoc=DocumentManager.Instance.CurrentUIApplication.ActiveUIDocument

levels = UnwrapElement(IN[0])
newRoomList = []

TransactionManager.Instance.EnsureInTransaction(doc)

for level in levels:
	
		newRoom = doc.Create.NewRooms2(level)
		newRoomList.append(newRoom)
					
TransactionManager.Instance.TransactionTaskDone()
OUT = newRoomList

Hi Vignesh
This works the only input is level
have a good day

Thanks for the script bro. It works fine now :slightly_smiling_face:

Hi bro,
I have some issues with that. I need the nodes,that only converts the spaces into rooms. But, in this script, it automatically create rooms for the not placed room also.

its more simple just download DynamoMEP Package and use CustomRoom.point

Thanks for the guide.
Here is the final solution.

Where are the nodes CustomRoom.ByPoint and Manage.RemoveNulls? I couldn’t find them. Are they custom?

It didn’t work for me, could you help me? Will Python only connect at the surface level?

Try using Room.ByLocation instead of the CustomRoom.ByPoint node. The Manage.RemoveNulls node is part of Lunchbox.

Thank :grin: :grin: :pray:

You’re welcome. I unchecked my answer as the resolution, since you weren’t the original author of the post. For future reference, unless the post you are adding comments to is recent and still without a resolution, it would be better to create a new post with your questions. Have a good day!