Returns the single curve of the Analytical Model, if it is only one curve.
Namespace: Autodesk.Revit.DB.Structure
Assembly: RevitAPI (in RevitAPI.dll) Version: 2015.0.0.0 (2015.0.0.0)
Since: 2011
Syntax
| C# |
|---|
|
| Visual Basic |
|---|
|
| Visual C++ |
|---|
|
Return Value
Single curve of the Analytical Model.Examples
public void GetColumnCurve(FamilyInstance familyInst)
{
// get AnalyticalModel from structural column
if (familyInst.StructuralType == StructuralType.Column)
{
AnalyticalModel modelColumn = familyInst.GetAnalyticalModel();
// column should be represented by a single curve
if (modelColumn.IsSingleCurve() == true)
{
Curve columnCurve = modelColumn.GetCurve();
}
}
} Public Sub GetColumnCurve(familyInst As FamilyInstance)
' get AnalyticalModel from structural column
If familyInst.StructuralType = StructuralType.Column Then
Dim modelColumn As AnalyticalModel = familyInst.GetAnalyticalModel()
' column should be represented by a single curve
If modelColumn.IsSingleCurve() = True Then
Dim columnCurve As Curve = modelColumn.GetCurve()
End If
End If
End Sub Exceptions
| Exception | Condition |
|---|---|
| Autodesk.Revit.Exceptions InapplicableDataException | This AnalyticalModel contains more than one single curve. |