# Revit link elements

**URL:** <https://forum.dynamobim.com/t/revit-link-elements/31290>\
**Category:** Developers\
**Created:** [January 28, 2019, 6:34am UTC](https://forum.dynamobim.com/t/revit-link-elements/31290 "2019-01-28T06:34:03Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![cgartland](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/cgartland/32/45378_2.png) [@cgartland](https://forum.dynamobim.com/u/cgartland)\
**Post date:** [January 29, 2019, 8:05pm UTC](https://forum.dynamobim.com/t/revit-link-elements/31290/12 "2019-01-29T20:05:59Z")

</div>

If you’d like to do this in Python without any 3rd party nodes, you can use the following:

```
import clr
clr.AddReference("RevitAPI")
clr.AddReference("RevitServices")

from Autodesk.Revit.DB import *
from RevitServices.Persistence import DocumentManager

current_doc = DocumentManager.Instance.CurrentDBDocument
links = FilteredElementCollector(current_doc).OfClass(RevitLinkInstance)

docs = [link.GetLinkDocument() for link in links]

OUT = docs

```

This will get all Revit link instances in from the current document and return all documents associated with the link instances. You can also append current\_doc to the docs list if you want to evaluate elements from both the host document and the linked documents.

You can then pass all of these documents to the FilteredElementCollector() as you would with any other document. So, if you’ve already written a script that uses the FilteredElementCollector you won’t have to change much.

---

_[View the full topic](https://forum.dynamobim.com/t/revit-link-elements/31290)._
