| Revit 2024 API |
| MultiReferenceAnnotationOptions..::..SetElementsToDimension Method |
| MultiReferenceAnnotationOptions Class See Also |
Sets the elements which the dimension will witness.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since:
2014
Syntax
| C# |
|---|
public void SetElementsToDimension( ICollection<ElementId> elementsToDimension ) |
| Visual Basic |
|---|
Public Sub SetElementsToDimension ( _ elementsToDimension As ICollection(Of ElementId) _ ) |
| Visual C++ |
|---|
public: void SetElementsToDimension( ICollection<ElementId^>^ elementsToDimension ) |
Parameters
- elementsToDimension
- Type: System.Collections.Generic..::..ICollection<(Of <(<'ElementId>)>)>
The elements which the dimension will witness.
Remarks
The dimension will automatically find geometric references in the elements.
Exceptions
| Exception | Condition |
|---|---|
| Autodesk.Revit.Exceptions..::..ArgumentException | some elements do not match the reference category required by the MultiReferenceAnnotationType. |
| Autodesk.Revit.Exceptions..::..ArgumentNullException | A non-optional argument was null |
| Autodesk.Revit.Exceptions..::..InvalidOperationException | The MultiReferenceAnnotationType assigned to the options can't create MultiReferenceAnnotations by element. |