Hey, i have a problem with adding a list of existing Schedules to list of existing Sheets.
I think I have all my data correct, number of sheets is the same as number of schedules, I’ve even provided same number of exact same points…
I checked other topics on this forum related to this question, none of solutions/nodes work.
I’ve tried Julien Benoit python code, I’ve tried PlaceViews nodes from Steam, Create.Viewport from Rhythm. They return all different kinds of error messages.
What i’m looking for is to place corresponding Schedules on their Sheets. Lists are already sorted and of same lenght, but this script places only first Schedule from list on all Sheets
Hey, i found another code that seems to work for me!
import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument
sheets = IN[0]
views = IN[1]
x = IN[2]
y = IN[3]
viewsplaced = list()
TransactionManager.Instance.EnsureInTransaction(doc) # you need an active transaction as you will create elements
for number in range(len(sheets)):
sheet = UnwrapElement(sheets[number])
view = UnwrapElement(views[number])
ScheduleSheetInstance.Create(doc, sheet.Id, view.Id, XYZ(x,y,0))
viewsplaced.append(view.ToDSType(False))
TransactionManager.Instance.TransactionTaskDone()
OUT = viewsplaced
Can you expand on what you mean by ‘Internal’ schedules and why they can’t be placed on sheets?
I’m currently trying to write an all python sheet duplication script but the schedule isn’t passing the Viewport.CanAddViewToSheet condition when all the other views are.
The schedule I’m trying to place is already placed on the sheet that I’m duplicating which is why I’m a bit confused!
There are Schedules which is what you see in the Browser, then Schedule Sheet Instances are those that have been placed on a sheet and reference back to the main schedule.