# Plate Attributes functions | OpenStaad Python

> User-defined attributes and metadata attached to plate elements.

Source: https://www.openstaad.com/docs/plate-attributes

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

## Create

### CreateElementAttribute

**Description**

Creates the element attribute.

**Parameters**

- `attribute_name` (str): attribute name.
- `str_value` (str): str value.

**Returns**

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

**Example**

```python
from openstaad import ops

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

## Get

### GetElementCountByAttribute

**Description**

Returns the element count by attribute.

**Parameters**

- `attribute_name` (str): attribute name.
- `str_value` (str): str 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.GetElementCountByAttribute("value", "value")
print(result)
```

### GetElementListByAttribute

**Description**

Returns the element list by attribute.

**Parameters**

- `attribute_name` (str): attribute name.
- `str_value` (str): str value.

**Returns**

list: A list of integers.

**Example**

```python
from openstaad import ops

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

## Set/Assign

### AssignElementAttribute

**Description**

Assigns the element attribute.

**Parameters**

- `attribute_name` (str): attribute name.
- `str_Value` (str): str value.
- `element_list` (bool): element list.

**Returns**

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

**Example**

```python
from openstaad import ops

s = ops.connect()
result = s.AssignElementAttribute("value", "value", True)
print(result)
```

## Delete

### DeleteElementAttribute

**Description**

Deletes the element attribute.

**Parameters**

- `attribute_name` (str): attribute name.
- `str_value` (str): str value.

**Returns**

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

**Example**

```python
from openstaad import ops

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