NewDimension Method (View, Line, ReferenceArray, DimensionType)


Item Factory Base New Dimension(View, Line, Reference Array, Dimension Type) Method

Creates a new linear dimension object using the specified dimension style.

Namespace: Autodesk.Revit.Creation
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public Dimension NewDimension(
	View view,
	Line line,
	ReferenceArray references,
	DimensionType dimensionType
)

Parameters

view View
The view in which the dimension is to be visible. The view must be if the document is in [!:Autodesk::Revit::DB::SketchEditScope] .
line Line
The line drawn for the dimension.
references ReferenceArray
An array of geometric references to which the dimension is to be bound.
dimensionType DimensionType
The dimension style to be used for the dimension.

Return Value

Dimension
If successful a new dimension object, otherwise .
Exceptions
Exception Condition
ArgumentException Thrown when references are not geometric references.
See Also
ArchiLabs Desktop

Put AI to work inside Revit.

Give Desktop your instructions and project files to build Revit families, update model elements, and create views and schedules. Works directly in Revit and AutoCAD.

Explore Desktop →