Revit 2025 API
Referenceable |
Changes a particular reference view (such as a reference section or reference callout) to refer to a different View.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public static void ChangeReferencedView( Document document, ElementId referenceId, ElementId desiredViewId )
Public Shared Sub ChangeReferencedView ( document As Document, referenceId As ElementId, desiredViewId As ElementId )
public: static void ChangeReferencedView( Document^ document, ElementId^ referenceId, ElementId^ desiredViewId )
static member ChangeReferencedView : document : Document * referenceId : ElementId * desiredViewId : ElementId -> unit
Parameters

Exception | Condition |
---|---|
ArgumentException | referenceId is not a valid reference view. -or- desiredViewId is not a view that can be referenced by referenceId. |
ArgumentNullException | A non-optional argument was null |

Reference views may not refer to a View in which their own graphics (such as the section or callout
graphics) will appear. If the reference view's ViewFamilyType is not appropriate
for the new View, Revit will automatically change the ViewFamilyType during regeneration. This
typically occurs when the referenced view is changed from a model View to a drafting View or
vice-versa.
See Also