SetElementsToDimension Method


Multi Reference Annotation Options Set Elements To Dimension Method

Sets the elements which the dimension will witness.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 27.0.4.0 (27.0.4.0)
Syntax
public void SetElementsToDimension(
	ICollection<ElementId> elementsToDimension
)

Parameters

elementsToDimension ICollection ElementId
The elements which the dimension will witness.
Exceptions
Exception Condition
ArgumentException some elements do not match the reference category required by the MultiReferenceAnnotationType.
ArgumentNullException A non-optional argument was null
InvalidOperationException The MultiReferenceAnnotationType assigned to the options can't create MultiReferenceAnnotations by element.
Remarks
The dimension will automatically find geometric references in the elements.
See Also
ArchiLabs

Stop fighting Revit automation.

Build repeatable BIM design and documentation workflows with scripts, data, and AI in one place, without wrestling brittle one-off automations.

Try ArchiLabs →