Plate
Custom Attributes
User-defined attributes and metadata attached to plate elements.
5 functions
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
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
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
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
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
from openstaad import ops
s = ops.connect()
result = s.DeleteElementAttribute("value", "value")
print(result)