# Load Combinations functions | OpenStaad Python

> Factored combinations (e.g. 1.2D + 1.6L), automatic combinations, repeat loads, and min/max envelopes of load cases.

Source: https://www.openstaad.com/docs/load-combinations

Every function is a method of the session `s = ops.connect()` (`from openstaad import ops`).

## Create

### CreateLoadEnvelop

**Description**

Creates the load envelop.

**Parameters**

- `envelopNumber` (int): envelop number.
- `envelopType` (int): envelop type.
- `loadCaseList` (list): load case list.

**Returns**

raw: The raw return value from the underlying OpenSTAAD COM call. Refer to the official Bentley OpenSTAAD API reference for this method's exact return semantics.

**Example**

```python
from openstaad import ops

s = ops.connect()
result = s.CreateLoadEnvelop(1, 1, [1, 2])
print(result)
```

### CreateNewLoadCombination

**Description**

Creates the new load combination.

**Parameters**

- `loadCombTitle` (str): load comb title.
- `loadCombNo` (int): load comb no.

**Returns**

raw: The raw return value from the underlying OpenSTAAD COM call. Refer to the official Bentley OpenSTAAD API reference for this method's exact return semantics.

**Example**

```python
from openstaad import ops

s = ops.connect()
result = s.CreateNewLoadCombination("value", 1)
print(result)
```

## Add

### AddAutoCombinationRepeat

**Description**

Adds the auto combination repeat.

**Parameters**

- `varCode` (str): var code.
- `varCategory` (str): var category.
- `varLoadList` (list): var load list.
- `varStartLoadCaseNo` (int): var start load case no.
- `varGeneratedLCS` (int): var generated LCS.
- `bVarReference` (bool): b var reference.
- `bVarNotional` (bool): b var notional.
- `dVarNotionalLoadFactor` (float): d var notional load factor.
- `bVarGB50017` (bool): b var GB 50017.
- `nVarFloor` (int): n var floor.
- `bVarX` (bool): b var x.
- `bVarNegtiveX` (bool): b var negtive x.
- `bVarZ` (bool): b var z.
- `bVarNegtiveZ` (bool): b var negtive z.

**Returns**

bool: `True` if the call succeeded, `False` otherwise.

**Example**

```python
from openstaad import ops

s = ops.connect()
result = s.AddAutoCombinationRepeat("value", "value", [1, 2], 1, 1, True, True, 1.0, True, 1, True, True, True, True)
print(result)
```

### AddAutoLoadCombinations

**Description**

Adds the auto load combinations.

**Parameters**

- `loadCombCode` (str): load comb code.
- `loadCombCategory` (str): load comb category.
- `loadList` (list): load list.

**Returns**

int: An integer value returned by STAAD.Pro for this call.

**Example**

```python
from openstaad import ops

s = ops.connect()
result = s.AddAutoLoadCombinations("value", "value", [1, 2])
print(result)
```

### AddLoadAndFactorToCombination

**Description**

Adds the load and factor to combination.

**Parameters**

- `loadCombNo` (int): load comb no.
- `loadNo` (int): load no.
- `factor` (float): factor.

**Returns**

bool: `True` if the call succeeded, `False` otherwise.

**Example**

```python
from openstaad import ops

s = ops.connect()
result = s.AddLoadAndFactorToCombination(1, 1, 1.0)
print(result)
```

### AddLoadCasesToEnvelop

**Description**

Adds the load cases to envelop.

**Parameters**

- `varEnvNo` (int): var env no.
- `varLoadCaseList` (list): var load case list.

**Returns**

raw: The raw return value from the underlying OpenSTAAD COM call. Refer to the official Bentley OpenSTAAD API reference for this method's exact return semantics.

**Example**

```python
from openstaad import ops

s = ops.connect()
result = s.AddLoadCasesToEnvelop(1, [1, 2])
print(result)
```

### AddRepeatLoad

**Description**

Adds the repeat load.

**Parameters**

- `varLoadCaseList` (list): var load case list.
- `varFactorList` (list): var factor list.

**Returns**

raw: The raw return value from the underlying OpenSTAAD COM call. Refer to the official Bentley OpenSTAAD API reference for this method's exact return semantics.

**Example**

```python
from openstaad import ops

s = ops.connect()
result = s.AddRepeatLoad([1, 2], [1, 2])
print(result)
```

## Get

### GetEnvelopeCount

**Description**

Returns the envelope count.

**Parameters**

None.

**Returns**

raw: The raw return value from the underlying OpenSTAAD COM call. Refer to the official Bentley OpenSTAAD API reference for this method's exact return semantics.

**Example**

```python
from openstaad import ops

s = ops.connect()
result = s.GetEnvelopeCount()
print(result)
```

### GetEnvelopeIDs

**Description**

Returns the envelope i ds.

**Parameters**

None.

**Returns**

list: A list of integers.

**Example**

```python
from openstaad import ops

s = ops.connect()
result = s.GetEnvelopeIDs()
print(result)
```

### GetLoadAndFactorForCombination

**Description**

Returns the load and factor for combination.

**Parameters**

- `varLoadCombNo` (int): var load comb no.

**Returns**

tuple: A tuple of `(list[int], list[float])`.

**Example**

```python
from openstaad import ops

s = ops.connect()
result = s.GetLoadAndFactorForCombination(1)
print(result)
```

### GetLoadCombinationCaseCount

**Description**

Returns the load combination case count.

**Parameters**

None.

