Create Method (Document, View, ICollection(ElementId), Int32, Line, Double, ArrayAnchorMember)


Creates a new radial array element from a set of elements based on an input rotation axis.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)

Syntax

C#
public static RadialArray Create(
	Document aDoc,
	View dBView,
	ICollection<ElementId> ids,
	int count,
	Line axis,
	double angle,
	ArrayAnchorMember anchorMember
)
Visual Basic
Public Shared Function Create ( _
	aDoc As Document, _
	dBView As View, _
	ids As ICollection(Of ElementId), _
	count As Integer, _
	axis As Line, _
	angle As Double, _
	anchorMember As ArrayAnchorMember _
) As RadialArray
Visual C++
public:
static RadialArray^ Create(
	Document^ aDoc, 
	View^ dBView, 
	ICollection<ElementId^>^ ids, 
	int count, 
	Line^ axis, 
	double angle, 
	ArrayAnchorMember anchorMember
)

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 set of elements to array. The position of the rotation axis is determined by the cumulative center of the elements' bounding boxes.
count
Type: SystemInt32
The number of array members to create. The accepted range is from 3 to 200.
axis
Type: Autodesk.Revit.DBLine
The rotation axis.
angle
Type: SystemDouble
The angle in radians of the rotation.
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 radial array element.

Exceptions

ExceptionCondition
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 3 and 200. -or- The view is invalid for specific view elements array. -or- The rotation axis is invalid to array the elements. -or- Angle value must be not zero.
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 radial array.

See Also