次のセクションでは荷重の設定を特定し、荷重制限のガイドラインを説明します。
[設定]ダイアログ ボックスの[荷重ケース]タブと[荷重組み合わせ]タブのすべての機能に API からアクセスできます。
次のプロパティは、対応する LoadCase BuiltInParameter から利用できます。
表 60 荷重ケース プロパティとパラメータ
プロパティ |
BuiltInParameter |
ケース番号 |
LOAD_CASE _NUMBER |
種類 |
LOAD_CASE_NATURE |
カテゴリ |
LOAD_CASE_CATEGORY |
LOAD_CASE_CATEGORY パラメータは ElementId を返します。次の表は、カテゴリと ElementId 値間のマッピングを示します。
表 61: 荷重ケース カテゴリ
荷重ケース カテゴリ |
BuiltInCategory |
固定荷重 |
OST_LoadCasesDead |
積載荷重 |
OST_LoadCasesLive |
風荷重 |
OST_LoadCasesWind |
積雪荷重 |
OST_LoadCasesSnow |
屋根積載荷重 |
OST_LoadCasesRoofLive |
偶発荷重 |
OST_LoadCasesAccidental |
温度負荷 |
OST_LoadCasesTemperature |
地震荷重 |
OST_LoadCasesSeismic |
ドキュメント作成メソッドは対応するサブクラスを作成します。
これらはすべて Element サブクラスであるため、Document.Delete() を使用して削除できます。
コード領域 29-14: NewLoadCombination() |
public LoadCombination NewLoadCombination(string name, int typeInd, int stateInd, double[] factors, LoadCaseArray cases, LoadCombinationArraycombinations, LoadUsageArray usages); |
NewLoadCombination()メソッドでは、係数サイズはケースと組み合わせの合計サイズ以上にする必要があります。次に例を示します。
LoadCase と LoadNature クラスには、Duplicate()メソッドはありません。この機能を実装するには、最初に NewLoadCase() (または NewLoadNature())メソッドを使用して新しい LoadCase (または LoadNature)オブジェクトを作成し、次に対応するプロパティとパラメータを既存の LoadCase (または LoadNature)からコピーする必要があります。
次は、VB.NET にホストされた点荷重の作成を表す最小のサンプル コードになります。
コード領域 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) |