set_attr#

ensobjlist.set_attr(attr: Any, value: Any) int#

Set an attribute value on all contained objects

Walk the items in this object. If they are ENSOBJ subclasses, attempt to set the specified attribute id to the specified value. Count the number of times that operation was successful and return that number.

Parameters:
attr: Any

The specific attribute (id or string) to change using setattr().

value: Any

The value to attempt to set the specified attribute to.

Returns:
int

The number of successful set operations.

Examples

>>> session.ensight.objs.core.PARTS.set_attr("VISIBLE", True)