Issue with Phasing

Banging my head here. I’ve created a fake Room Calculation Point element nested inside my Signage element. I use Rhythms’ nodes to extract the nested family, get the room number, and simply update the signage Mark. But it only works if my phase is set to New Construction. If any of my rooms have been created under any other phase, it can’t seem to find the nested Room Calculation Point element.

What am I missing?



Thanks for any help,
Mike

Hi,
try this workaround

import sys
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *

#import Revit API
clr.AddReference('RevitAPI')
import Autodesk
from Autodesk.Revit.DB import *
import Autodesk.Revit.DB as DB

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

doc = DocumentManager.Instance.CurrentDBDocument

def getter_Room(e):
	for s in doc.Phases:
		try:
			return e.get_Room(s)
		except Exception as ex:
			if "not exist in the given phase" in str(ex):
				pass
			else:
				raise Exception(ex)

docPhases = doc.Phases
elem = UnwrapElement(IN[0])

OUT = getter_Room(elem)