# Placing ScheduleViews on Sheets

**URL:** <https://forum.dynamobim.com/t/placing-scheduleviews-on-sheets/52194>\
**Category:** Revit\
**Tags:** revit, dynamo\
**Created:** [June 23, 2020, 8:47am UTC](https://forum.dynamobim.com/t/placing-scheduleviews-on-sheets/52194 "2020-06-23T08:47:44Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![filip.kabelis](https://avatars.discourse-cdn.com/v4/letter/f/dc4da7/32.png) [@filip.kabelis](https://forum.dynamobim.com/u/filip.kabelis)\
**Post date:** [June 23, 2020, 8:47am UTC](https://forum.dynamobim.com/t/placing-scheduleviews-on-sheets/52194/1 "2020-06-23T08:47:44Z")

</div>

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.

Can you guys help?

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/0/a0f5969823ad9fb78dce6f6e79f5c37e843db818.png)

---

<div class="post-metadata">

**Author:** ![c.poupin](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/c.poupin/32/89152_2.png) [@c.poupin](https://forum.dynamobim.com/u/c.poupin)\
**Post date:** [June 23, 2020, 11:03am UTC](https://forum.dynamobim.com/t/placing-scheduleviews-on-sheets/52194/2 "2020-06-23T11:03:38Z")

</div>

Hello  
try this

```
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
clr.AddReference("RevitNodes")
import Revit
# Import ToProtoType, ToRevitType geometry conversion extension methods
clr.ImportExtensions(Revit.GeometryConversion)

# Import DocumentManager and TransactionManager
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
from System.Collections.Generic import *
# Import RevitAPI
clr.AddReference("RevitAPI")
import Autodesk
from Autodesk.Revit.DB import *

doc = DocumentManager.Instance.CurrentDBDocument
uiapp = DocumentManager.Instance.CurrentUIApplication
app = uiapp.Application
uidoc=DocumentManager.Instance.CurrentUIApplication.ActiveUIDocument

toList = lambda x : x if hasattr(x, " __iter__") else [x]

sheets = toList(UnwrapElement(IN[0]))
views = toList(UnwrapElement(IN[1]))
points = toList(UnwrapElement(IN[2]))

# Start Transaction
TransactionManager.Instance.EnsureInTransaction(doc)
out = []
for s in sheets:
	for v,p in zip(views,points):
		a = ScheduleSheetInstance.Create(doc, s.Id, v.Id, p.ToXyz()) 
		out.append(a)

# End Transaction
TransactionManager.Instance.TransactionTaskDone()

OUT=out

```

_Note:_  
_“Internal” schedules can’t be placed on sheet_

---

<div class="post-metadata">

**Author:** ![filip.kabelis](https://avatars.discourse-cdn.com/v4/letter/f/dc4da7/32.png) [@filip.kabelis](https://forum.dynamobim.com/u/filip.kabelis)\
**Post date:** [June 23, 2020, 12:36pm UTC](https://forum.dynamobim.com/t/placing-scheduleviews-on-sheets/52194/3 "2020-06-23T12:36:57Z")

</div>

Whoa, that was quick. Thank you! I need to finally get into python for revit, this seems to solve most of the problems.

There is one issue though - this code always splats out two of instances of the same Schedule on Sheet - am I feeding it wrong perhaps?

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/5/1/51012e5c44e369b44c12ad1e92144197f62a51a3.png)

---

<div class="post-metadata">

**Author:** ![c.poupin](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/c.poupin/32/89152_2.png) [@c.poupin](https://forum.dynamobim.com/u/c.poupin)\
**Post date:** [June 23, 2020, 12:54pm UTC](https://forum.dynamobim.com/t/placing-scheduleviews-on-sheets/52194/4 "2020-06-23T12:54:11Z")

</div>

@filip.kabelis  
strange…  
the list of Points (IN[2]) and the list of ViewSchedule (IN[1]) must be same length  
IN[0] are sheets to place

---

<div class="post-metadata">

**Author:** ![filip.kabelis](https://avatars.discourse-cdn.com/v4/letter/f/dc4da7/32.png) [@filip.kabelis](https://forum.dynamobim.com/u/filip.kabelis)\
**Post date:** [June 23, 2020, 1:05pm UTC](https://forum.dynamobim.com/t/placing-scheduleviews-on-sheets/52194/5 "2020-06-23T13:05:05Z")

</div>

I fed it only 1 point, 47 sheets and 47 schedules. As it’s seen in post above it did work on all sheets, but twice.

When I fed it 47 same points, 47 sheets and 47 schedules, it’s somehow added 47 schedules to every view…🙂

Other problem i’ve noticed it adds same schedule to every view …  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/3/e307e0f0043ece667dc8c08ee4c5d38a20816dad.png)

---

<div class="post-metadata">

**Author:** ![c.poupin](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/c.poupin/32/89152_2.png) [@c.poupin](https://forum.dynamobim.com/u/c.poupin)\
**Post date:** [June 23, 2020, 1:47pm UTC](https://forum.dynamobim.com/t/placing-scheduleviews-on-sheets/52194/6 "2020-06-23T13:47:59Z")

</div>

It’s the same ViewSchedule to place on other sheets?

---

<div class="post-metadata">

**Author:** ![filip.kabelis](https://avatars.discourse-cdn.com/v4/letter/f/dc4da7/32.png) [@filip.kabelis](https://forum.dynamobim.com/u/filip.kabelis)\
**Post date:** [June 23, 2020, 2:06pm UTC](https://forum.dynamobim.com/t/placing-scheduleviews-on-sheets/52194/7 "2020-06-23T14:06:00Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![filip.kabelis](https://avatars.discourse-cdn.com/v4/letter/f/dc4da7/32.png) [@filip.kabelis](https://forum.dynamobim.com/u/filip.kabelis)\
**Post date:** [June 23, 2020, 3:05pm UTC](https://forum.dynamobim.com/t/placing-scheduleviews-on-sheets/52194/8 "2020-06-23T15:05:43Z")

</div>

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
```

---

<div class="post-metadata">

**Author:** ![c.poupin](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/c.poupin/32/89152_2.png) [@c.poupin](https://forum.dynamobim.com/u/c.poupin)\
**Post date:** [June 23, 2020, 4:46pm UTC](https://forum.dynamobim.com/t/placing-scheduleviews-on-sheets/52194/9 "2020-06-23T16:46:23Z")

</div>

another way

```
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
clr.AddReference("RevitNodes")
import Revit
# Import ToProtoType, ToRevitType geometry conversion extension methods
clr.ImportExtensions(Revit.GeometryConversion)

# Import DocumentManager and TransactionManager
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
from System.Collections.Generic import *
# Import RevitAPI
clr.AddReference("RevitAPI")
import Autodesk
from Autodesk.Revit.DB import *

doc = DocumentManager.Instance.CurrentDBDocument
uiapp = DocumentManager.Instance.CurrentUIApplication
app = uiapp.Application
uidoc=DocumentManager.Instance.CurrentUIApplication.ActiveUIDocument

toList = lambda x : x if hasattr(x, " __iter__") else [x]

sheets = toList(UnwrapElement(IN[0]))
views = toList(UnwrapElement(IN[1]))

# Start Transaction
TransactionManager.Instance.EnsureInTransaction(doc)
out = []
for v, s in zip(views, sheets):
	a = ScheduleSheetInstance.Create(doc, s.Id, v.Id, XYZ.Zero) 
	out.append(a)

# End Transaction
TransactionManager.Instance.TransactionTaskDone()

OUT=out
```

---

<div class="post-metadata">

**Author:** ![haganjake2](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/haganjake2/32/119069_2.png) [@haganjake2](https://forum.dynamobim.com/u/haganjake2)\
**Post date:** [December 24, 2021, 2:14pm UTC](https://forum.dynamobim.com/t/placing-scheduleviews-on-sheets/52194/10 "2021-12-24T14:14:01Z")

</div>

Hi there,

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!

---

<div class="post-metadata">

**Author:** ![haganjake2](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/haganjake2/32/119069_2.png) [@haganjake2](https://forum.dynamobim.com/u/haganjake2)\
**Post date:** [December 24, 2021, 2:21pm UTC](https://forum.dynamobim.com/t/placing-scheduleviews-on-sheets/52194/11 "2021-12-24T14:21:55Z")

</div>

Ok I just saw the footnote on API docs which reads:

“Schedule views are not handled by the Viewport class. Refer to ScheduleInstance for information about adding schedules to sheets”.

Guess I’ll need to filter around it so schedules arent going through the same condition.

Sorry for asking before reading properly haha

---

<div class="post-metadata">

**Author:** ![SeanP](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/seanp/32/42560_2.png) [@SeanP](https://forum.dynamobim.com/u/SeanP)\
**Post date:** [December 24, 2021, 2:22pm UTC](https://forum.dynamobim.com/t/placing-scheduleviews-on-sheets/52194/12 "2021-12-24T14:22:25Z")

</div>

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.

> **[ScheduleSheetInstance Class](https://www.revitapidocs.com/2015/68db8e46-90de-6b54-3dae-598957d94201.htm)**
>
> Online Documentation for Autodesk's Revit API: 2015, 2016, 2017, 2017.1, 2018
