Namespace:
Autodesk.Revit.DB.Structure
LineLoad
Class
Description:
An object that represents a force/moment applied in a linear manner.
An object that represents a force/moment applied in a linear manner.
Remarks:
The load/moment may be uniform or it may vary between the two ends of the line.
The load/moment may be uniform or it may vary between the two ends of the line.
Inheritance Hierarchy:
System.Object
Autodesk.Revit.DB.Element
Autodesk.Revit.DB.Structure.LoadBase
Autodesk.Revit.DB.Structure.LineLoad
System.Object
Autodesk.Revit.DB.Element
Autodesk.Revit.DB.Structure.LoadBase
Autodesk.Revit.DB.Structure.LineLoad
Examples
private void LineLoadInformation(LineLoad lineLoad)
{
StringBuilder information = new StringBuilder("Line Load: ");
// Get the load case name
information.Append("\nLoad case for load: " + lineLoad.LoadCaseName);
//Get the three dimensional force applied to the start point and end point of the line load.
information.Append("\nForce at the start of this line load: " + XYZToString(lineLoad.ForceVector1));
information.Append("\nForce at the end of this line load: " + XYZToString(lineLoad.ForceVector2));
//Get the three dimensional location of the start point and end point for the line load.
information.Append("\nStart point of this line load: " + XYZToString(lineLoad.StartPoint));
information.Append("\nEnd Point of this line load: " + XYZToString(lineLoad.EndPoint));
//Get the three dimensional moment applied to the start point and end point of the line load.
information.Append("\nMoment at the start of this line load: " + XYZToString(lineLoad.MomentVector1));
information.Append("\nMoment at the end of this line load: " + XYZToString(lineLoad.MomentVector2));
//Whether the load is projected or not
if (lineLoad.IsProjected)
{
information.Append("\nThis line load is projected.");
}
else
{
information.Append("\nThis line load is not projected");
}
//Report if the load is uniform
if (false != lineLoad.IsUniform)
{
information.Append("\nThis load is uniform.");
}
else
{
information.Append("\nThis load is not uniform.");
}
//show information of lineload in a MessageBox.
TaskDialog.Show("Revit",information.ToString());
}
// output the point's three coordinates
string XYZToString(XYZ point)
{
return "(" + point.X + ", " + point.Y + ", " + point.Z + ")";
}