GetTransformFromViewToView Method

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: 2015.0.0.0 (2015.0.0.0)
Since: 2014


public static Transform GetTransformFromViewToView(
	View sourceView,
	View destinationView
Visual Basic
Public Shared Function GetTransformFromViewToView ( _
	sourceView As View, _
	destinationView As View _
) As Transform
Visual C++
static Transform^ GetTransformFromViewToView(
	View^ sourceView, 
	View^ destinationView


Type: Autodesk.Revit.DB View
The source view
Type: Autodesk.Revit.DB View
The destination view

Return Value

The transformation from source view to destination view.


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.


Exception Condition
Autodesk.Revit.Exceptions ArgumentException The specified view cannot be used as a source or destination for copying elements between two views.
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was NULL

See Also