# Member Specifications functions | OpenStaad Python

> Member behavior modifiers — end releases, offsets, and truss / tension-only / compression-only / cable / inactive specs. Changes how a member acts, not its geometry.

Source: https://www.openstaad.com/docs/member-specifications

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

## Create

### CreateMemberCableSpec

**Description**

Creates the member cable spec.

**Parameters**

- `tension_or_unstressed_len` (int): tension or unstressed len.
- `spec_value` (float): spec value.

**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.CreateMemberCableSpec(1, 1.0)
print(result)
```

### CreateMemberCableSpecEx

**Description**

Creates the member cable spec ex.

**Parameters**

- `tension_or_unstressed_len` (int): tension or unstressed len.
- `spec_value` (float): spec value.
- `tension_end_node_indicator` (int): tension end node indicator.
- `self_weight_factor_x` (float): self weight factor x.
- `self_weight_factor_y` (float): self weight factor y.
- `self_weight_factor_z` (float): self weight factor z.

**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.CreateMemberCableSpecEx(1, 1.0, 1, 1.0, 1.0, 1.0)
print(result)
```

### CreateMemberCompressionSpec

**Description**

Creates the member compression spec.

**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.CreateMemberCompressionSpec()
print(result)
```

### CreateMemberIgnoreStiffSpec

**Description**

Creates the member ignore stiff spec.

**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.CreateMemberIgnoreStiffSpec()
print(result)
```

### CreateMemberInactiveSpec

**Description**

Creates the member inactive spec.

**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.CreateMemberInactiveSpec()
print(result)
```

### CreateMemberOffsetSpec

**Description**

Creates the member offset spec.

**Parameters**

- `offset_location` (int): offset location.
- `offset_with_respect_to` (int): offset with respect to.
- `offset_x` (float): offset x.
- `offset_y` (float): offset y.
- `offset_z` (float): offset z.

**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.CreateMemberOffsetSpec(1, 1, 1.0, 1.0, 1.0)
print(result)
```

### CreateMemberPartialReleaseSpec

**Description**

Creates the member partial release spec.

**Parameters**

- `location` (int): location.
- `dof_release` (list): dof release.
- `factor` (list): factor.

**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.CreateMemberPartialReleaseSpec(1, [1, 2], [1, 2])
print(result)
```

### CreateMemberReleaseSpec

**Description**

Creates a MEMBER RELEASE specification, to be assigned to a beam end.

**Parameters**

- `offset_location` (int): Location on the member: start (`0`) or end (`1`).
- `dof_values` (list[int], 6 elements): Release state for FX, FY, FZ, MX, MY, MZ — `0` = no release, `1` = released.
- `spring_constant_values` (list[float], 6 elements): Spring constants KFX, KFY, KFZ, KMX, KMY, KMZ (used where the matching `dof_values` entry indicates a spring release).

**Returns**

int: A status/reference code from STAAD.Pro for this call:

| Code  | Meaning                                                                                                             |
|-------|-----------------------------------------------------------------------------------------------------------------------|
| 0     | OK.                                                                                                                    |
| -106  | A one-dimensional long array is expected for `dof_values` and a one-dimensional double array for `spring_constant_values`. |
| -108  | The array size is smaller than expected (should be 6).                                                                |
| -6020 | Library error: could not create the MEMBER RELEASE specification.                                                     |

**Example**

```python
from openstaad import ops

s = ops.connect()
result = s.CreateMemberReleaseSpec(1, [0, 0, 0, 1, 1, 1], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0])
print(result)
```

### CreateMemberTensionSpec

**Description**

Creates the member tension spec.

**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.CreateMemberTensionSpec()
print(result)
```

### CreateMemberTrussSpec

**Description**

Creates the member truss spec.

**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.CreateMemberTrussSpec()
print(result)
```

## Get

### GetBetaAngle

**Description**

Returns the beta angle.

**Parameters**

- `beam_id` (int): beam id.

**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.GetBetaAngle(1)
print(result)
```

### GetCountOfBreakableBeamsAtSpecificNodes

**Description**

Returns the count of breakable beams at specific nodes.

**Parameters**

- `nodeList` (list): node 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.GetCountOfBreakableBeamsAtSpecificNodes([1, 2])
print(result)
```

### GetInactiveMemberCount

**Description**

Returns the inactive member 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.GetInactiveMemberCount()
print(result)
```

### GetInactiveMemberList

**Description**

Returns the inactive member list.

**Parameters**

None.

**Returns**

list: A list of integers.

**Example**

```python
from openstaad import ops

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

### GetMemberReleaseSpec

**Description**

Returns the member release spec.

**Parameters**

- `member_no` (int): member no.
- `end` (int): end.

**Returns**

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

**Example**

```python
from openstaad import ops

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

### GetMemberReleaseSpecEx

**Description**

Returns the release specification for a member at the given end.

**Parameters**

- `beam_id` (int): Beam number ID.
- `release_spec_position` (int): Member end: start (`0`) or end (`1`).

**Returns**

tuple: `(release, spring, mp_factor, mp_factor_list)`, where:

