Change Room Phase

@Mostafa_El_Ayoubi me either I didn’t notice that :slight_smile:
@Andreas_Dieckmann I already tried that yesteday, and I thought about it as a second choice; if I couldn’t achieve creating the rooms directly with the phase option.

However; I found a node which creates a non-placed room by name, number, and phase (ClockWork package) but unfortunatly it doesn’t work on Dynamo 1.2.
So I tried to update it, here is the daiagram.

And this is the Python script which creates the room by name, number, and phase:

import clr
clr.AddReference(‘RevitAPI’)
from Autodesk.Revit.DB import *

clr.AddReference(“RevitServices”)
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

doc = DocumentManager.Instance.CurrentDBDocument
doccreation = doc.Create
names = IN[0]
numbers = IN[1]
phase = UnwrapElement(IN[2])
counter = 0
elementlist = list()

TransactionManager.Instance.EnsureInTransaction(doc)
for name in names:
newroom = doccreation.NewRoom(phase)
newroom.Name = name
newroom.Number = numbers[counter]
elementlist.append(newroom)
counter += 1
TransactionManager.Instance.TransactionTaskDone()

OUT = elementlist

Also I found a node by @Julien_BENOIT which creates room by level and point

here is python script:

Developers nodes in dynamo 0.7
#proposed by Julien Benoit @jbenoit44
#http://aecuandme.wordpress.com/
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

uvs =
for i in IN[0]:
uvs.append(UnwrapElement(i).ToXyz())
level=UnwrapElement(IN[1])
roomlist=

Start Transaction

TransactionManager.Instance.EnsureInTransaction(doc)

for item in uvs:
uv=UV(item.X,item.Y)
a=doc.Create.NewRoom(level,uv)
roomlist.append(a)

End Transaction

TransactionManager.Instance.TransactionTaskDone()

OUT = roomlist

So I am thinking of “merging” the two scripts together; to have one single script which creates a room by: name, number, level, point, and phase
But my "scripting’ knowledge is almost zero :slight_smile:
So I apperciate if you could help me out with this guys.
Regards