Gets the member forces associated with this element.
Namespace: Autodesk.Revit.DB.Structure
Assembly: RevitAPI (in RevitAPI.dll) Version: 20.0.0.0 (20.1.1.1)
Since:
2016
Syntax
Return Value
Returns a collection of Member Forces associated with this element. Empty collection will be returned if element doesn't have any Member Forces.
To find out with which end member forces are associated use
[!:Autodesk::Revit::DB::Structure::MemberForces::Position]
property to obtain a position of Member Forces on element.
Remarks
Examples
CopyC#
public MemberForces GetStartMemberForces(FamilyInstance beam)
{
MemberForces startForces = null;
AnalyticalModelStick ams = beam.GetAnalyticalModel() as AnalyticalModelStick;
if (ams != null)
{
IList<MemberForces> beamForces = ams.GetMemberForces();
foreach (MemberForces forces in beamForces)
{
if (forces.Start == true)
{
startForces = forces;
break;
}
}
}
return startForces;
}
CopyVB.NET
Public Function GetStartMemberForces(beam As FamilyInstance) As MemberForces
Dim startForces As MemberForces = Nothing
Dim ams As AnalyticalModelStick = TryCast(beam.GetAnalyticalModel(), AnalyticalModelStick)
If ams IsNot Nothing Then
Dim beamForces As IList(Of MemberForces) = ams.GetMemberForces()
For Each forces As MemberForces In beamForces
If forces.Start = True Then
startForces = forces
Exit For
End If
Next
End If
Return startForces
End Function
See Also