From/To Room from linked file

Hi all, I’m trying to get from Room and To Room from a Linked file, but I can’t access to this parameters. I’m quite new in Python, I don’t have how to access to this parameters trough it.
What I did is Get Documents -> Elements.GetFromLinkedFile -> Select only Level GF -> Python

import clr

Import RevitAPI

clr.AddReference(“RevitAPI”)
import Autodesk
from Autodesk.Revit.DB import *

Import DocumentManager and TransactionManager

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

Import ToDSType(bool) extension method

clr.AddReference(“RevitNodes”)
import Revit
clr.ImportExtensions(Revit.Elements)

Start Transaction

doc = DocumentManager.Instance.CurrentDBDocument
TransactionManager.Instance.EnsureInTransaction(doc)

#Declare list variables

FromRoom =
elements =

#unwrap inputs
for i in IN[0]:
elements.append(UnwrapElement(i))

#List the “To Room” for all phases
for i in elements:
for phase in doc.Phases:
if i.CreatedPhaseId == phase.Id:
try:
from_room=i.FromRoom[phase]
FromRoom.append(from_room)
except:
FromRoom.append(None)
continue

End Transaction

TransactionManager.Instance.TransactionTaskDone()

OUT = FromRoom

and after just Set Parameters by name in the element, but from this python node I have Empty list

Is possible to access to this parameters?
How can I access to them?

Thanks!!

Hi
What I’m trying is get parameters from the family doors in from linked file (architects File). From Room and To Room
If I create a new shared parameter in the Door family, and I extract this From/To room and copy them into this new parameters, Save and reload in my file, Is the only way I found to do it.

I would like to know how to access to the parameters in the linked file with my python Script

As a workaround, you could easily get this information in a Revit schedule by clicking on “Include elements in links” in the Field palette of a schedule, see here:


And then use a Schedule.GetData node from Bimorph Nodes:

I don’t know if this could help with your Python workflow though…

2 Likes