Skip to main content

Mechanical scripting interface 2025

`IAttributeCollection`

Last update: 09.03.2026

class Ansys.ACT.Interfaces.Common.IAttributeCollection

Bases: object

Defines a collection of attributes.

Overview

Methods

Name Description
Contains Checks if the collection contains the attribute identified by its name.
GetStringValue Returns the string value of the attribute identified by its name.
GetValue Returns the value of the attribute identified by its name.
Remove Removes the attribute identified by its name.
SetValue Sets the value of an attribute identified by its name.

Properties

Name Description
Item Item property.
Keys Gets the list of attribute names.

Property detail

property IAttributeCollection.Item : Any | None

Item property.

property IAttributeCollection.Keys : System.Collections.Generic.ICollection[str] | None

Gets the list of attribute names.

Method detail

IAttributeCollection.Contains(name: str) → bool

Checks if the collection contains the attribute identified by its name.

IAttributeCollection.GetStringValue(name: str) → str

Returns the string value of the attribute identified by its name.

IAttributeCollection.GetValue(name: str, defaultValue: Any) → Any

Returns the value of the attribute identified by its name.

IAttributeCollection.Remove(name: str) → bool

Removes the attribute identified by its name.

IAttributeCollection.SetValue(name: str, value: Any) → None

Sets the value of an attribute identified by its name.

Connect with Ansys