Creates a new Line BoundaryConditions element on a host element.
Namespace: Autodesk.Revit.Creation
Assembly: RevitAPI (in RevitAPI.dll) Version: 16.0.0.0 (16.0.0.0)
Syntax
C# |
---|
|
Visual Basic |
---|
|
Visual C++ |
---|
|
Parameters
- hostElement
- Type: Autodesk.Revit.DB Element
A Beam.
- X_Translation
- Type: Autodesk.Revit.DB.Structure TranslationRotationValue
A value indicating the X axis translation option.
- X_TranslationSpringModulus
- Type: System Double
Translation Spring Modulus for X axis. Ignored if X_Translation is not "Spring".
- Y_Translation
- Type: Autodesk.Revit.DB.Structure TranslationRotationValue
A value indicating the Y axis translation option.
- Y_TranslationSpringModulus
- Type: System Double
Translation Spring Modulus for Y axis. Ignored if Y_Translation is not "Spring".
- Z_Translation
- Type: Autodesk.Revit.DB.Structure TranslationRotationValue
A value indicating the Z axis translation option.
- Z_TranslationSpringModulus
- Type: System Double
Translation Spring Modulus for Z axis. Ignored if Z_Translation is not "Spring".
- X_Rotation
- Type: Autodesk.Revit.DB.Structure TranslationRotationValue
A value indicating the option for rotation about the X axis.
- X_RotationSpringModulus
- Type: System Double
Rotation Spring Modulus for X axis. Ignored if X_Rotation is not "Spring"
Return Value
If successful, NewLineBoundaryConditions returns an object for the newly created BoundaryConditions with the BoundaryType = 1 - "Line". a null reference ( Nothing in Visual Basic) is returned if the operation fails.Remarks
This method will only function with the Autodesk Revit Structure application.
Examples

bool CreateLineConditionsWithElement(FamilyInstance column, Autodesk.Revit.Creation.Document docCreation)
{
if (StructuralType.Column != column.StructuralType)
{
throw new Exception("This sample only works for columns.");
}
// Create the new line boundary conditions
BoundaryConditions condition = docCreation.NewLineBoundaryConditions(column, TranslationRotationValue.Fixed, 0,
TranslationRotationValue.Fixed, 0,
TranslationRotationValue.Fixed, 0,
TranslationRotationValue.Fixed, 0);
return (null != condition);
}

Private Function CreateLineConditionsWithElement(column As FamilyInstance, docCreation As Autodesk.Revit.Creation.Document) As Boolean
If StructuralType.Column <> column.StructuralType Then
Throw New Exception("This sample only works for columns.")
End If
' Create the new line boundary conditions
Dim condition As BoundaryConditions = docCreation.NewLineBoundaryConditions(column, TranslationRotationValue.Fixed, 0, TranslationRotationValue.Fixed, 0, TranslationRotationValue.Fixed, _
0, TranslationRotationValue.Fixed, 0)
Return (condition IsNot Nothing)
End Function
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions ArgumentException | Thrown if the host element does not exist in the given document. |