Creates a new linear array element from a set of elements.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Syntax
| C# |
|---|
|
| Visual Basic |
|---|
|
| Visual C++ |
|---|
|
Parameters
- aDoc
- Type: Autodesk.Revit.DBDocument
The document.
- dBView
- Type: Autodesk.Revit.DBView
The view. If it is a 2d view, translation vector must be in the view plane if elements include view-specific elements. If elements include view-specific elements, they must belong to this view.
- ids
- Type: System.Collections.GenericICollectionElementId
The elements to array.
- count
- Type: SystemInt32
The number of array members to create including the initial element grouping. Must between 2 and 200.
- translationToAnchorMember
- Type: Autodesk.Revit.DBXYZ
The translation vector for the array.
- anchorMember
- Type: Autodesk.Revit.DBArrayAnchorMember
Indicates if the translation vector specifies the location of the second member of the array, or the last member of the array.
Return Value
The new linear array element.Exceptions
| Exception | Condition |
|---|---|
| Autodesk.Revit.ExceptionsArgumentException | The given element id set is empty. -or- One or more elements in ids do not exist in the document. -or- One or more elements in ids is owned by different views and thus cannot be arrayed together. -or- One or more elements in ids is not arrayable. -or- count must be between 2 and 200. -or- The view is invalid for specific view elements array. -or- The translation point vector is invalid to array the element. |
| Autodesk.Revit.ExceptionsArgumentNullException | A non-optional argument was null |
| Autodesk.Revit.ExceptionsArgumentOutOfRangeException | A value passed for an enumeration argument is not a member of that enumeration |
| Autodesk.Revit.ExceptionsInvalidOperationException | Failed to create the linear array. |