Document.NewLineBoundaryConditions(Element, TranslationRotationValue, Double, TranslationRotationValue, Double, TranslationRotationValue, Double, TranslationRotationValue, Double)
Method
Description:
Creates a new Line BoundaryConditions element on a host element.
Creates a new Line BoundaryConditions element on a host element.
Remarks:
This method will only function with the Autodesk Revit Structure application.
This method will only function with the Autodesk Revit Structure application.
Syntax
public BoundaryConditions NewLineBoundaryConditions(
Element hostElement,
TranslationRotationValue X_Translation,
double X_TranslationSpringModulus,
TranslationRotationValue Y_Translation,
double Y_TranslationSpringModulus,
TranslationRotationValue Z_Translation,
double Z_TranslationSpringModulus,
TranslationRotationValue X_Rotation,
double X_RotationSpringModulus
)
Examples
bool CreateLineConditionsWithElement(AnalyticalMember column, Autodesk.Revit.Creation.Document docCreation)
{
if (column.StructuralRole != AnalyticalStructuralRole.StructuralRoleColumn)
{
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);
}
Parameters
| Parameter | Type | Description |
|---|---|---|
| hostElement | Element | A Beam. |
| X_Translation | TranslationRotationValue | A value indicating the X axis translation option. |
| X_TranslationSpringModulus | Double | Translation Spring Modulus for X axis. Ignored if X_Translation is not "Spring". |
| Y_Translation | TranslationRotationValue | A value indicating the Y axis translation option. |
| Y_TranslationSpringModulus | Double | Translation Spring Modulus for Y axis. Ignored if Y_Translation is not "Spring". |
| Z_Translation | TranslationRotationValue | A value indicating the Z axis translation option. |
| Z_TranslationSpringModulus | Double | Translation Spring Modulus for Z axis. Ignored if Z_Translation is not "Spring". |
| X_Rotation | TranslationRotationValue | A value indicating the option for rotation about the X axis. |
| X_RotationSpringModulus | Double | Rotation Spring Modulus for X axis. Ignored if X_Rotation is not "Spring" |
Return Value
| Type | Description |
|---|---|
| BoundaryConditions | If successful, NewLineBoundaryConditions returns an object for the newly created BoundaryConditions with the BoundaryType = 1 - "Line". is returned if the operation fails. |
Exceptions
| Exception | Condition |
|---|---|
| ArgumentException | Thrown if the host element does not exist in the given document. |