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: 2015.0.0.0 (2015.0.0.0) 
  Since:  2015 
Syntax
| C# | 
|---|
|  | 
| Visual Basic | 
|---|
|  | 
| Visual C++ | 
|---|
|  | 
Parameters
- document
-  Type:  Autodesk.Revit.DB Document  
 The document containing the elements.
- referenceId
-  Type:  Autodesk.Revit.DB ElementId  
 The reference view that will be changed to refer to a different View.
- desiredViewId
-  Type:  Autodesk.Revit.DB ElementId  
 The id of the View that the reference section or callout will refer to.
Remarks
 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. 
 Exceptions
| Exception | Condition | 
|---|---|
| Autodesk.Revit.Exceptions ArgumentException | referenceId is not a valid reference view. -or- desiredViewId is not a view that can be referenced by referenceId. | 
| Autodesk.Revit.Exceptions ArgumentNullException | A non-optional argument was NULL |