Revit 2025.3 API
Item |
Add a new locked alignment into the Autodesk Revit document.
Namespace: Autodesk.Revit.Creation
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.3.0.0 (25.3.0.0)
Syntax
public Dimension NewAlignment( View view, Reference reference1, Reference reference2 )
Public Function NewAlignment ( view As View, reference1 As Reference, reference2 As Reference ) As Dimension
public: Dimension^ NewAlignment( View^ view, Reference^ reference1, Reference^ reference2 )
member NewAlignment : view : View * reference1 : Reference * reference2 : Reference -> Dimension
Parameters
- view View
- The view that determines the orientation of the alignment.
- reference1 Reference
- The first reference.
- reference2 Reference
- The second reference.
Return Value
DimensionIf creation was successful the new locked alignment dimension is returned, otherwise an exception with failure information will be thrown.

Exception | Condition |
---|---|
ArgumentNullException | Thrown when the input argument-"view" or "headerReference" or "otherReference"-is . |
ArgumentException | Thrown when the input argument-"headerReference" or "otherReference"-is invalid. |

These two references must be one of the following combinations:
- 2 planar faces
- planar face and reference plane
- 2 lines
- line and point
- line and reference plane
- 2 arcs
- 2 cylindrical faces
See Also