Hi there
I’m wondering if it’s possible to set a specific Site through Dynamo. Any thoughts on this?
Best
Christian
Hi there
I’m wondering if it’s possible to set a specific Site through Dynamo. Any thoughts on this?
Best
Christian
Hi @Christian_Boggild_Sc ,
you can set it by name like this :
import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import*
clr.AddReference('RevitServices')
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument
pls = FilteredElementCollector(doc).OfClass(ProjectLocation).ToElements()
TransactionManager.Instance.EnsureInTransaction(doc)
for pl in pls:
if pl.Name == IN[0]:
doc.ActiveProjectLocation = pl
break
else:
continue
TransactionManager.Instance.TransactionTaskDone()
OUT = doc.ActiveProjectLocation
That is perfect! Thanks Mostafa