# Get Viewports from Linked Sheets

**URL:** <https://forum.dynamobim.com/t/get-viewports-from-linked-sheets/29296>\
**Category:** Revit\
**Tags:** steamnodes, rhythm, views\
**Created:** [December 4, 2018, 6:17pm UTC](https://forum.dynamobim.com/t/get-viewports-from-linked-sheets/29296 "2018-12-04T18:17:34Z")\
**Posts on this page:** 20\
**Page:** 1

<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:** [December 4, 2018, 6:17pm UTC](https://forum.dynamobim.com/t/get-viewports-from-linked-sheets/29296/1 "2018-12-04T18:17:35Z")

</div>

Hello all,

I am trying to grab the Viewports located on a linked Sheet. I have tried _View.GetViewport_ (SteamNodes) and _Sheet.GetViewportsAndViews_ (Rhythm). They both grab the Viewports of two sheets and then return null for the rest. _View.GetViewport_ returns null for each viewport placed on the sheet and I have confirmed the sheets are not blank. Does anyone have any ideas?

_Sheet.GetViewportsAndViews_ warning:  
Warning: Sheet.GetViewportsAndViews operation failed.  
The call is ambiguous between the following methods or properties: ‘Revit.Elements.ElementWrapper.Wrap(Autodesk.Revit.DB.CurtainSystem, bool)’ and ‘Revit.Elements.ElementWrapper.Wrap(Autodesk.Revit.DB.FamilyInstance, bool)’

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

Thanks,

Steven

---

<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:** [December 4, 2018, 6:50pm UTC](https://forum.dynamobim.com/t/get-viewports-from-linked-sheets/29296/2 "2018-12-04T18:50:00Z")

</div>

Speaking for my node, it was not made to work with linked documents. That would require an additional input unfortunately. For it to be working with two sheets is odd to me, (if they are in the link).

The error you are receiving on the node is a random one that happens when nulls occur. In the case of selecting viewports I am trying to do that in the current document on my node and this is most likely the cause. For now, I imagine you could dissect steamnodes’ node and add an additional input for document. I can try to add this functionality to my node in a future update as well.

---

<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:** [December 4, 2018, 7:04pm UTC](https://forum.dynamobim.com/t/get-viewports-from-linked-sheets/29296/3 "2018-12-04T19:04:29Z")

</div>

Here is what the node would look like in Rhythm if I add the option. (It would be an optional input for Document)

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

---

<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:** [December 4, 2018, 7:05pm UTC](https://forum.dynamobim.com/t/get-viewports-from-linked-sheets/29296/4 "2018-12-04T19:05:55Z")

</div>

Hey John,

Thanks for the reply. I did not think the nodes would work when I plunged them in but I like trying. The results are strange since they do work on two of the sheets. I have confirmed that the two sheets are from a linked file. This is how I am grabbing the sheets (No other sheets are being collected in this graph).

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

Could it be that the linked sheets shares the same GUID as a sheet in the current file? Both files were created from the same template. (Its an old temple so I would have to dig up the archive to check).

I have already built a workaround by collect all linked views, get the sheet they are placed on and finally match the two lists.

---

<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:** [December 4, 2018, 7:06pm UTC](https://forum.dynamobim.com/t/get-viewports-from-linked-sheets/29296/5 "2018-12-04T19:06:57Z")

</div>

> [@Steven](#):
>
> Could it be that the linked sheets shares the same GUID as a sheet in the current file?

I bet that is it. That they share the same **ElementId** actually.

---

<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:** [December 4, 2018, 7:07pm UTC](https://forum.dynamobim.com/t/get-viewports-from-linked-sheets/29296/6 "2018-12-04T19:07:07Z")

</div>

Wow that was fast did you just code that in two minutes?

---

<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:** [December 4, 2018, 7:07pm UTC](https://forum.dynamobim.com/t/get-viewports-from-linked-sheets/29296/7 "2018-12-04T19:07:33Z")

</div>

😉 Let me push it to the package manager now for you to test out!

---

<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:** [December 4, 2018, 7:08pm UTC](https://forum.dynamobim.com/t/get-viewports-from-linked-sheets/29296/8 "2018-12-04T19:08:28Z")

</div>

Thanks John,

You did not need to do that. It will help clean up my graph though.

---

<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:** [December 4, 2018, 7:08pm UTC](https://forum.dynamobim.com/t/get-viewports-from-linked-sheets/29296/9 "2018-12-04T19:08:49Z")

</div>

Better nodes for people to use! 🤘

---

<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:** [December 4, 2018, 7:12pm UTC](https://forum.dynamobim.com/t/get-viewports-from-linked-sheets/29296/10 "2018-12-04T19:12:34Z")

</div>

Now live on the package manager.  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/f/afd6bcdf90b6b396677a644e5096b7014399839b.png)

---

<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:** [December 4, 2018, 7:13pm UTC](https://forum.dynamobim.com/t/get-viewports-from-linked-sheets/29296/11 "2018-12-04T19:13:18Z")

</div>

I will go test it out and report back.

Thank John,

---

<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:** [December 5, 2018, 4:58pm UTC](https://forum.dynamobim.com/t/get-viewports-from-linked-sheets/29296/12 "2018-12-05T16:58:00Z")

</div>

Hey @john_pierson,

The node is working great. Thank you for making the change so quickly, it really helped clean up my graph. I have not noticed any problems with it yet.

Thanks,  
Steven

---

<div class="post-metadata">

**Author:** ![JustinStirling](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/justinstirling/32/79001_2.png) [@JustinStirling](https://forum.dynamobim.com/u/JustinStirling)\
**Post date:** [January 22, 2020, 11:55am UTC](https://forum.dynamobim.com/t/get-viewports-from-linked-sheets/29296/13 "2020-01-22T11:55:04Z")

</div>

@john_pierson, I’m not seeing that the _Sheet.GetViewportsandViews_ has the functionality discussed here (optional input for Document). Any suggestions?

I’m using the following package version:

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

![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/7/b73b372c1c745ff53a10b112c3841ea5800b5c07.png)

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/0/10ff8a4b1f0081c0cb1547698006f94c43834311.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 22, 2020, 2:06pm UTC](https://forum.dynamobim.com/t/get-viewports-from-linked-sheets/29296/14 "2020-01-22T14:06:50Z")

</div>

Hmm. The newer versions of Rhythm should have had the `doc` input, (2019.6.1 is pretty out of date).

However, I did not like the option of having a doc input, so I just updated the node for it to find what document the sheet came from.

Note: Working with linked files this way is pretty darn unstable. So run manually, and be patient. lol

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

Get this version and give it a try,  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/3/3/33602c179ff5f05ef49c2061d2f70f5c175bf113.png)

---

<div class="post-metadata">

**Author:** ![JustinStirling](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/justinstirling/32/79001_2.png) [@JustinStirling](https://forum.dynamobim.com/u/JustinStirling)\
**Post date:** [January 22, 2020, 4:46pm UTC](https://forum.dynamobim.com/t/get-viewports-from-linked-sheets/29296/15 "2020-01-22T16:46:06Z")

</div>

Thank you @john_pierson! I wanted to share with you the node error I was getting, along with the package upgrade warning, to see what problems I could possibly find myself dealing with by upgrading the Rhythm package.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/c/fc9537e1bb8e7646d9beb6842680b182fccf2661.jpeg)

---

<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 22, 2020, 5:07pm UTC](https://forum.dynamobim.com/t/get-viewports-from-linked-sheets/29296/16 "2020-01-22T17:07:54Z")

</div>

The upgrade warning can be ignored. It’s because I published from Revit 2020 and dynamo 2.3.0. Since they are both 2.x versions it is ignorable.

The other warning is because the node couldn’t return some of the elements. Like I said, expanding linked elements into memory is quite messy.

To elaborate a bit more on that:

Dynamo was/is made to work on the current Document primarily. This is why things like setting parameters, getting active views, etc. only ever works on your current file. Even though this is a restriction of Dynamo, we have _limited_ access to Revit’s background workflows for Documents. This means we can do some things like collect elements and whatnot. But, we sometimes run into problems when Dynamo tries to return the elements as an output. That is what that error means. It got confused and does not know what to do.

As you can see, @Steven ran into the same thing previously.

---

<div class="post-metadata">

**Author:** ![JustinStirling](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/justinstirling/32/79001_2.png) [@JustinStirling](https://forum.dynamobim.com/u/JustinStirling)\
**Post date:** [January 22, 2020, 5:52pm UTC](https://forum.dynamobim.com/t/get-viewports-from-linked-sheets/29296/17 "2020-01-22T17:52:55Z")

</div>

I greatly appreciate the dialog here! I will for sure update the package and let you know what the results are.

Might using the _Document.Open_ and _Document.Close_ nodes lessen this confusion at all when trying to perform tasks such as this? As I’ve not used these two nodes before, I guess I’m just more curious as to what their purpose is when information from linked documents can still be queried without actually “opening” them in the background.

---

<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 22, 2020, 6:13pm UTC](https://forum.dynamobim.com/t/get-viewports-from-linked-sheets/29296/18 "2020-01-22T18:13:22Z")

</div>

Of course! 🙂

Those nodes are for files that are not links. I have primarily seen them used for when people want to bring in something wall types from a resource library.

---

<div class="post-metadata">

**Author:** ![JustinStirling](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/justinstirling/32/79001_2.png) [@JustinStirling](https://forum.dynamobim.com/u/JustinStirling)\
**Post date:** [January 22, 2020, 8:48pm UTC](https://forum.dynamobim.com/t/get-viewports-from-linked-sheets/29296/19 "2020-01-22T20:48:06Z")

</div>

Works like a charm now! Thanks a bunch @john_pierson!

---

<div class="post-metadata">

**Author:** ![vanman](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vanman/32/20881_2.png) [@vanman](https://forum.dynamobim.com/u/vanman)\
**Post date:** [June 23, 2020, 1:30am UTC](https://forum.dynamobim.com/t/get-viewports-from-linked-sheets/29296/20 "2020-06-23T01:30:01Z")

</div>

is there a node for dynamo 1.3 that gets views on sheets from linked files? 🥵 or viewports if you can extract viewport name and detail number

[Next page](https://forum.dynamobim.com/t/get-viewports-from-linked-sheets/29296.md?page=2)
