Identifies the curves that were used to create the part.
Namespace:
Autodesk.Revit.DB
Assembly:
RevitAPI
(in RevitAPI.dll) Version: 20.0.0.0 (20.0.0.377)
Since:
2019.1
Syntax
C# |
---|
|
Visual Basic |
---|
|
Visual C++ |
---|
|
Parameters
- document
-
Type:
Autodesk.Revit.DB
Document
The source document of the part.
- partId
-
Type:
Autodesk.Revit.DB
ElementId
The part id.
Return Value
The curves that created the part. Empty if partId is not a Part or Part is not divided.Examples
Copy
C#
public void GetCurveDividers(Part part)
{
StringBuilder message = new StringBuilder();
// Get curve dividers.
IList<Curve> divisionCurves = PartUtils.GetSplittingCurves(part.Document, part.Id);
if (divisionCurves.Count == 0)
message.AppendLine("Part is not divided.");
else
{
message.AppendLine("The dividers are : ");
if (divisionCurves.Count > 0)
message.AppendLine(divisionCurves.Count.ToString() + " division curves");
}
TaskDialog.Show("Revit", message.ToString());
}
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions ArgumentNullException | A non-optional argument was NULL |