I have created a script that creates and then builds a Schedule. The trouble I am having is: how do you tell Dynamo to open a schedule view by feeding the node a scheduleView (Revit.Elements.Views.ScheduleView)? I’ve tried using the “Show Element” node from GeniusLoci (I’ll paste the Python code below) but Revit then tells me there is “No good view could be found.”
Has anyone been able to ‘call up’ a schedule view, with a node that is fed a Revit.Elements.Views.ScheduleView element/input?
import clr
clr.AddReference('RevitAPI')
import Autodesk
from Autodesk.Revit.DB import ElementId
clr.AddReference('RevitAPIUI')
from Autodesk.Revit.UI import *
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
uidoc = DocumentManager.Instance.CurrentUIApplication.ActiveUIDocument
import System
from System.Collections.Generic import List
elements = UnwrapElement(IN[0]) if isinstance(IN[0],list) else [UnwrapElement(IN[0])]
elemId = List[ElementId](x.Id for x in elements)
uidoc.ShowElements(elemId)
uidoc.Selection.SetElementIds(elemId)
OUT = IN[0]