NewSweep Method (Boolean, ReferenceArray, SweepProfile, Int32, ProfilePlaneLocation)


Adds a new sweep form into the family document, using an array of selected references as a 3D path.

Namespace: Autodesk.Revit.Creation
Assembly: RevitAPI (in RevitAPI.dll) Version: 2015.0.0.0 (2015.0.0.0)

Syntax

C#
public Sweep NewSweep(
	bool isSolid,
	ReferenceArray path,
	SweepProfile profile,
	int profileLocationCurveIndex,
	ProfilePlaneLocation profilePlaneLocation
)
Visual Basic
Public Function NewSweep ( _
	isSolid As Boolean, _
	path As ReferenceArray, _
	profile As SweepProfile, _
	profileLocationCurveIndex As Integer, _
	profilePlaneLocation As ProfilePlaneLocation _
) As Sweep
Visual C++
public:
Sweep^ NewSweep(
	bool isSolid, 
	ReferenceArray^ path, 
	SweepProfile^ profile, 
	int profileLocationCurveIndex, 
	ProfilePlaneLocation profilePlaneLocation
)

Parameters

isSolid
Type: System Boolean
Indicates if the Sweep is Solid or Void.
path
Type: Autodesk.Revit.DB ReferenceArray
The path of the sweep. The path should be reference of curve or edge obtained from existing geometry.
profile
Type: Autodesk.Revit.DB SweepProfile
The profile to create the new Sweep. The profile must lie in the XY plane, and it will be transformed to the profile plane automatically. This may contain more than one curve loop or a profile family. Each loop must be a fully closed curve loop and the loops must not intersect. The loop can be a unbound circle or ellipse, but its geometry will be split in two in order to satisfy requirements for sketches used in extrusions.
profileLocationCurveIndex
Type: System Int32
The index of the path curves. The curve upon which the profile plane will be determined.
profilePlaneLocation
Type: Autodesk.Revit.DB ProfilePlaneLocation
The location on the profileLocationCurve where the profile plane will be determined.

Return Value

If creation was successful the new Sweep is returned, otherwise an exception with failure information will be thrown.

Remarks

This method creates a sweep in a family document. The sweep will trace the profile along the path.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentException Thrown when the input argument-path-is a null reference ( Nothing in Visual Basic) or empty or an unsupported curve type.
Autodesk.Revit.Exceptions ArgumentNullException Thrown when the input argument-profile-is a null reference ( Nothing in Visual Basic) .
Autodesk.Revit.Exceptions ArgumentOutOfRangeException Thrown when the input argument-profileLocationCurveIndex-is out of index bounds.
Autodesk.Revit.Exceptions ArgumentOutOfRangeException Thrown when the input argument-profilePlaneLocation-does not exist in the ProfilePlaneLocation enumeration.
Autodesk.Revit.Exceptions InvalidOperationException Thrown when the creation failed.

See Also