# Sheet.Views

**URL:** <https://forum.dynamobim.com/t/sheet-views/30493>\
**Category:** Revit\
**Created:** [January 9, 2019, 1:27pm UTC](https://forum.dynamobim.com/t/sheet-views/30493 "2019-01-09T13:27:00Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniel\_Hurtubise](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/daniel_hurtubise/32/146534_2.png) [@Daniel\_Hurtubise](https://forum.dynamobim.com/u/Daniel_Hurtubise)\
**Post date:** [January 9, 2019, 1:27pm UTC](https://forum.dynamobim.com/t/sheet-views/30493/1 "2019-01-09T13:27:00Z")

</div>

Hi everyone,  
im trying to find out if a Sheet as a View on it. I’m pulling all the Sheets through the Get Documents + Get All Elements From Linked Model.  
Sheet.Views returns and empty list and Sheets.Viewports returns an ambiguous call.

Does anyone know any work around this limitation?  
Thanks

---

<div class="post-metadata">

**Author:** ![m.rijsmus](https://avatars.discourse-cdn.com/v4/letter/m/6f9a4e/32.png) [@m.rijsmus](https://forum.dynamobim.com/u/m.rijsmus)\
**Post date:** [January 9, 2019, 1:44pm UTC](https://forum.dynamobim.com/t/sheet-views/30493/2 "2019-01-09T13:44:17Z")

</div>

maybe this?

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/d/8df8b4fc303f49f8b58430a366c8b5e3c0e0e6e1.png)

---

<div class="post-metadata">

**Author:** ![john\_pierson](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/john_pierson/32/191977_2.png) [@john\_pierson](https://forum.dynamobim.com/u/john_pierson)\
**Post date:** [January 9, 2019, 2:24pm UTC](https://forum.dynamobim.com/t/sheet-views/30493/4 "2019-01-09T14:24:27Z")

</div>

@m.rijsmus and @SeanP,  
Are your methods working on linked files? @Daniel_Hurtubise specified that he is getting elements from links.

> [@Daniel\_Hurtubise](#):
>
> I’m pulling all the Sheets through the Get Documents + Get All Elements From Linked Model.

---

<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:** [January 9, 2019, 2:28pm UTC](https://forum.dynamobim.com/t/sheet-views/30493/5 "2019-01-09T14:28:00Z")

</div>

Thanks for pointing that out @john_pierson. I had missed that without an image for reference.

---

<div class="post-metadata">

**Author:** ![m.rijsmus](https://avatars.discourse-cdn.com/v4/letter/m/6f9a4e/32.png) [@m.rijsmus](https://forum.dynamobim.com/u/m.rijsmus)\
**Post date:** [January 9, 2019, 2:42pm UTC](https://forum.dynamobim.com/t/sheet-views/30493/6 "2019-01-09T14:42:25Z")

</div>

@john_pierson  
This is a new try, you are right.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/2/c2aaab16883f25fb8507af26c2e506644c183b71.png)

---

<div class="post-metadata">

**Author:** ![john\_pierson](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/john_pierson/32/191977_2.png) [@john\_pierson](https://forum.dynamobim.com/u/john_pierson)\
**Post date:** [January 9, 2019, 2:42pm UTC](https://forum.dynamobim.com/t/sheet-views/30493/7 "2019-01-09T14:42:53Z")

</div>

If you modify the springnodes node, `Springs.SheetViews+` to accept a document input, it will get the views.

 ![LinkedSheets%20Views](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/6/7656f0e7117b724be5145512c718d8de0ae193b7.png)

and the python code:

```
#Copyright(c) 2016, Dimitar Venkov
# @5devene, dimitar.ven@gmail.com

import clr

clr.AddReference(&quot;RevitServices&quot;)
from RevitServices.Persistence import DocumentManager
doc = IN[1]

clr.AddReference(&quot;RevitNodes&quot;)
import Revit
clr.ImportExtensions(Revit.Elements)

clr.AddReference(&quot;RevitAPI&quot;)
from Autodesk.Revit.DB import *

def tolist(obj1):
if hasattr(obj1,&quot; __iter__ &quot;): return obj1
else: return [obj1]

sheets = UnwrapElement(tolist(IN[0]))
sheet_views, sheets_scheds = [], []
rev_str = &quot;&lt;Revision Schedule&gt;&quot;
sched_dict = dict()
fec1 = FilteredElementCollector(doc).OfClass(ScheduleSheetInstance)
for s in fec1:
if rev_str not in s.Name:
key = s.OwnerViewId.IntegerValue
if key not in sched_dict:
sched_dict[key] = [s]
else:
sched_dict[key].append(s)

for i in xrange(len(sheets) ):
viewsid = sheets[i].GetAllPlacedViews()
views = [doc.GetElement(v).ToDSType(True) for v in viewsid]
sheet_views.append(views)
s_id = sheets[i].Id.IntegerValue
scheds = sched_dict[s_id] if s_id in sched_dict else []
sheets_scheds.append(scheds)
OUT = sheet_views, sheets_scheds
```

---

<div class="post-metadata">

**Author:** ![Daniel\_Hurtubise](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/daniel_hurtubise/32/146534_2.png) [@Daniel\_Hurtubise](https://forum.dynamobim.com/u/Daniel_Hurtubise)\
**Post date:** [January 9, 2019, 3:07pm UTC](https://forum.dynamobim.com/t/sheet-views/30493/8 "2019-01-09T15:07:40Z")

</div>

import clr  
clr.AddReference(‘RevitAPI’)  
from Autodesk.Revit.DB import \*  
watch =   
for i in IN[0]:  
test = len(UnwrapElement(i).GetAllViewports()) \> 0  
watch.append(test)  
OUT = watch

Will also do the trick  
Thanks @john_pierson

---

<div class="post-metadata">

**Author:** ![Steven](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/steven/32/112504_2.png) [@Steven](https://forum.dynamobim.com/u/Steven)\
**Post date:** [January 9, 2019, 9:50pm UTC](https://forum.dynamobim.com/t/sheet-views/30493/9 "2019-01-09T21:50:39Z")

</div>

I think I must be missing something but John could you use the recently updated _Sheet.GetViewportsAndViews_ in Rhythm? It has been working great for me.

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

---

<div class="post-metadata">

**Author:** ![john\_pierson](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/john_pierson/32/191977_2.png) [@john\_pierson](https://forum.dynamobim.com/u/john_pierson)\
**Post date:** [January 9, 2019, 9:53pm UTC](https://forum.dynamobim.com/t/sheet-views/30493/10 "2019-01-09T21:53:43Z")

</div>

I am getting forgetful these days. 😂
