LinkElement

Unique functionality for working with elements from linked Revit models at scale.

The LinkElement class, exclusive to BimorphNodes, is purpose-built to solve a significant Revit API limitation that affects elements from linked models. This limitation normally restricts linked elements to their external file's origin-to-origin position, regardless of any transformations (like moving or rotating the link) applied in the host document. LinkElement objects overcome this by representing the element at its visible/transformed location within the host model.

LinkElement inherits from Dynamo's standard Revit.Elements.Element class, its instances are fully compatible with any node that accepts Element inputs. They are also highly optimized for intersection purposes when used with Element and BoundingBox nodes. This optimization provides ultra-efficient intersection and bounding box containment workflows with linked Elements from any number of linked models. To learn more about the linked element limitation in the Revit API and the solution LinkElement implements, visit the article here.

These nodes enable you to collect elements by category, extract geometry and parameters, perform ray-bounce selection, and even copy linked elements into your active document while maintaining proper positioning and relationships.


BoundingBox

Retrieves the linked Elements bounding box at its host location.

Inputs

LinkElementLinkElement

Outputs

BoundingBoxBoundingBox

Features

  • Get the linked Elements bounding box at its host location
  • LinkElements are designed to position elements at their host location

User Guide

BoundingBox example


ByRayBounce

Returns any linked Elements and position hit by ray bounce from the specified origin point and direction. Set the findNearest input to true to return the first element hit by the ray point. The optional Category input provides a filter which only returns elements of that category. Optimised for use with Element and BoundingBox nodes.

Inputs

originPoint
directionVector
view3DView3D
CategoryCategory
findNearestbool

Outputs

LinkElementLinkElement
PointPoint

Features

  • Collect linked elements from a linked Revit model by ray bounce
  • Ray origin defined by the point input
  • Ray direction defined by the direction input
  • Return the nearest linked element by setting the findNearest input to true
  • Optional Category filter input
  • Returns any linked element from any linked Revit document which the ray point intersects

User Guide

ByRayBounce example


CopyToActiveDocument

Copies LinkElements into the active document. This method performs rehosting of elements where applicable and is designed primarily for model elements. Element binding is used to ensure that if you run the node multiple times (it might form part of a larger workflow), there are no risks of duplicates appearing every time your graph updates.

Note that not all elements are supported due to limitations in the Revit API, and due to the way Dynamo interacts with Revit, this node should only be used when Dynamo is in Manual execution mode, otherwise there is a risk of triggering a never-ending process.

Inputs

linkElementsLinkElement[]

Outputs

element[]Element[]

Features

  • Copy LinkElements into the active document as Elements
  • Performs rehosting of elements
  • Not all elements are supported due to limitation in the Revit API

User Guide

CopyToActiveDocument example


Document

Returns the document object from where this LinkElement derived.

Inputs

linkElementLinkElement

Outputs

documentDocument

Features

  • Returns the LinkElement document object

User Guide

Document example


Element

Get the Element stored in the LinkElement. Use the Element with any nodes that are incompatible with the LinkElement.

Inputs

LinkElementLinkElement

Outputs

ElementElement

Features

  • Get the Element stored in this LinkElement
  • LinkElements are designed to position elements at their host location

User Guide

Element example


Faces

Get the Faces from the LinkElement at its host location.

Inputs

LinkElementLinkElement

Outputs

Surface[]Surface[]

Features

  • Get the Faces in the LinkElement at its host location
  • LinkElements are designed to position elements at their host location

User Guide

Faces example


GetParameterValueByName

Gets the parameter value from a LinkElement using a query string to specify the parameter.

Inputs

linkElementLinkElement
parameterNamestring

Outputs

valuevar[]..[]

Features

  • Obtain the parameter value from a LinkElement
  • Supports API changes between different versions of Revit

User Guide

GetParameterValueByName example


Get the instance Id of the Revit link instance from where the LinkElement derived.

Inputs

LinkElementLinkElement

Outputs

intint

Features

  • Get the instance Id of the Revit link instance from where the LinkElement derived
  • LinkElements are designed to position elements at their host location

User Guide

LinkInstanceId example


Location

Get the location geometry – either a point or cure – from the LinkElement at its host location.

Inputs

LinkElementLinkElement

Outputs

Geometry[]Geometry[]

Features

  • Get the location geometry from the LinkElement at its host location
  • LinkElements are designed to position elements at their host location

User Guide

Location example


OfCategory

Get Elements from a linked Revit model (a Link Instance) by Category.

Inputs

linkInstanceElement
CategoryCategory

Outputs

LinkElement[]LinkElement[]

Features

  • Collect elements from a linked Revit model by Category
  • Purpose-built to solve the Revit API transform limitation imposed on elements from linked Revit models
  • LinkElements are designed to position elements at their host location
  • Optimised for use with Element and BoundingBox nodes

User Guide


Solids

Get the Solids from the LinkElement at its host location.

Inputs

LinkElementLinkElement

Outputs

Solid[]Solid[]

Features

  • Get the Solids from the LinkElement at its host location
  • LinkElements are designed to position elements at their host location

User Guide

Solids example


TotalTransform

Get the total transform (coordinate system) of the Revit link instance from where the LinkElement derived.

Inputs

LinkElementLinkElement

Outputs

CoordinateSystemCoordinateSystem

Features

  • Get the total transform of the Revit link instance from where the LinkElement derived
  • LinkElements are designed to position elements at their host location

User Guide

TotalTransform example