**Returns**

raw: The raw return value from the underlying OpenSTAAD COM call. Refer to the official Bentley OpenSTAAD API reference for this method's exact return semantics.

**Example**

```python
from openstaad import ops

s = ops.connect()
result = s.GetLoadCombinationCaseCount()
print(result)
```

### GetLoadCombinationCaseNumbers

**Description**

Returns the load combination case numbers.

**Parameters**

None.

**Returns**

list: A list of integers.

**Example**

```python
from openstaad import ops

s = ops.connect()
result = s.GetLoadCombinationCaseNumbers()
print(result)
```

### GetLoadEnvelopeDetails

**Description**

Returns the load envelope details.

**Parameters**

- `EnvNo` (int): env no.

**Returns**

tuple: A tuple of `(int, int)`.

**Example**

```python
from openstaad import ops

s = ops.connect()
result = s.GetLoadEnvelopeDetails(1)
print(result)
```

### GetLoadListfromLoadEnvelope

**Description**

Returns the load listfrom load envelope.

**Parameters**

- `EnvNo` (int): env no.

**Returns**

list: A list of integers.

**Example**

```python
from openstaad import ops

s = ops.connect()
result = s.GetLoadListfromLoadEnvelope(1)
print(result)
```

### GetNoLoadFactorDirectionInNotionalLoad

**Description**

Returns the no load factor direction in notional load.

**Parameters**

- `nIndex` (int): n index.

**Returns**

raw: The raw return value from the underlying OpenSTAAD COM call. Refer to the official Bentley OpenSTAAD API reference for this method's exact return semantics.

**Example**

```python
from openstaad import ops

s = ops.connect()
result = s.GetNoLoadFactorDirectionInNotionalLoad(1)
print(result)
```

### GetNoLoadFactorInRepeatLoad

**Description**

Returns the no load factor in repeat load.

**Parameters**

- `nIndex` (int): n index.

**Returns**

raw: The raw return value from the underlying OpenSTAAD COM call. Refer to the official Bentley OpenSTAAD API reference for this method's exact return semantics.

**Example**

```python
from openstaad import ops

s = ops.connect()
result = s.GetNoLoadFactorInRepeatLoad(1)
print(result)
```

### GetNoOfLoadAndFactorPairsForCombination

**Description**

Returns the number of the load and factor pairs for combination.

**Parameters**

- `varLoadCombNo` (int): var load comb no.

**Returns**

raw: The raw return value from the underlying OpenSTAAD COM call. Refer to the official Bentley OpenSTAAD API reference for this method's exact return semantics.

**Example**

```python
from openstaad import ops

s = ops.connect()
result = s.GetNoOfLoadAndFactorPairsForCombination(1)
print(result)
```

### GetRepeatLoadByIndex

**Description**

Returns the repeat load by index.

**Parameters**

- `nIndex` (int): n index.

**Returns**

raw: The raw return value from the underlying OpenSTAAD COM call. Refer to the official Bentley OpenSTAAD API reference for this method's exact return semantics.

**Example**

```python
from openstaad import ops

s = ops.connect()
result = s.GetRepeatLoadByIndex(1)
print(result)
```

### GetRepeatLoadCount

**Description**

Returns the repeat load count.

**Parameters**

None.

**Returns**

raw: The raw return value from the underlying OpenSTAAD COM call. Refer to the official Bentley OpenSTAAD API reference for this method's exact return semantics.

**Example**

```python
from openstaad import ops

s = ops.connect()
result = s.GetRepeatLoadCount()
print(result)
```

## Remove

### RemoveLoadCasesFromEnvelop

**Description**

Removes the load cases from envelop.

**Parameters**

- `varEnvNo` (int): var env no.
- `varLoadCaseList` (list): var load case list.

**Returns**

bool: `True` if the call succeeded, `False` otherwise.

**Example**

```python
from openstaad import ops

s = ops.connect()
result = s.RemoveLoadCasesFromEnvelop(1, [1, 2])
print(result)
```

## Delete

### DeleteLoadEnvelop

**Description**

Deletes the load envelop.

**Parameters**

- `varEnvNo` (int): var env no.

**Returns**

bool: `True` if the call succeeded, `False` otherwise.

**Example**

```python
from openstaad import ops

s = ops.connect()
result = s.DeleteLoadEnvelop(1)
print(result)
```

### DeletePrimaryLoadCases

**Description**

Deletes the primary load cases.

**Parameters**

- `varLoadCaseNos` (list): var load case nos.
- `varIsReferenceLoads` (bool): var is reference loads.

**Returns**

bool: `True` if the call succeeded, `False` otherwise.

**Example**

```python
from openstaad import ops

s = ops.connect()
result = s.DeletePrimaryLoadCases([1, 2], True)
print(result)
```

### DeleteReferenceLoadCases

**Description**

Deletes the reference load cases.

**Parameters**

- `varLoadCaseNos` (list): var load case nos.

**Returns**

bool: `True` if the call succeeded, `False` otherwise.

**Example**

```python
from openstaad import ops

s = ops.connect()
result = s.DeleteReferenceLoadCases([1, 2])
print(result)
```

## Is

### IsCombinationCase

**Description**

Checks whether combination case.

**Parameters**

- `nLoadCase` (int): n load case.

**Returns**

bool: `True` if the call succeeded, `False` otherwise.

**Example**

```python
from openstaad import ops

s = ops.connect()
result = s.IsCombinationCase(1)
print(result)
```
