PartUtilsGetSplittingCurves(Document, ElementId, Plane) Method |
Identifies the curves that were used to create the part and the plane in which they reside.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 27.0.4.0 (27.0.4.0)
Syntaxpublic static IList<Curve> GetSplittingCurves(
Document document,
ElementId partId,
out Plane sketchPlane
)
Public Shared Function GetSplittingCurves (
document As Document,
partId As ElementId,
<OutAttribute> ByRef sketchPlane As Plane
) As IList(Of Curve)
public:
static IList<Curve^>^ GetSplittingCurves(
Document^ document,
ElementId^ partId,
[OutAttribute] Plane^% sketchPlane
)
static member GetSplittingCurves :
document : Document *
partId : ElementId *
sketchPlane : Plane byref -> IList<Curve> Parameters
- document Document
-
The source document of the part.
- partId ElementId
-
The part id.
- sketchPlane Plane
-
The plane in which the division curves were sketched.
Return Value
IListCurve
The curves that created the part. Empty if partId is not a part or Part is not divided.
Exceptions
Examplepublic void GetCurveDividersAndPlane(Part part)
{
StringBuilder message = new StringBuilder();
Plane skP = Plane.CreateByThreePoints(new XYZ(0, 0, 1), new XYZ(1, 0, 0), new XYZ(0, 1, 0));
IList<Curve> divisionCurves = PartUtils.GetSplittingCurves(part.Document, part.Id, out skP);
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());
}
See Also