Creates a new Area BoundaryConditions element on a reference.
Namespace: Autodesk.Revit.CreationAssembly: RevitAPI (in RevitAPI.dll) Version: 21.0.0.0 (21.1.1.109)
Syntax
C# |
---|
public BoundaryConditions NewAreaBoundaryConditions( Reference reference, TranslationRotationValue X_Translation, double X_TranslationSpringModulus, TranslationRotationValue Y_Translation, double Y_TranslationSpringModulus, TranslationRotationValue Z_Translation, double Z_TranslationSpringModulus ) |
Visual Basic |
---|
Public Function NewAreaBoundaryConditions ( _ reference As Reference, _ X_Translation As TranslationRotationValue, _ X_TranslationSpringModulus As Double, _ Y_Translation As TranslationRotationValue, _ Y_TranslationSpringModulus As Double, _ Z_Translation As TranslationRotationValue, _ Z_TranslationSpringModulus As Double _ ) As BoundaryConditions |
Visual C++ |
---|
public: BoundaryConditions^ NewAreaBoundaryConditions( Reference^ reference, TranslationRotationValue X_Translation, double X_TranslationSpringModulus, TranslationRotationValue Y_Translation, double Y_TranslationSpringModulus, TranslationRotationValue Z_Translation, double Z_TranslationSpringModulus ) |
Parameters
- reference
- Type: Autodesk.Revit.DB..::..Reference
The Geometry reference obtained from a Wall, Slab or Slab Foundation.
- 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".
Return Value
If successful, NewAreaBoundaryConditions returns an object for the newly created BoundaryConditions with the BoundaryType = 2 - "Area". nullNothingnullptra 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 CreateAreaConditionWithReference(Wall wall, Autodesk.Revit.Creation.Document docCreation) { // Get the Geometry reference to the wall Reference profileReference = null; AnalyticalModel analytical = wall.GetAnalyticalModel() as AnalyticalModel; if (null == analytical) { return false; // the profile reference can't be retrieved. } // loop through the curves of the wall and get the first one as a reference foreach (Curve curve in analytical.GetCurves(AnalyticalCurveType.ActiveCurves)) { profileReference = curve.Reference; if (null != profileReference) { break; } } BoundaryConditions condition = null; // Create the Area Boundary Conditions if we have a profileReference if (null != profileReference) { // Create Area Boundary Conditions with profile reference. condition = docCreation.NewAreaBoundaryConditions(profileReference, TranslationRotationValue.Fixed, 0, TranslationRotationValue.Fixed, 0, TranslationRotationValue.Fixed, 0); } return (null != condition); }

Private Function CreateAreaConditionWithReference(wall As Wall, docCreation As Autodesk.Revit.Creation.Document) As Boolean ' Get the Geometry reference to the wall Dim profileReference As Reference = Nothing Dim analytical As AnalyticalModel = TryCast(wall.GetAnalyticalModel(), AnalyticalModel) If analytical Is Nothing Then ' the profile reference can't be retrieved. Return False End If ' loop through the curves of the wall and get the first one as a reference For Each curve As Curve In analytical.GetCurves(AnalyticalCurveType.ActiveCurves) profileReference = curve.Reference If profileReference IsNot Nothing Then Exit For End If Next Dim condition As BoundaryConditions = Nothing ' Create the Area Boundary Conditions if we have a profileReference If profileReference IsNot Nothing Then ' Create Area Boundary Conditions with profile reference. condition = docCreation.NewAreaBoundaryConditions(profileReference, TranslationRotationValue.Fixed, 0, TranslationRotationValue.Fixed, 0, TranslationRotationValue.Fixed, _ 0) End If Return (condition IsNot Nothing) End Function