Namespace:
Autodesk.Revit.DB.Structure
BoundaryConditions
Class
Description:
An object that represents a force applied across an area.
An object that represents a force applied across an area.
Inheritance Hierarchy:
System.Object
Autodesk.Revit.DB.Element
Autodesk.Revit.DB.Structure.BoundaryConditions
System.Object
Autodesk.Revit.DB.Element
Autodesk.Revit.DB.Structure.BoundaryConditions
Examples
public void GetInfo_BoundaryConditions(BoundaryConditions boundaryConditions)
{
string message = "BoundaryConditions : ";
boundaryConditions.GetBoundaryConditionsType();
switch (boundaryConditions.GetBoundaryConditionsType())
{
case BoundaryConditionsType.Point:
XYZ point = boundaryConditions.Point;
message += "\nThis BoundaryConditions is a Point Boundary Conditions.";
message += "\nLocation point: (" + point.X + ", "
+ point.Y + ", " + point.Z + ")";
break;
case BoundaryConditionsType.Line:
message += "\nThis BoundaryConditions is a Line Boundary Conditions.";
Curve curve = boundaryConditions.GetCurve();
// Get curve start point
message += "\nLocation Line: start point: (" + curve.GetEndPoint(0).X + ", "
+ curve.GetEndPoint(0).Y + ", " + curve.GetEndPoint(0).Z + ")";
// Get curve end point
message += "; end point:(" + curve.GetEndPoint(1).X + ", "
+ curve.GetEndPoint(1).Y + ", " + curve.GetEndPoint(1).Z + ")";
break;
case BoundaryConditionsType.Area:
message += "\nThis BoundaryConditions is an Area Boundary Conditions.";
IList<CurveLoop> loops = boundaryConditions.GetLoops();
foreach (CurveLoop curveLoop in loops)
{
foreach (Curve areaCurve in curveLoop)
{
// Get curve start point
message += "\nCurve start point:(" + areaCurve.GetEndPoint(0).X + ", "
+ areaCurve.GetEndPoint(0).Y + ", " + areaCurve.GetEndPoint(0).Z + ")";
// Get curve end point
message += "; Curve end point:(" + areaCurve.GetEndPoint(1).X + ", "
+ areaCurve.GetEndPoint(1).Y + ", " + areaCurve.GetEndPoint(1).Z + ")";
}
}
break;
default:
break;
}
TaskDialog.Show("Revit",message);
}