Add a new locked alignment into the Autodesk Revit document.
Namespace: Autodesk.Revit.CreationAssembly: RevitAPI (in RevitAPI.dll) Version: 21.0.0.0 (21.1.1.109)
Syntax
C# |
---|
public Dimension NewAlignment( View view, Reference reference1, Reference reference2 ) |
Visual Basic |
---|
Public Function NewAlignment ( _ view As View, _ reference1 As Reference, _ reference2 As Reference _ ) As Dimension |
Visual C++ |
---|
public: Dimension^ NewAlignment( View^ view, Reference^ reference1, Reference^ reference2 ) |
Parameters
- view
- Type: Autodesk.Revit.DB..::..View
The view that determines the orientation of the alignment.
- reference1
- Type: Autodesk.Revit.DB..::..Reference
The first reference.
- reference2
- Type: Autodesk.Revit.DB..::..Reference
The second reference.
Return Value
If creation was successful the new locked alignment dimension is returned, otherwise an exception with failure information will be thrown.
Remarks
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
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions..::..ArgumentNullException | Thrown when the input argument-"view" or "headerReference" or "otherReference"-is nullNothingnullptra null reference (Nothing in Visual Basic). |
Autodesk.Revit.Exceptions..::..ArgumentException | Thrown when the input argument-"headerReference" or "otherReference"-is invalid. |