Skip to content

ElementTransformUtils.GetTransformFromViewToView

Public Class

Returns a transformation that is applied to elements when copying from one view to another view.

Namespace: Autodesk.Revit.DB

Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)

Syntax

public static Transform GetTransformFromViewToView(
View sourceView,
View destinationView
)

Parameters

sourceView View

The source view

destinationView View

The destination view

Return Value

Transform
The transformation from source view to destination view.

Exceptions

Exception

Condition


ArgumentException

The specified view cannot be used as a source or destination for copying elements between two views.


ArgumentNullException

A non-optional argument was null


Remarks

Both source and destination views must be 2D graphics views capable of drawing details and view-specific elements (floor and ceiling plans, elevations, sections, drafting views.) The result is a transformation needed to copy an element from drawing plane of the source view to the drawing plane of the destination view. The destination view can be in the same document as the source view. The destination view can be the same as the source view.