The following sections identify load settings and discuss load limitation guidelines.
All functionality on the Setting dialog box Load Cases and Load Combinations tabs can be accessed by the API.
The following properties are available from the corresponding LoadCase BuiltInParameter:
Table 60 Load Case Properties and Parameters
Property |
BuiltInParameter |
Case Number |
LOAD_CASE _NUMBER |
Nature |
LOAD_CASE_NATURE |
Category |
LOAD_CASE_CATEGORY |
The LOAD_CASE_CATEGORY parameter returns an ElementId. The following table identifies the mapping between Category and ElementId Value.
Table 61: Load Case Category
Load Case Category |
BuiltInCategory |
Dead Loads |
OST_LoadCasesDead |
Live Loads |
OST_LoadCasesLive |
Wind Loads |
OST_LoadCasesWind |
Snow Loads |
OST_LoadCasesSnow |
Roof Live Loads |
OST_LoadCasesRoofLive |
Accidental Loads |
OST_LoadCasesAccidental |
Temperature Loads |
OST_LoadCasesTemperature |
Seismic Loads |
OST_LoadCasesSeismic |
The following Document creation methods create corresponding subclasses:
Because they are all Element subclasses, they can be deleted using Document.Delete().
Code Region 29-14: NewLoadCombination() |
public LoadCombination NewLoadCombination(string name, int typeInd, int stateInd, double[] factors, LoadCaseArray cases, LoadCombinationArraycombinations, LoadUsageArray usages); |
For the NewLoadCombination() method, the factor size must be equal to or greater than the sum size of cases and combinations. For example,
There is no Duplicate() method in the LoadCase and LoadNature classes. To implement this functionality, you must first create a new LoadCase (or LoadNature) object using the NewLoadCase() (or NewLoadNature()) method, and then copy the corresponding properties and parameters from an existing LoadCase (or LoadNature).
The following is a minimum sample code to demonstrate a creation of hosted point load in VB.NET:
Code Region 29-15: NewPointLoad() |
'' NewPointLoad with a host (in VB.NET) '' Select a beam, and get a curve of its analytical model. Dim ref As Reference = rvtUIDoc.Selection.PickObject( _ ObjectType.Element, "Select a beam") Dim elem As Element = ref.Element Dim aModel As AnalyticalModel = elem.GetAnalyticalModel Dim aCurve As Curve = aModel.GetCurve '' For simplicity, we assume we want to add a point load '' at the start point of the curve. Dim aSelector As New AnalyticalModelSelector(aCurve) aSelector.CurveSelector = AnalyticalCurveSelector.StartPoint Dim startPointRef As Reference = aModel.GetReference(aSelector) '' Create a hosted point load Dim force As XYZ = New XYZ(0.0, 0.0, -10000.0) Dim moment As XYZ = New XYZ(-100.0, 100.0, 100.0) Dim myPointLoad As PointLoad = _ rvtDoc.Create.NewPointLoad( _ startPointRef, force, moment, False, Nothing, Nothing) |