Revit 2026 API
Linear |
Creates a new linear array element from a single element.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 26.0.4.0 (26.0.4.0)
Syntax
public static LinearArray Create( Document aDoc, View dBView, ElementId id, int count, XYZ translationToAnchorMember, ArrayAnchorMember anchorMember )
Public Shared Function Create ( aDoc As Document, dBView As View, id As ElementId, count As Integer, translationToAnchorMember As XYZ, anchorMember As ArrayAnchorMember ) As LinearArray
public: static LinearArray^ Create( Document^ aDoc, View^ dBView, ElementId^ id, int count, XYZ^ translationToAnchorMember, ArrayAnchorMember anchorMember )
static member Create : aDoc : Document * dBView : View * id : ElementId * count : int * translationToAnchorMember : XYZ * anchorMember : ArrayAnchorMember -> LinearArray
Parameters
- aDoc Document
- The document.
- dBView View
- The view. If it is a 2d view, translation vector must be in the view plane if the element is a view-specific element.
- id ElementId
- The element to array.
- count Int32
- The number of array members to create including the initial element grouping. Must between 2 and 200 in projects, and between 0 and 200 in families.
- translationToAnchorMember XYZ
- The translation vector for the array.
- anchorMember ArrayAnchorMember
- Indicates if the translation vector specifies the location of the second member of the array, or the last member of the array.
Return Value
LinearArrayThe new linear array element.
| Exception | Condition |
|---|---|
| ArgumentException | The element id does not exist in the document -or- id is not arrayable. -or- count must be between 2 and 200 in project documents and between 0 and 200 in family documents. -or- The view is invalid for specific view elements array. -or- The translation point vector is invalid to array the element. |
| ArgumentNullException | A non-optional argument was null |
| ArgumentOutOfRangeException | A value passed for an enumeration argument is not a member of that enumeration |
| InvalidOperationException | Failed to create the linear array. |
See Also