| # | Value            | Meaning                                                                                                                     |
|---|------------------|-------------------------------------------------------------------------------------------------------------------------------|
| 1 | `release` (list[int], 6)   | Release state per DOF (FX, FY, FZ, MX, MY, MZ): no release/spring = `0`, release = `1`, spring = `-1`, only MP defined = `-3`, MPX/MPY/MPZ defined = `-2`. |
| 2 | `spring` (list[float], 6)  | Spring constant per DOF, where `release` indicates a spring.                                                                 |
| 3 | `mp_factor` (float)        | Partial moment release factor (shared by MX, MY, MZ).                                                                        |
| 4 | `mp_factor_list` (list[float], 3) | Partial moment release factor per rotational DOF (MX, MY, MZ), when individually defined.                             |

**Example**

```python
from openstaad import ops

s = ops.connect()
release, spring, mp_factor, mp_factor_list = s.GetMemberReleaseSpecEx(1, 0)
print(release, spring)
```

### GetMemberSpecCode

**Description**

Returns the type of member specification attached to a member.

**Parameters**

- `member_id` (int): Member number ID.

**Returns**

int: The member specification type code. See table below.

##### Spec code values

| Value | Member Specification Type |
|-------|---------------------------|
| 0     | Truss member              |
| 1     | Tension-only member       |
| 2     | Compression-only member   |
| 3     | Cable only                |
| 4     | Joist member              |
| -1    | Other                     |

For additional information, see Section "TR.23 Axial Member Specifications" of the Technical Reference Manual.

**Example**

```python
from openstaad import ops

s = ops.connect()
spec_code = s.GetMemberSpecCode(1)
print(spec_code)
```

## Set/Assign

### AssignBetaAngle

**Description**

Assigns the beta angle.

**Parameters**

- `beam_ids` (list): beam ids.
- `beta_angle` (float): beta angle.

**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.AssignBetaAngle([1, 2], 1.0)
print(result)
```

### AssignMemberSpecToBeam

**Description**

Assigns a previously created member specification (truss, tension-only, compression-only, cable, or joist) to one or more beams.

**Parameters**

- `beam_ids` (int or list[int]): Beam number ID, or a list of beam number IDs.
- `spec_id` (int): ID of a member specification created with a function such as `CreateMemberTrussSpec`.

**Returns**

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

**Notes**

The underlying OpenSTAAD COM call reports these codes on failure (all collapsed to `False` by `ops`):

| Code   | Meaning                                             |
|--------|-----------------------------------------------------|
| 0      | OK.                                                   |
| -106   | A one-dimensional long array is expected.            |
| -6017  | Library error: could not assign the specification.   |

**Example**

```python
from openstaad import ops

s = ops.connect()
spec_id = s.CreateMemberTrussSpec()
ok = s.AssignMemberSpecToBeam([1, 2, 3], spec_id)
print(ok)
```

## Remove

### RemoveMemberCableSpecFromBeam

**Description**

Removes the member cable spec from beam.

**Parameters**

- `beam_id` (int): beam id.
- `tension_or_length` (int): tension or length.

**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.RemoveMemberCableSpecFromBeam(1, 1)
print(result)
```

### RemoveMemberCompressionSpecFromBeam

**Description**

Removes the member compression spec from beam.

**Parameters**

- `beam_id` (int): beam id.

**Returns**

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

**Example**

```python
from openstaad import ops

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

### RemoveMemberIgnoreStiffSpecFromBeam

**Description**

Removes the member ignore stiff spec from beam.

**Parameters**

- `beam_id` (int): beam id.

**Returns**

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

**Example**

```python
from openstaad import ops

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

### RemoveMemberInactiveSpecFromBeam

**Description**

Removes the member inactive spec from beam.

**Parameters**

- `beam_id` (int): beam id.

**Returns**

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

**Example**

```python
from openstaad import ops

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

### RemoveMemberOffsetSpecFromBeam

**Description**

Removes the member offset spec from beam.

**Parameters**

- `beam_id` (int): beam id.
- `release_location` (int): release location.

**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.RemoveMemberOffsetSpecFromBeam(1, 1)
print(result)
```

### RemoveMemberReleaseSpecFromBeam

**Description**

Removes the member release spec from beam.

**Parameters**

- `beam_id` (int): beam id.
- `release_location` (int): release location.

**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.RemoveMemberReleaseSpecFromBeam(1, 1)
print(result)
```

### RemoveMemberTensionSpecFromBeam

**Description**

Removes the member tension spec from beam.

**Parameters**

- `beam_id` (int): beam id.

**Returns**

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

**Example**

```python
from openstaad import ops

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

### RemoveMemberTrussSpecFromBeam

**Description**

Removes the member truss spec from beam.

**Parameters**

- `beam_id` (int): beam id.

**Returns**

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

**Example**

```python
from openstaad import ops

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

## Delete

### DeleteMemberReleaseSpec

**Description**

Deletes the member release spec.

**Parameters**

- `beam_id` (int): beam id.
- `release_location` (int): release location.

**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.DeleteMemberReleaseSpec(1, 1)
print(result)
```

### DeleteMemberSpec

**Description**

Deletes the member spec.

**Parameters**

- `spec_id` (int): spec id.

**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.DeleteMemberSpec(1)
print(result)
```
