Multi |
Creates a new MultiReferenceAnnotation.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)

public static MultiReferenceAnnotation Create(
Document document,
ElementId ownerViewId,
MultiReferenceAnnotationOptions options
)
Parameters
- document Document
- The document to which the new MultiReferenceAnnotation will be added.
- ownerViewId ElementId
- The view in which the multi-reference annotation will appear.
- options MultiReferenceAnnotationOptions
- The creation options for the new MultiReferenceAnnotation.
Return Value
MultiReferenceAnnotationThe new MultiReferenceAnnotation.

Exception | Condition |
---|---|
ArgumentException | document is not a project document. -or- The ElementId ownerViewId does not correspond to a View. -or- The ElementId ownerViewId is a view template. -or- The ElementId ownerViewId is a perspective view. -or- The 3D view ownerViewId is not locked. -or- The input 3D view cannot be used to place a MultiReferenceAnnotation object. -or- dimension line direction and dimension plane normal are not orthogonal. -or- There is at least one element that doesn't match the reference category of the MultiReferenceAnnotationType, or there are no elements. -or- for DimensionStyleType LinearFixed dimensions the dimension line direction must be parallel to either the view's vertical or horizontal direction. -or- some references can't be used with a DimensionStyleType Linear dimension of this direction. References must either appear as points in the view or be linear references which are perpendicular to the dimension line. -or- some references can't be used with a DimensionStyleType LinearFixed dimension. Only references which appear as points in the view can be used. |
ArgumentNullException | A non-optional argument was null |
ModificationForbiddenException | The document is in failure mode: an operation has failed, and Revit requires the user to either cancel the operation or fix the problem (usually by deleting certain elements). -or- The document is being loaded, or is in the midst of another sensitive process. |
ModificationOutsideTransactionException | The document has no open transaction. |

New linear Dimension and IndependentTag elements will be created as children of the MultiReferenceAnnotation. The IndependentTag will only be created if the MultiReferenceAnnotationType property TagTypeId is valid.
