> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Streamlined API reference

The classes and functions that form the Streamlined API are grouped by database element, to help you find what you need:

## Session level

### Session

### *class* Session(service\_layer\_url, user\_name=None, password=None, domain=None, autologon=None, timeout=300000, existing\_session=None, oidc=False, auth\_token=None, refresh\_token=None, use\_stored\_token=False, store\_password=False, max\_retries=0, backend\_configuration=BackendServiceSelection(search=\<BackendType.SOAP: 0>, data\_export=\<BackendType.SOAP: 0>, data\_import=\<BackendType.SOAP: 0>, browse=\<BackendType.SOAP: 0>, engineering\_data=\<BackendType.SOAP: 0>, units=\<BackendType.SOAP: 0>))

Represents a Granta MI Session. Allows the MI Scripting Toolkit to make calls to the Service Layer, and provides
access to and search functions for available databases.

>

> #### \_\_init\_\_(service\_layer\_url, user\_name=None, password=None, domain=None, autologon=None, timeout=300000, existing\_session=None, oidc=False, auth\_token=None, refresh\_token=None, use\_stored\_token=False, store\_password=False, max\_retries=0, backend\_configuration=BackendServiceSelection(search=\<BackendType.SOAP: 0>, data\_export=\<BackendType.SOAP: 0>, data\_import=\<BackendType.SOAP: 0>, browse=\<BackendType.SOAP: 0>, engineering\_data=\<BackendType.SOAP: 0>, units=\<BackendType.SOAP: 0>))

> * **Parameters:**
>   * **service\_layer\_url** – str
>   * **user\_name** – str
>   * **password** – str
>   * **domain** – str
>   * **autologon** – bool
>   * **timeout** – int (Maximum time to wait for a response, in milliseconds)
>   * **existing\_session** – Foundation API [`GRANTA_MIScriptingToolkit.GRANTA_MISession`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.GRANTA_MISession) class
>   * **oidc** – bool (Contact Ansys Technical Support for Granta MI OIDC configuration and setup documentation)
>   * **auth\_token** – str
>   * **refresh\_token** – str
>   * **use\_stored\_token** – bool
>   * **store\_password** – bool (Default value False. Set to True when password is given and needs to be saved
>     for the session’s duration, for example when parallelisation is required.)
>   * **max\_retries** – int (Default value 0. Maximum number of times to retry requests sent to the Service Layer.)
> * **Returns:**
>   None

> #### NOTE
>
> If MI Scripting Toolkit has been installed on the same server machine as Granta MI, then the Granta MI
> server name *must* be specified in full in the url parameter. If you use ‘localhost’ or a loopback address, MI
> Scripting Toolkit will be unable to use the specified user account to connect to Granta MI.

#### update(records, update\_attributes=True, update\_links=False, refresh\_attributes=True, include\_binary\_data\_in\_refresh=False, notes=None, release\_notes=None)

Pushes any changes in the specified records (including adding newly-created records) to the server.
Returns a list of successfully imported [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) objects. If refresh\_attributes
set to True, the imported records’ attributes are exported after the update is complete.

If `include_binary_data_in_refresh` is set to False (default), the export will not fetch the binary data
representing the request File and Picture attributes and will instead export URLs (see the
[`BinaryType.url`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.BinaryType.url) documentation for more information on how to use the URL to access the data). This
setting is recommended for large files and pictures, or if the binary data itself is not required.

To summarize how the file and picture data can be accessed:

* `include_binary_data_in_refresh = False` (default): The [`BinaryType.url`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.BinaryType.url) property is populated.
* `include_binary_data_in_refresh = True`: The [`BinaryType.binary_data`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.BinaryType.binary_data) property, and
  [`AttributeFile.save()`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeFile.save) and [`AttributePicture.save()`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributePicture.save) methods are all available to access and save
  the binary data. The [`BinaryType.url`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.BinaryType.url) property is empty and returns `None`.

#### WARNING

If `include_binary_data_in_refresh` is set to False, the `binary_data` property and `save()` method are
both still available for backwards compatibility. However, they will download the data from Granta MI on
demand for each attribute value. A warning will be generated each time this occurs, but may only occur once
due to the Python warning configuration settings.

This behavior is likely to have a significant performance impact, and so it is recommended that if access to
the binary data is required without a subsequent HTTP GET request, you should specify
`include_binary_data_in_refresh = True`.

On-demand access to attribute values without using [`Table.bulk_fetch()`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.bulk_fetch) is unaffected.

* **Parameters:**
  * **records** – List\[[`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]
  * **update\_attributes** – bool (default value of True)
  * **update\_links** – bool (default value of False)
  * **refresh\_attributes** – bool (default value of True)
  * **include\_binary\_data\_in\_refresh** – bool (default value of False)
  * **notes** – str (default value of None). Revision notes for the update. Applies to all records in the update.
  * **release\_notes** – str (default value of None). Version release notes for the update. Applies to all records
    flagged for release in the update.
* **Returns:**
  List\[[`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]

#### update\_links(records)

Pushes any changes in the links of the specified records (including newly-created records) to the server.
Returns a list of successfully modified [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) objects. All source and target records must be exported
to/from the server before being linked.

* **Parameters:**
  **records** – List\[[`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]
* **Returns:**
  List\[[`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]

#### spawn\_session()

Creates a new Foundation API [`GRANTA_MIScriptingToolkit.GRANTA_MISession`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.GRANTA_MISession) object using the credentials
of the current [`Session`](#GRANTA_MIScriptingToolkit.granta.mi.Session).

If the session was created with manual credentials, then this method will only succeed if `store_password`
was set to `True`. Otherwise, this method will return `None`.

* **Returns:**
  Foundation API [`GRANTA_MIScriptingToolkit.GRANTA_MISession`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.GRANTA_MISession) class

#### WARNING

Calling this method from a Session object that was constructed with manual credentials and
without setting `store_password` to `True` is deprecated and will raise an exception in a
future release.

#### *property* viewer\_base\_url

MI Viewer URL associated with the Service Layer.

* **Returns:**
  str

#### can\_connect()

Checks whether credentials have been provided to the server.

* **Returns:**
  bool

#### assert\_can\_run\_parallelised()

Throws if a task cannot run in parallel mode with current session.

#### connect(spawn\_new\_connection=True)

Returns a Foundation API [`GRANTA_MIScriptingToolkit.GRANTA_MISession`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.GRANTA_MISession) object using the current
[`Session`](#GRANTA_MIScriptingToolkit.granta.mi.Session)’s credentials.

* **Parameters:**
  **spawn\_new\_connection** – bool (default value True)
* **Returns:**
  Foundation API [`GRANTA_MIScriptingToolkit.GRANTA_MISession`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.GRANTA_MISession) class

#### persist\_oidc\_token()

Stores a refresh token in the credential manager for your system for unattended later use. The `keyring`
package uses system-managed storage, and supports the following credential managers:

* Windows Credential Manager

* macOS Keychain

* Freedesktop Secret Service

* KDE4 and KDE5 KWallet

* **Returns:**
  None

#### refetch\_dbs()

Fetches the list of databases from the server. Makes a Service Layer call.

* **Returns:**
  None

#### *property* dbs

List of databases on the server.

* **Returns:**
  List\[[`Database`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Database)]

#### *property* dbs\_by\_key

Dict of databases on the server, keyed by database key

* **Returns:**
  Dict\[str, [`Database`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Database)]

#### *property* dbs\_by\_guid

Dict of databases on the server, keyed by database GUID

* **Returns:**
  Dict\[str, [`Database`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Database)]

#### get\_db(name=None, db\_key=None, guid=None, version\_guid=None)

Returns the database matching the specified criteria. Provide at least one of:

> * Database name: `name`
> * Database key: `db_key`
> * Database GUID: `guid`
> * Database Version GUID: `version_guid`

Raises a KeyError if multiple databases are found for the same criteria. Raises a KeyError if no databases are
found matching the provided criteria.

* **Parameters:**
  * **name** – str
  * **db\_key** – str
  * **guid** – str
  * **version\_guid** – str
* **Returns:**
  [`Database`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Database) object

#### search\_for\_records\_by\_name(name)

Searches by record name over all databases
(uses [`Database.search_for_records_by_name()`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Database.search_for_records_by_name)).
Makes a Service Layer call for each table in each database.

* **Parameters:**
  **name** – str
* **Returns:**
  List\[[`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]

#### search\_for\_records\_by\_text(text)

Performs a simple text search over all databases
(uses [`Database.search_for_records_by_text()`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Database.search_for_records_by_text)).
Makes a Service Layer call for each table in each database.

* **Parameters:**
  **text** – str
* **Returns:**
  List\[[`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]

#### records\_from\_string(text, use\_strict\_version=True)

Generates [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) objects from a string in MI clipboard format (version 12 or higher).

#### NOTE

Required string format is .tsv with column headers RecordHistoryGuid, RecordGuid, Table,
DatabaseKey and RecordFullName.

#### NOTE

In MI Viewer, a field name may be prefixed by an asterisk to denote a default Match
Column. This functionality is not supported in the MI Scripting Toolkit. Either the
RecordHistoryGuid (if `use_strict_mode = False`) or RecordGuid (if
`use_strict_mode = True`) will be used to identify the record.

* **Parameters:**
  * **text** – str
  * **use\_strict\_version** – bool (default value of `True`) - If `True`, return only
    the specified version of the record (if you do not have permission, the item will be `None`).
    If `False`, return the latest visible version of the record.
* **Returns:**
  List\[[`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]

#### get\_record\_by\_id(db\_key, hguid=None, vguid=None, history\_identity=None, version\_number=None)

Returns the record with the specified ID from the database specified by `db_key`. This
method resolves records with the following (sets of) references in priority order:

1. `vguid` (Record GUID - uniquely identifies specific version of record)
2. `history_identity` (Record history identity - uniquely identifies record only), and optionally
   `version_number` (Record version number)
3. `hguid` (Record History GUID - uniquely identifies record only)

If `vguid` or `version_number` are not provided for version controlled records, this method will
return the latest available version of the record available to the user. The latest available version
is dependent on the user’s Granta MI permissions.

* **Parameters:**
  * **db\_key** – str
  * **hguid** – str (Record History GUID, uniquely identifies record)
  * **vguid** – str (Record GUID, uniquely identifies record version)
  * **history\_identity** – int (Record history identity)
  * **version\_number** – int (Record version number)
* **Returns:**
  [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object

#### get\_records\_by\_ids(record\_identifiers)

Returns a [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object for each identifier provided. The returned list of records
will have the same number of elements as the provided list of identifiers. If no record corresponds
to that identifier then the corresponding item in the returned list will be `None`.

Each element in the `record_identifiers` parameter should be a dictionary with the `db_key` entry.
Additionally, it must contain one or more of the following (sets of) references in priority order:

1. `vguid` (Record GUID - uniquely identifies specific version of record)
2. `history_identity` (Record history identity - uniquely identifies record only), and optionally
   `version_number` (Record version number)
3. `hguid` (Record History GUID - uniquely identifies record only)

If `vguid` or `version_number` are not provided for version controlled records, this method will
return the latest available version of the record available to the user. The latest available version
is dependent on the user’s Granta MI permissions.

* **Parameters:**
  **record\_identifiers** – Sequence\[Dict\[str, Union\[str, int]]]
* **Returns:**
  List\[[`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]

#### bulk\_fetch\_release\_states(records, batch\_size=100, parallelise=False, max\_num\_threads=6)

Fetches and populates the release states of the specified [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) objects.

* **Parameters:**
  * **records** – List\[[`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]
  * **batch\_size** – int (default value of 100)
  * **parallelise** – bool
  * **max\_num\_threads** – int (default value of 6)
* **Returns:**
  None

#### bulk\_delete\_or\_withdraw\_records(records, batch\_size=100, parallelise=False, max\_num\_threads=6, update\_release\_states=False, withdrawal\_notes=None)

Deletes records from the server (or withdraws them, if in a version-controlled table). Record release states
can also be updated using this method.

* **Parameters:**
  * **records** – List\[[`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]
  * **batch\_size** – int (default value of 100)
  * **parallelise** – bool
  * **max\_num\_threads** – int (default value of 6)
  * **update\_release\_states** – bool
  * **withdrawal\_notes** – Optional\[str]
* **Returns:**
  None

### AttributeFetcher

### *class* AttributeFetcher(table, batch\_size=100, attributes=None, records=None, max\_parallel\_threads=6, include\_binary\_data=False)

Bulk exporter for record data. Fetches data values for all named [`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) and
[`PseudoAttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.PseudoAttributeDefinition) objects from the specified [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) objects and [`Table`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table).

Set `attributes` to  `None` to export all record data.

A class method executes the data export, allowing the [`AttributeFetcher`](#GRANTA_MIScriptingToolkit.granta.mi_bulk_utilities.AttributeFetcher) to be edited post-creation.

#### \_\_init\_\_(table, batch\_size=100, attributes=None, records=None, max\_parallel\_threads=6, include\_binary\_data=False)

* **Parameters:**
  * **table** – [`Table`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table) object
  * **batch\_size** – int (default value of 100)
  * **attributes** – List\[Union\[[`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition), [`PseudoAttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.PseudoAttributeDefinition), str]]
  * **records** – List\[[`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]
  * **max\_parallel\_threads** – int (default value of 6)
  * **include\_binary\_data** – bool (default value of False)
* **Returns:**
  None

#### *property* records

List of records to be fetched (exported).

* **Returns:**
  List\[[`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]

#### *property* attribute\_list

List of attributes for which data will be fetched (exported).

* **Returns:**
  List\[Union\[[`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition), [`PseudoAttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.PseudoAttributeDefinition)]]

#### fetch\_attribute\_data(parallelise=False)

Fetch the attribute data for the provided records and attributes, and populate the corresponding
[`AttributeValue`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeValue) objects for each record.

* **Parameters:**
  **parallelise** – bool
* **Returns:**
  None

### AssociatedRecordFetcher

### *class* AssociatedRecordFetcher(table, records, target\_table, link\_direction='Both', attribute\_path=None, batch\_size=100)

Bulk fetcher for associated records. Fetches all [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) objects via association chains from the specified
[`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) objects in the target [`Table`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table). Provides means to choose the direction that association chains
are followed, and to specify a list of tabular attributes which are chained together.

This operation performs no subset filtering.

A class method executes the fetch, allowing the [`AssociatedRecordFetcher`](#GRANTA_MIScriptingToolkit.granta.mi_bulk_utilities.AssociatedRecordFetcher) to be edited post-creation.

#### \_\_init\_\_(table, records, target\_table, link\_direction='Both', attribute\_path=None, batch\_size=100)

* **Parameters:**
  * **table** – [`Table`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table)
  * **records** – List\[[`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]
  * **target\_table** – [`Table`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table)
  * **link\_direction** – str (`Both`, `Forward`, `Reverse`)
  * **attribute\_path** – List\[[`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition)]
  * **batch\_size** – int (default value of 100)
* **Returns:**
  None

#### fetch\_associated\_records(parallelise=False, max\_parallel\_threads=6)

Fetch the associated records in the specified [`Table`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table) from the specified [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) objects. Return a
list of dictionaries with `source_record` and `associated_records` fields for each provided
[`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record).

This operation performs no subset filtering.

* **Parameters:**
  * **parallelise** – [`bool`](https://docs.python.org/3/library/functions.html#bool)
  * **max\_parallel\_threads** – [`int`](https://docs.python.org/3/library/functions.html#int) (default 6)
* **Returns:**
  List\[Dict\[str, Union\[[`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record), List\[[`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]]]]

### LinkFetcher

### *class* LinkFetcher(table, batch\_size=100, records=None, link\_groups=None, filter\_subsets=True)

Bulk record link fetcher (exporter). Fetches and populates record link groups for the specified [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)
objects in the specified [`Table`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table). Set `link_groups` to `None` to fetch all record link groups.

Set `filter_subsets` to `True` to return records that are in the default subsets of the target table.
Set it to `False` to search with no filtering by subset.

#### \_\_init\_\_(table, batch\_size=100, records=None, link\_groups=None, filter\_subsets=True)

* **Parameters:**
  * **table** – [`Table`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table) object
  * **batch\_size** – int (default value of 100)
  * **records** – List\[[`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]
  * **link\_groups** – List\[str]
  * **filter\_subsets** – bool (default value of True)
* **Returns:**
  None

#### *property* link\_groups

List of link groups to export.

* **Returns:**
  List\[str]

#### *property* records

List of records to fetch link groups for.

* **Returns:**
  List\[[`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]

#### fetch\_linked\_records(parallelise=False, max\_parallel\_threads=6)

Perform the bulk fetch (export). Batches Service Layer calls into efficient blocks, then populates
[`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object pseudo-attributes.

* **Parameters:**
  * **parallelise** – bool
  * **max\_parallel\_threads** – int (default value of 6)
* **Returns:**
  None

### ReleaseStateFetcher

### *class* ReleaseStateFetcher(session, records, batch\_size=100, max\_parallel\_threads=6)

Allows record release states to be fetched from the server in bulk.

The list of [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) objects, batch size, and number of threads in parallel can be edited post-creation.

A class method fetches the release states and populates the relevant [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) properties.

#### \_\_init\_\_(session, records, batch\_size=100, max\_parallel\_threads=6)

* **Parameters:**
  * **batch\_size** – int (default value of 100)
  * **records** – List\[[`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]
  * **max\_parallel\_threads** – int (default value of 6)
* **Returns:**
  None

#### *property* records

List of [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) objects to be processed.

* **Returns:**
  List\[[`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]

#### fetch\_release\_states(parallelise=False)

Fetches the release states of the specified [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) objects from the server, and populates their
relevant properties.

* **Parameters:**
  **parallelise** – bool (splits operation into multiple threads if set to `True`)
* **Returns:**
  None

### BulkRecordDeleterWithdrawer

### *class* BulkRecordDeleterWithdrawer(session, records, batch\_size=100, max\_parallel\_threads=6, withdrawal\_notes=None)

Allows for bulk deletion or withdrawal or records from the server. Records are withdrawn from
version-controlled tables, otherwise they are deleted.

The deletion/withdrawal is performed by a method on the class; as such, the list of
[`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) objects for deletion, batch size, and number of threads in parallel can be edited post-creation.

#### \_\_init\_\_(session, records, batch\_size=100, max\_parallel\_threads=6, withdrawal\_notes=None)

* **Parameters:**
  * **session** – [`Session`](#GRANTA_MIScriptingToolkit.granta.mi.Session) object
  * **batch\_size** – int (default value of 100)
  * **records** – List\[[`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]
  * **max\_parallel\_threads** – int (default value of 6)
  * **withdrawal\_notes** – Optional\[str]
* **Returns:**
  None

#### *property* records

List of records to be deleted or withdrawn.

* **Returns:**
  List\[[`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]

#### delete\_or\_withdraw(parallelise=False)

Performs the deletion (or withdrawal, if the records are in a version-controlled table).

* **Parameters:**
  **parallelise** – bool (splits operation into multiple threads if `True`)
* **Returns:**
  None

### DataRevisionHistoryFetcher

### *class* DataRevisionHistoryFetcher(\_mi, records, batch\_size=100, max\_parallel\_threads=6)

Bulk exporter for data revision history.

Fetches the data revision history for all attributes of the provided records and populates the
[`Record.data_revision_history`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.data_revision_history) property.
See [`AttributeFetcher`](#GRANTA_MIScriptingToolkit.granta.mi_bulk_utilities.AttributeFetcher) to export attribute data.

#### \_\_init\_\_(\_mi, records, batch\_size=100, max\_parallel\_threads=6)

* **Parameters:**
  * **\_mi** – [`Session`](#GRANTA_MIScriptingToolkit.granta.mi.Session) object
  * **records** – List\[[`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]
  * **batch\_size** – int (default value of 100)
  * **max\_parallel\_threads** – int (default value of 6)
* **Returns:**
  None

#### fetch\_data\_revision\_history(parallelise=False)

Fetches the data revision history for all attributes of the provided records and populates the
[`Record.data_revision_history`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.data_revision_history) property.

* **Parameters:**
  **parallelise** – bool

## Database and Table level

### Database

### *class* Database

Represents an MI database, and provides access to its tables, unit systems, and record link groups.

#### *property* mi

MI Session that was used to create or access the [`Database`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Database) object. Used for any Service Layer calls made by
the [`Database`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Database).

* **Returns:**
  [`Session`](#GRANTA_MIScriptingToolkit.granta.mi.Session) object

#### *property* parameters

Parameters associated with the database, indexed by name.

* **Returns:**
  Dict\[str, [`DatabaseParameter`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.DatabaseParameter)]

#### refetch\_unit\_systems()

Fetches the unit systems associated with the database. Makes a Service Layer call.

* **Returns:**
  None

#### dimensionally\_equivalent\_units(unit)

Returns all units which are dimensionally equivalent to the specified unit, with conversion factor and offset.
Makes a single call to the Service Layer and caches the results.

* **Example:**
  `db.dimensionally_equivalent_units(unit='kg')` might return
  `{'g': {'factor': 1000.0, 'offset': 0.0}}`.
* **Parameters:**
  **unit** – str
* **Returns:**
  Dict\[str, Dict\[str, float]]

#### *property* unit\_systems\_available

Names of unit systems associated with the database.

* **Returns:**
  List\[str]

#### set\_unit\_system(unit\_system, absolute\_temperatures=False)

Sets the unit system for the [`Database`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Database) object. The default unit system is the same as for the database
itself.

#### WARNING

This method is deprecated. Use [`Database.unit_system`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Database.unit_system) or [`Database.absolute_temperatures`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Database.absolute_temperatures).

* **Parameters:**
  * **unit\_system** – str
  * **absolute\_temperatures** – bool (Whether to use absolute temperature units or not)
* **Returns:**
  None

#### *property* absolute\_temperatures

Whether the [`Database`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Database) uses absolute temperature units (Kelvin/Rankine) or not (Celsius/Fahrenheit).

Default value is `False`.

* **Returns:**
  bool

#### *property* currency

Database currency code.

* **Returns:**
  str

#### *property* unit\_system

Currently selected unit system (default is [`DATABASE_UNIT_SYSTEM`](#GRANTA_MIScriptingToolkit.granta.mi_constants.DATABASE_UNIT_SYSTEM)).

* **Returns:**
  str

#### get\_all\_link\_details\_where(name, table\_name=None, to\_table\_name=None, to\_db\_key=None, rlg\_types=None)

Returns all the named Foundation API [`GRANTA_MIScriptingToolkit.RecordLinkGroupDetail`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.RecordLinkGroupDetail)
objects that match the specified criteria.

#### WARNING

This method is deprecated. Use [`Database.record_link_groups`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Database.record_link_groups).

* **Parameters:**
  * **name** – str (Name of [`GRANTA_MIScriptingToolkit.RecordLinkGroupDetail`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.RecordLinkGroupDetail) object)
  * **table\_name** – Optional\[str]
  * **to\_table\_name** – Optional\[str]
  * **to\_db\_key** – Optional\[str]
  * **rlg\_types** – Optional\[List\[str]]
* **Returns:**
  list of Foundation API [`GRANTA_MIScriptingToolkit.RecordLinkGroupDetail`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.RecordLinkGroupDetail) class

#### get\_link\_detail(name, table\_name=None, to\_table\_name=None, to\_db\_key=None, rlg\_type=None)

Returns the named Foundation API [`GRANTA_MIScriptingToolkit.RecordLinkGroupDetail`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.RecordLinkGroupDetail) object.
Must resolve to exactly one record link group.

#### WARNING

This method is deprecated. Use [`Database.record_link_groups`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Database.record_link_groups).

* **Parameters:**
  * **name** – str (Name of [`GRANTA_MIScriptingToolkit.RecordLinkGroupDetail`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.RecordLinkGroupDetail) object)
  * **table\_name** – str
  * **to\_table\_name** – str
  * **to\_db\_key** – str
  * **rlg\_type** – str
* **Returns:**
  Foundation API [`GRANTA_MIScriptingToolkit.RecordLinkGroupDetail`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.RecordLinkGroupDetail) class

#### *property* link\_details

Foundation API [`GRANTA_MIScriptingToolkit.RecordLinkGroupDetail`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.RecordLinkGroupDetail) objects associated with the database.

#### WARNING

This method is deprecated. Use [`Database.record_link_groups`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Database.record_link_groups).

* **Returns:**
  List\[[`GRANTA_MIScriptingToolkit.RecordLinkGroupDetail`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.RecordLinkGroupDetail)]

#### *property* record\_link\_groups

All record link groups in the database.

* **Returns:**
  List\[[`LinkGroupDetails`](#GRANTA_MIScriptingToolkit.granta.mi_meta_classes.LinkGroupDetails)]

#### *property* db\_key

Database key.

* **Returns:**
  str

#### *property* name

Name of the database.

* **Returns:**
  str

#### *property* guid

GUID of the database.

* **Returns:**
  str

#### *property* version\_guid

Version GUID of the database.

* **Returns:**
  str

#### refresh\_tables()

Updates the list of tables associated with the database. Makes a Service Layer call.

* **Returns:**
  None

#### *property* tables

Tables associated with the database.

* **Returns:**
  List\[[`Table`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table)]

#### *property* tables\_by\_name

Tables in the database, as dictionary keyed by name.

* **Returns:**
  Dict\[str, [`Table`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table)]

#### *property* tables\_by\_guid

Tables in the database, as dictionary keyed by GUID.

* **Returns:**
  Dict\[str, [`Table`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table)]

#### get\_table(name, subsets=Ellipsis, unit\_system=None, absolute\_temperatures=None)

Returns the [`Table`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table) object with the specified name. Case-insensitive.

If the `subsets` argument is not provided, the default subset is applied to the returned table. Set
`subsets` to an empty set to disable subset filtering.

If the `unit_system` argument is not provided, the currently active unit system is used.

If the `absolute_temperatures` argument is not provided, `absolute_temperatures` is set to `False`.

#### WARNING

The `subsets`, `unit_system`, and `absolute_temperatures` parameters are deprecated. To specify the
active subsets for the table, use [`Table.subsets`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.subsets), [`Table.add_subsets()`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.add_subsets), or
[`Table.remove_subsets()`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.remove_subsets) on the returned table object. To specify the unit system or whether absolute
temperatures should be used, use [`Database.unit_system`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Database.unit_system) or [`Database.absolute_temperatures`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Database.absolute_temperatures).

* **Parameters:**
  * **name** – str
  * **subsets** – Optional\[Set\[str]] (default value of `...`)
  * **unit\_system** – Optional\[str] (default value of `None`)
  * **absolute\_temperatures** – Optional\[bool] (default value of `None`)
* **Returns:**
  [`Table`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table) object

#### get\_table\_by\_guid(guid, subsets=Ellipsis, unit\_system=None, absolute\_temperatures=None)

Returns the [`Table`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table) object with the specified GUID. Case-insensitive.

If the `subsets` argument is not provided, the default subset is applied to the returned table. Set
`subsets` to an empty set to disable subset filtering.

If the `unit_system` argument is not provided, the currently active unit system is used.

If the `absolute_temperatures` argument is not provided, `absolute_temperatures` is set to `False`.

#### WARNING

The `subsets`, `unit_system`, and `absolute_temperatures` parameters are deprecated. To specify the
active subsets for the table, use [`Table.subsets`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.subsets), [`Table.add_subsets()`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.add_subsets), or
[`Table.remove_subsets()`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.remove_subsets) on the returned table object. To specify the unit system or whether absolute
temperatures should be used, use [`Database.unit_system`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Database.unit_system) or [`Database.absolute_temperatures`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Database.absolute_temperatures).

* **Parameters:**
  * **guid** – str
  * **subsets** – Set\[str] (default value of `...`)
  * **unit\_system** – str (default value of [`DATABASE_UNIT_SYSTEM`](#GRANTA_MIScriptingToolkit.granta.mi_constants.DATABASE_UNIT_SYSTEM))
  * **absolute\_temperatures** – bool (default value of `False`)
* **Returns:**
  [`Table`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table) object

#### search\_for\_records\_by\_name(name)

Performs a search on record name across the database. Returns only the [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) objects whose
short or long names are an exact match for `name`. Case-insensitive. This method searches in the
currently active subsets for each table, and will raise an exception if a table has more than one
active subset.

Makes a separate Service Layer call for each table in the database.

**Note:** Use [`Table.search_for_records_by_name()`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.search_for_records_by_name) to narrow your search to a single table.

* **Parameters:**
  **name** – str
* **Returns:**
  List\[[`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]

#### search\_for\_records\_by\_text(text)

Performs a simple text search across the database for the string provided. Returns a list of matching
[`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) objects. This method does not apply any subset filtering.

Makes a separate Service Layer call for each table in the database.

**Note:** Use [`Table.search_for_records_by_text()`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.search_for_records_by_text) to narrow your search to a single table.

* **Parameters:**
  **text** – str
* **Returns:**
  List\[[`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]

#### search\_for\_records\_where(list\_of\_criteria, silent=True)

Performs a search using criteria within tables across the database.

Use [`Table.search_for_records_where()`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.search_for_records_where) to narrow your search to a single table.

Criteria searches can be performed at the database level only if the provided `list_of_criteria` is not
table specific, i.e. all criterion apply to pseudo-attributes.
If any criterion is specific to an attribute, then the criterion is table specific and the search will be
performed on the table.
If the `list_of_criteria` comprise criteria in multiple tables, a [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError) is raised.

#### NOTE

Tabular column criteria are aggregated by column name when processed server-side, effectively restricting
results to records where a single row must meet all criteria on the same column.
To perform a search with multiple tabular column criteria defined on the same column, and obtain results
where the criteria can be met by individual different rows, perform individual searches for each criterion
and compute the intersection of the resulting lists of records.

If `silent` is True then errors caused by non-existent attributes will be ignored and no results
will be returned, otherwise the method will raise an exception.

* **Parameters:**
  * **list\_of\_criteria** – List\[[`SearchCriterion`](#GRANTA_MIScriptingToolkit.granta.mi_meta_classes.SearchCriterion)]
  * **silent** – bool
* **Returns:**
  a list of [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) objects that match the provided criteria.
* **Return type:**
  List\[[`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]

#### get\_records\_by\_ids(record\_identifiers)

Returns a [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object for each identifier provided. The returned list of records
will have the same number of elements as the provided list of identifiers. If no record corresponds
to that identifier then the corresponding item in the returned list will be `None`.

Each element in the `record_identifiers` parameter should be a dictionary with one or more of the
following (sets of) references in priority order:

1. `vguid` (Record GUID - uniquely identifies specific version of record)
2. `history_identity` (Record history identity - uniquely identifies record only), and optionally
   `version_number` (Record version number)
3. `hguid` (Record History GUID - uniquely identifies record only)

If `vguid` or `version_number` are not provided for version controlled records, this method will
return the latest available version of the record available to the user. The latest available version
is dependent on the user’s Granta MI permissions.

* **Parameters:**
  **record\_identifiers** – Sequence\[Dict\[str, Union\[str, int]]]
* **Returns:**
  List\[[`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]

#### get\_record\_by\_id(hguid=None, vguid=None, history\_identity=None, version\_number=None)

Returns the [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object with the following (sets of) references in priority order:

1. `vguid` (Record GUID - uniquely identifies specific version of record)
2. `history_identity` (Record history identity - uniquely identifies record only), and optionally
   `version_number` (Record version number)
3. `hguid` (Record History GUID - uniquely identifies record only)

If `vguid` or `version_number` are not provided for version controlled records, this method will
return the latest available version of the record available to the user. The latest available version
is dependent on the user’s Granta MI permissions.

* **Parameters:**
  * **hguid** – str (Record History GUID - uniquely identifies record)
  * **vguid** – str (Record GUID - uniquely identifies record version)
  * **history\_identity** – int (Record history identity)
  * **version\_number** – int (Record version number)
* **Returns:**
  [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object

### Table

### *class* Table

Represents an MI table, and provides access to records (particularly searching on record properties),
exporters and attribute definitions.

#### NOTE

Do not create new instances of this class; it represents a pre-existing database structure.

#### *property* unit\_system

Unit system currently in use.

* **Returns:**
  str

#### set\_display\_unit(attribute, unit\_symbol)

Sets the display unit for ‘’POIN’’ and ‘’RNGE’’ attributes (this is not used for import or FEA exporters).

#### NOTE

Units that include a currency can only be set with the abstract `currency` unit. This will cause the
attribute to be returned with the Database Currency. For example instead of `USD/kg` use
`currency/kg`.

* **Parameters:**
  * **attribute** – Union\[str, AttributeDefinitionPoint, AttributeDefinitionRange] (str must be the attribute
    name)
  * **unit\_symbol** – str
* **Returns:**
  None

#### reset\_display\_unit(attribute)

Resets the display unit for a `POIN` or `RNGE` attribute back to the unit system default.

* **Parameters:**
  **attribute** – Union\[str, AttributeDefinitionPoint, AttributeDefinitionRange] (str must be the attribute
  name)
* **Returns:**
  None

#### *property* min\_max\_type

How table-wide minimum and maximum values of point (`POIN`), integer (`INPT`), range (`RNGE`) and
date-time (`DTTM`) attributes in the table are calculated:

* `None`: Does not calculate values (can improve performance when loading tables)
* `Approximate` (default): Uses a fast, approximate algorithm
* `Exact`: Takes account of current subset and permissions (can be slow on large tables)

Setting this property clears cache extrema information for all attributes in the table.

* **Returns:**
  str

#### refresh\_subsets()

Fetches the list of subsets which can be applied to this table. Makes a Service Layer call.

* **Returns:**
  None

#### *property* subsets\_available

Subsets which can be applied to this table.

* **Returns:**
  Set\[str]

#### *property* default\_subset

The default subset for this [`Table`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table).

* **Returns:**
  str or None

#### *property* subsets

Subsets that are currently applied to the [`Table`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table) object. Used for record creation, searching,
and record fetching.

#### WARNING

If using any Table method which returns a list of records, such as a search method or
[`Table.all_records()`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.all_records), you must ensure that only one subset is currently applied to the
table. Otherwise a `ValueError` will be raised.

* **Returns:**
  Set\[str]

#### add\_subsets(values)

Adds single or multiple subsets to the list of subsets currently applied to the [`Table`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table) object.

* **Parameters:**
  **values** – Set\[str], Tuple\[str] or List\[str]
* **Returns:**
  None

#### remove\_subsets(values)

Removes single or multiple subsets from the list of subsets currently associated with the [`Table`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table) object.

* **Parameters:**
  **values** – Set\[str], Tuple\[str] or List\[str]
* **Returns:**
  None

#### all\_records(include\_folders=False, include\_generics=True, filter\_by\_subset=True, subset\_name=None)

Returns a flattened list of all records in the table and populates the `children` property
of each [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object. If `filter_by_subset` is True then the operation will only
return records that are in the subset given in `subset_name`, if no value is provided then
the subset specified on the table will be used. If `filter_by_subset` is False then records
will be returned from all subsets. Makes a Service Layer call.

* **Parameters:**
  * **include\_folders** – bool
  * **include\_generics** – bool
  * **filter\_by\_subset** – bool
  * **subset\_name** – str
* **Returns:**
  List\[[`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]

#### WARNING

If you set `filter_by_subset` to True, you must either provide a `subset_name` or
ensure that the table has only one subset applied. If more than one subset is applied,
this will raise a ValueError.

#### search\_for\_records\_by\_text(text, filter\_by\_subset=True, subset\_name=None)

Performs a simple text search within the table for the specified string. Returns a list of matching
[`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) objects. If `filter_by_subset` is True then the search will only return records that
are in the subset given in `subset_name`, if no value is provided then the subset specified on the
table will be used. If `filter_by_subset` is False then records will be returned from all subsets.
Makes a Service Layer call.

#### WARNING

If you set `filter_by_subset` to True, you must provide a `subset_name` or ensure that the table being
searched has only one subset applied. If more than one subset is applied, this will raise a ValueError.

#### NOTE

Use [`Database.search_for_records_by_text()`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Database.search_for_records_by_text) to search across the whole database.

* **Parameters:**
  * **text** – str
  * **filter\_by\_subset** – bool
  * **subset\_name** – str
* **Returns:**
  List\[[`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]

#### search\_for\_records\_where(list\_of\_criteria, silent=False, filter\_by\_subset=True, subset\_name=None)

Performs a search using criteria within the table.

Use [`Database.search_for_records_where()`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Database.search_for_records_where) to search across the whole database.

The provided `list_of_criteria` must only comprise criteria defined against attributes in this table or
criteria defined against pseudo-attributes. If it includes any criteria defined against attributes of another
table, a [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError) is raised.

#### NOTE

Tabular column criteria are aggregated by column name when processed server-side, effectively restricting
results to records where a single row must meet all criteria on the same column.
To perform a search with multiple tabular column criteria defined on the same column, and obtain results
where the criteria can be met by individual different rows, perform individual searches for each criterion
and compute the intersection of the resulting lists of records.

If `silent` is True then errors caused by non-existent attributes will be ignored and no results
will be returned, otherwise the method will raise an exception.

If `filter_by_subset` is True then the search will only return records that
are in the subset given in `subset_name`, if no value is provided then the subset specified on the
table will be used. If `filter_by_subset` is False then records will be returned from all subsets.

#### WARNING

If you set `filter_by_subset` to True, you must provide a `subset_name` or ensure that the table being
searched has only one subset applied. If more than one subset is applied, this will raise a ValueError.

* **Parameters:**
  * **list\_of\_criteria** – List\[[`SearchCriterion`](#GRANTA_MIScriptingToolkit.granta.mi_meta_classes.SearchCriterion)]
  * **silent** – bool
  * **filter\_by\_subset** – bool
  * **subset\_name** – str
* **Return type:**
  List\[[`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]
* **Returns:**
  a list of [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) objects that match the provided criteria.

#### *property* name

Name of the table.

* **Returns:**
  str

#### *property* guid

GUID of the table.

* **Returns:**
  str

#### *property* db\_key

Parent database key.

* **Returns:**
  str

#### refresh\_attributes()

Performs a Foundation API [`BrowseService.GetAttributeDetails()`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#GRANTA_MIScriptingToolkit.BrowseService.BrowseService.GetAttributeDetails) request and creates a new set
of attributes for the table from the results.
Makes a Service Layer call.

* **Returns:**
  None

#### *property* layouts

Fetch and view the layouts available in this table.

* **Returns:**
  Dict\[str, [`TableLayout`](#GRANTA_MIScriptingToolkit.granta.mi_meta_classes.TableLayout)]

#### *property* default\_layout

Name of default layout for this [`Table`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table).

* **Returns:**
  str or None

#### *property* attributes

All attributes included in the table schema, indexed by name. Meta-attributes are accessible through the
`meta_attributes` property of their parent attribute.

* **Returns:**
  Dict\[str, [`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition)]

#### *property* mi

MI Session that was used to create or access the [`Table`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table) object. Used for any Service Layer calls made by
the [`Table`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table).

* **Returns:**
  [`Session`](#GRANTA_MIScriptingToolkit.granta.mi.Session) object

#### *property* database

[`Database`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Database) in which the [`Table`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table) is defined.

* **Returns:**
  [`Database`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Database) object

#### get\_attribute\_definition(name=None, identity=None)

Returns the [`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) object specified by `name` or the identifier `identity`.
Meta-attributes are also returned if the identifier is provided.

* **Parameters:**
  * **name** – str (Name of the [`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) object)
  * **identity** – int (Attribute identifier)
* **Returns:**
  [`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) object or List\[[`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition)]

#### get\_records\_by\_ids(record\_identifiers)

Returns a [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object for each identifier provided. The returned list of records
will have the same number of elements as the provided list of identifiers. If no record corresponds
to that identifier in this table then the corresponding item in the returned list will be `None`.

Each element in the `record_identifiers` parameter should be a dictionary with one or more of the
following (sets of) references in priority order:

1. `vguid` (Record GUID - uniquely identifies specific version of record)
2. `history_identity` (Record history identity - uniquely identifies record only), and optionally
   `version_number` (Record version number)
3. `hguid` (Record History GUID - uniquely identifies record only)

If `vguid` or `version_number` are not provided for version controlled records, this method will
return the latest available version of the record available to the user. The latest available version
is dependent on the user’s Granta MI permissions.

This method can return records outside the currently selected subset.

* **Parameters:**
  **record\_identifiers** – Sequence\[Dict\[str, Union\[str, int]]]
* **Returns:**
  List\[[`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]

#### get\_record\_by\_id(history\_identity=None, hguid=None, vguid=None, version\_number=None)

Returns the [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object with the following (sets of) references in priority order:

1. `vguid` (Record GUID - uniquely identifies specific version of record)
2. `history_identity` (Record history identity - uniquely identifies record only), and optionally
   `version_number` (Record version number)
3. `hguid` (Record History GUID - uniquely identifies record only)

If `vguid` or `version_number` are not provided for version controlled records, this method will
return the latest available version of the record available to the user. The latest available version
is dependent on the user’s Granta MI permissions.

This method can return records outside the currently selected subset.

* **Parameters:**
  * **history\_identity** – int (Record history identity)
  * **hguid** – str (Record History GUID - uniquely identifies record)
  * **vguid** – str (Record GUID - uniquely identifies record version)
  * **version\_number** – int (Record version number)
* **Returns:**
  [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object or None

#### get\_record\_by\_lookup\_value(attribute\_name, lookup\_value)

Returns a [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object specified by attribute name and a exact match for a short text string
(lookup value), provided that:

* The `lookup_value` matches exactly one record in the table.

* The record is in the default subset of the table.

* **Parameters:**
  * **attribute\_name** – str
  * **lookup\_value** – str

* **Returns:**
  [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object or None

#### *property* children

Return the children of the Table node. Analogous to [`Record.children`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.children), this returns all the records one
level from the Table root.

Records returned by this property may have been cached from previous calls to [`Table.refetch_children()`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.refetch_children) or
[`Table.all_records()`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.all_records), which apply subset filtering. If the [`Table`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table) subset configuration has
since been updated, refresh the list of children via one of the methods listed.

If there is no cached list of children, children are dynamically fetched on property access via
[`refetch_children()`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.refetch_children). The default subset filtering behavior is applied.

#### WARNING

You must ensure that the table has only one subset applied. If more than one subset is
applied, this will raise a ValueError when dynamically retrieving children records.

* **Returns:**
  List\[[`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]

#### refetch\_children(filter\_by\_subset=True, subset\_name=None)

Refreshes the list of direct children belonging to the table. If `filter_by_subset` is True then the
operation will only return records that are in the subset given in `subset_name`, if no value is
provided then the subset specified on the table will be used. If `filter_by_subset` is False then
records will be returned from all subsets. Makes a Service Layer call.

* **Parameters:**
  * **filter\_by\_subset** – bool
  * **subset\_name** – str
* **Returns:**
  None

#### WARNING

If you set `filter_by_subset` to True, you must provide a `subset_name` or ensure that the table
has only one subset applied. If more than one subset is applied, this will raise a ValueError.

#### search\_for\_records\_by\_name(name, filter\_by\_subset=True, subset\_name=None)

Performs a search on record name within the table. Returns only the [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) objects whose
short or long names are an exact match for `name`. If `filter_by_subset` is True then the search
will only return records that are in the subset given in `subset_name`, if no value is provided then
the subset specified on the table will be used. If `filter_by_subset` is False then records will be
returned from all subsets. Makes a Service Layer call. This method is Case-insensitive.

#### WARNING

If you set `filter_by_subset` to True, you must provide a `subset_name` or ensure that the table being
searched has only one subset applied. If more than one subset is applied, this will raise a ValueError.

#### NOTE

Use [`Database.search_for_records_by_name()`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Database.search_for_records_by_name) to search across the whole database.

* **Parameters:**
  * **name** – str
  * **filter\_by\_subset** – bool
  * **subset\_name** – str
* **Returns:**
  List\[[`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]

#### create\_empty\_attribute\_value(definition)

Create an empty [`AttributeValue`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeValue) instance for an attribute from its
[`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition).
This can subsequently be assigned to a record for import.

* **Parameters:**
  **definition** – [`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) object
* **Returns:**
  [`AttributeValue`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeValue) object

#### create\_record(name, parent=None, short\_name=None, attributes=None, folder=False, subsets=None, release\_record=False, color=RecordColor.InheritFromParent)

Creates a new [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object in the [`Table`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table). The record will not exist
in MI, or be able to be assigned as a parent, until it is pushed to the server.

* **Parameters:**
  * **name** – str (Long name)
  * **parent** – [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) or [`Table`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table) object
  * **short\_name** – str
  * **attributes** – Dict\[str,
    [`AttributeValue`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeValue)]
  * **folder** – bool (Whether the record will be Folder type)
  * **release\_record** – bool (Whether the record will be released when it is next updated)
  * **subsets** – Set\[str] (List of subsets the record will belong to)
  * **color** – Union\[str, RecordColor] (Record color - Inherits from parent by default)
* **Returns:**
  [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object

#### paths\_from(paths)

Create multiple paths between specified start and end nodes in the table tree.

Paths are specified as a list of dictionaries with the following structure:

```python theme={null}
{'starting_node': Optional[Record],
'tree_path': ['list', 'of', 'folders'],
'end_node': '<end node string>',
'color': 'color for all new nodes to be assigned'}
```

See description of [`path_from()`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.path_from) for further details.

* **Parameters:**
  **paths** – List\[Dict\[str, Union\[[`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record), str, None, List\[str]]]]
* **Returns:**
  List\[Tuple\[dict, [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]]

#### path\_from(starting\_node, tree\_path, end\_node=None, color=RecordColor.InheritFromParent)

Ensures that all the folders in a specified path are available, and creates any that do not already exist.

* **Parameters:**
  * **starting\_node** – A [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) or `None`. Identifies the node under which the new path will start.
    Set to `None` to start the path at the root of the table. Set to an existing
    record/folder to create the path from the specified node.
  * **tree\_path** – List\[str] The names of the folders in the path, e.g. `['Polymers', 'Plastics', 'Thermoplastics', ...]`.
    Folders in the path will be created if they don’t already exist. Existing records on the path will be
    converted to generic records.
  * **end\_node** – str (Optional) The name of a new record that will be created below the last path node.
  * **color** – [`RecordColor`](#GRANTA_MIScriptingToolkit.granta.mi_constants.RecordColor) (Optional) Sets the color of all folders and records in the path.
* **Returns:**
  The [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object at the end of the path: the created record if `end_node` has been specified,
  otherwise the last folder in the path.

#### get\_records\_from\_path(starting\_node, tree\_path, use\_short\_names=False)

Return all of the records that are found at the end of the path from a specified node.

* The starting node identifies the node immediately above the path. To start the path at the top of the tree,
  set `starting_node` to `None`. To start the path under any other node in the tree,
  specify a [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) as the `starting_node`.
* Specify the path as a list of record names e.g. `['Polymers', 'Plastics', 'Thermoplastics', ...]`.
* You can include “wildcards” in the path by setting a node to ‘None’ e.g.
  `['Thermoplastics', 'None', 'Unfilled', ...]`.
* By default, the strings specified in the path list are assumed to be record full names; to specify the path
  using record short names instead, set `use_short_names` to True.

Example 1:

> `recs = table.get_records_from_path(None, ['Record 1', None, 'Record 2'])`

will return all records that are children of a record named Record 2, that also have Record 1 as a
great-grandparent. The grandparent is set as a wildcard, and so any is allowed.

Example 2:

> `recs = table.get_records_from_path(None, ['Record 1', 'Record 3', None])`

will return all records that are grandchildren of records named Record 3 that also have a great-grandparent
called Record 1.

Both of these examples have assumed that Record 1 is a top-level record (and have a starting node as a table
object to reflect this), but the method does not require this. The starting node can be any record object in
the tree.

* **Parameters:**
  * **starting\_node** – any [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) in the table tree. To start the path at the root node of the table
    tree, set to `None`.
  * **tree\_path** – a list of strings specifying the names of the records in the path. May include ‘None’ as a
    wildcard.
  * **use\_short\_names** – a boolean that specifies whether the strings in the path are the record short names
* **Returns:**
  returns a list of records
* **Return type:**
  List\[[`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]

#### bulk\_fetch(records, attributes=None, batch\_size=100, parallelise=False, max\_num\_threads=6, include\_binary\_data=False)

Populates data values for all named [`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) and [`PseudoAttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.PseudoAttributeDefinition) objects in
the specified [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) objects. Set `attributes` to  `None` to export all record data.
Attribute values for requested `attributes` are added to [`Record.attributes`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.attributes) dictionary whether the
attribute is populated or not.

Meta-attributes can be included in a bulk operation by providing the meta-attribute [`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition)
in `attributes`. [`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) of meta-attributes can be obtained from the parent attribute
[`AttributeDefinition.meta_attributes`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition.meta_attributes).

Attribute values will not be created for attributes not included in the export via the attributes argument and
trying to access them might raise a [`KeyError`](https://docs.python.org/3/library/exceptions.html#KeyError).

If `include_binary_data` is set to False (default), the export will not fetch the binary data
representing the request File and Picture attributes and will instead export URLs (see the
[`BinaryType.url`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.BinaryType.url) documentation for more information on how to use the URL to access the data). This
setting is recommended for large files and pictures, or if the binary data itself is not required.

To summarize how the file and picture data can be accessed:

* `include_binary_data = False` (default): The [`BinaryType.url`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.BinaryType.url) property is populated.
* `include_binary_data = True`: The [`BinaryType.binary_data`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.BinaryType.binary_data) property, and
  [`AttributeFile.save()`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeFile.save) and [`AttributePicture.save()`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributePicture.save) methods are both available to access and save
  the binary data. The [`BinaryType.url`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.BinaryType.url) property is empty and returns `None`.

This operation performs no subset filtering, so all tabular rows will be included in the response
regardless of the subset membership of the linked records.

#### WARNING

If `include_binary_data` is set to False, the `binary_data` property and `save()` method are
both still available for backwards compatibility. However, they will download the data from Granta MI on
demand for each attribute value. A warning will be generated each time this occurs, although the default
warning configuration in Python is to only display each warning once.

This behavior is likely to have a significant performance impact, and so it is recommended that if access to
the binary data is required without the HTTP GET request, you should specify `include_binary_data = True`.

This performance impact will also be evident during the re-import of File or Picture attributes, or
tabular attributes that contain File or Picture columns. It is strongly recommended to set
`include_binary_data = True` if any File or Picture data will be re-imported into Granta MI.

On-demand access to attribute values without using [`Table.bulk_fetch()`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.bulk_fetch) is unaffected.

#### NOTE

Providing a list of attributes by name or by [`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) will not fetch any meta-attributes
associated with those attributes. If the meta-attributes are not explicitly requested, then the resulting
[`AttributeValue.meta_attributes`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeValue.meta_attributes) dictionary will contain empty meta-attribute values.

The following code snippet shows how to include meta-attributes and pseudo-attributes in a `bulk_fetch`
request:

```python theme={null}
table = db.get_table("MaterialUniverse")
attribute_names = ["Density", "Price", "Young's modulus"]
print("Fetch three attributes by name")
table.bulk_fetch(records, attributes=attribute_names)

attribute_definitions = [table.attributes[name] for name in attribute_names]
print("Fetch three attributes by AttributeDefinition")
table.bulk_fetch(records, attributes=attribute_definitions)

attr_and_meta_definitions = attribute_definitions + [meta_attr
                                                     for attr in attribute_definitions
                                                     for meta_attr in attr.meta_attributes.values()]
print("Fetch three attributes and their meta-attributes")
table.bulk_fetch(records, attributes=attr_and_meta_definitions)

attr_meta_and_pseudo_definitions = attr_and_meta_definitions + mpy.RecordProperties.all()
print("Fetch three attributes, their meta-attributes, and all pseudo-attributes")
table.bulk_fetch(records, attributes=attr_meta_and_pseudo_definitions)
```

* **Parameters:**
  * **attributes** – List\[Union\[[`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition),
    [`PseudoAttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.PseudoAttributeDefinition), str]]
  * **records** – List\[[`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]
  * **batch\_size** – int (default value of 100)
  * **parallelise** – bool
  * **max\_num\_threads** – int (default value of 6)
  * **include\_binary\_data** – bool (default value of False)
* **Returns:**
  None

#### bulk\_link\_fetch(records, link\_groups=None, batch\_size=100, parallelise=False, max\_num\_threads=6, filter\_subsets=True)

Fetches and populates record link groups for the specified [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)
objects. Set `link_groups` to `None` to fetch all record link groups.

Set `filter_subsets` to `True` to return records that are in the
default subsets of the target table. Set it to `False` to search without
filtering by subset.

* **Parameters:**
  * **records** – List\[[`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]
  * **link\_groups** – List\[str]
  * **batch\_size** – int (default value of 100)
  * **parallelise** – bool
  * **max\_num\_threads** – int (default value of 6)
  * **filter\_subsets** – bool (default value of `True`)
* **Returns:**
  None

#### bulk\_fetch\_associated\_records(records, target\_table, link\_direction='Both', attribute\_path=None, batch\_size=100, parallelise=False, max\_num\_threads=6)

Fetches records associated with the specified [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) objects from a target [`Table`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table). Returns a list
of dictionaries containing the source record and associated records for each [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) provided.

You may specify `link_direction` to only follow tabular links in the specified direction, or provide a list of
[`AttributeDefinitionTabular`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinitionTabular) objects in `attribute_path` to follow only those tabular links.

* **Parameters:**
  * **records** – List\[[`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]
  * **target\_table** – [`Table`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table)
  * **link\_direction** – str (`Both` (default), `Forward`, `Reverse`)
  * **attribute\_path** – List\[[`AttributeDefinitionTabular`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinitionTabular)]
  * **batch\_size** – int (default value of 100)
  * **parallelise** – bool
  * **max\_num\_threads** – int (default value of 6)
* **Returns:**
  List\[Dict\[str, Union\[[`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record), List\[[`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]]]]

#### bulk\_fetch\_data\_revision\_history(records, batch\_size=100, parallelise=False, max\_num\_threads=6)

Fetches the data revision history for all attributes of the provided records and populates the
[`Record.data_revision_history`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.data_revision_history) property.

* **Parameters:**
  * **records** – List\[[`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]
  * **batch\_size** – int (default value of 100)
  * **parallelise** – bool
  * **max\_num\_threads** – int (default value of 6)
* **Returns:**
  None

#### get\_available\_exporters(package=None, model=None, applicability\_tag=None)

Returns exporters available on the table filtered by package, model, and applicability tag value.

* **Parameters:**
  * **package** – [`str`](https://docs.python.org/3/library/stdtypes.html#str) The target FEA analysis package. For example: ‘NX 10.0’, ‘CATIA V5’.
  * **model** – [`str`](https://docs.python.org/3/library/stdtypes.html#str) The material model type. For example, ‘Isotropic’, ‘Linear, temperature-independent,
    isotropic, thermal, plastic’.
  * **applicability\_tag** – [`str`](https://docs.python.org/3/library/stdtypes.html#str) A tag that identifies the applications for which an exporter is intended
    to be used. For example, ‘MIMaterialsGateway’, ‘MIViewer’.
* **Returns:**
  List\[[`Exporter`](#GRANTA_MIScriptingToolkit.granta.mi_exporters.Exporter)]

### LinkGroupDetails

### *class* LinkGroupDetails

Provides access to the properties of a record link group.

#### *property* name

Name of the record link group.

* **Returns:**
  str

#### *property* table\_to

Name of the table targeted by the link group.

* **Returns:**
  str

#### *property* database\_to

Database key of the database target by the link group.

* **Returns:**
  str

#### *property* table\_from

Name of the table the link group comes from.

* **Returns:**
  str

#### *property* database\_from

Database key of the database the link group originates from.

* **Returns:**
  str

#### *property* type

Whether the record link group is ‘static’, ‘crossDatabase’ or ‘dynamic’.

* **Returns:**
  str

#### *property* reverse\_name

Name of the record link group in the return direction.

* **Returns:**
  str

### TableLayout

### *class* TableLayout(name, table)

Provides a JSON-format display of a Granta layout. You can access this through the `layout` property.

#### NOTE

Do not create new instances of this class manually.

#### \_\_init\_\_(name, table)

* **Parameters:**
  * **name** – str
  * **table** – [`Table`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table) object
* **Returns:**
  None

#### *property* name

Layout name.

* **Returns:**
  str

#### *property* layout

JSON-formatted version of the layout.

* **Returns:**
  List\[Dict\[str, Union\[str, List\[str], Dict\[str, Union\[str, List\[str]]]]]]

#### *property* categories

List of all the categories (headings) in the layout.

* **Returns:**
  List\[str]

#### *property* attributes\_by\_category

Dictionary of attribute lists, indexed by the layout category they are in.

* **Returns:**
  Dict\[str, List\[str]]

#### *property* link\_groups\_by\_category

Dictionary of link group lists, indexed by the layout category they are in.

* **Returns:**
  Dict\[str, List\[str]]

#### *property* meta\_attributes\_by\_attribute

Dictionary of meta-attribute lists, indexed by parent attributes.

* **Returns:**
  Dict\[str, List\[str]]

#### meta\_attributes\_on(attribute\_name)

Returns the list of meta-attributes corresponding to a given attribute in this layout.

* **Parameters:**
  **attribute\_name** – str
* **Returns:**
  List\[str]

### Exporter

### *class* Exporter(mi, exporter\_key)

#### \_\_init\_\_(mi, exporter\_key)

Represents a Granta MI FEA exporter. FEA exporters are used to export record data from Granta MI into formats
supported by CAD and CAE packages.

This operation performs no subset filtering, so all tabular rows will be included in the Initial XML
regardless of the subset membership of the linked records.

* **Parameters:**
  * **mi** – Current [`Session`](#GRANTA_MIScriptingToolkit.granta.mi.Session) object
  * **exporter\_key** – str (Unique identifier for this exporter)
* **Returns:**
  None

#### *property* default\_file\_extension

Returns the default file extension as defined by the exporter configuration file.

* **Returns:**
  str

#### save(file\_path, file\_name=None, file\_extension=None)

Saves the output of the last FEA export to the path provided using the default naming convention and file
extension for the exporter; specify a file\_name or file\_extension to override the defaults.

* **Parameters:**
  * **file\_path** – str (File path of the form *C:\Users\Username\\*)
  * **file\_name** – str (*Optional* - Output file name. Does not require a file extension.)
  * **file\_extension** – str (*Optional* - Output file extension.)
* **Returns:**
  None

#### *property* default\_file\_name

Returns the default file name for the last performed export, as defined by the exporter configuration file.

* **Returns:**
  str

#### *property* default\_encoding

Returns the default file encoding scheme as defined by the exporter configuration file.

#### NOTE

This is returned as a Python-compatible string (e.g. “cp1252”) rather than the .NET codepage “1252”.

* **Returns:**
  str

#### *property* default\_bom

Returns the default byte-order mark as defined by the exporter configuration file. If no BOM is required by
default, this property is `None`.

* **Returns:**
  Union\[str, None]

#### get\_parameters\_required\_for\_export(records)

Returns a dictionary of all the parameter definitions the Exporter requires to export the data from
the specified list of records, indexed by parameter name.

* **Parameters:**
  **records** – List\[[`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]
* **Returns:**
  Dict\[str, [`ExporterParameter`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.ExporterParameter)]

#### run\_exporter(records, stop\_before=None, parameter\_defs=None, sig\_figs=None)

Performs an FEA export on the specified list of records, returning the data representing the records as a string.

* **Parameters:**
  * **records** – List\[[`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]
  * **stop\_before** – Union\[int, str] (Either refers to the index of the transform step (int) or its name (str))
  * **parameter\_defs** – Dict\[str, [`ExporterParameter`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.ExporterParameter)]
  * **sig\_figs** – int
* **Returns:**
  str (Contains data output by the exporter)

#### export\_list\_is\_valid(records)

Verifies that a list of records is valid for export.

If the exporter was created from a table search, then this method verifies that all records come from this
table. Otherwise, the first record is used to determine which table the exporter belongs to.

* **Parameters:**
  **records** – List\[[`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]
* **Returns:**
  bool (Whether the specified list of records can be exported with this exporter)

#### *property* name

The name of the exporter, as defined in the `.exp` file

* **Returns:**
  str

#### *property* exporter\_key

The unique key, that is used to identify the exporter.

* **Returns:**
  str

#### *property* model

The Finite-Element Material Model name.

#### NOTE

This name is exported to the initial XML file, and appears in the MI Viewer and
MI Explore export interfaces.

* **Returns:**
  str

#### *property* package

The Package defines the name of the target CAE analysis package.

#### NOTE

This name is exported to the initial XML file, and appears in the MI Viewer and
MI Explore export interfaces.

* **Returns:**
  str

#### *property* description

The Exporter description.

* **Returns:**
  str

#### *property* unit\_systems

All the unit-systems this exporter supports.

* **Returns:**
  List\[str]

#### *property* unit\_system

The currently selected unit-system.

If None then the default unit system for the exporter will be used, otherwise the provided
unit-system will be used when running the exporter.

* **Returns:**
  Optional\[str]

#### *property* use\_absolute\_temperatures

Whether this exporter should use absolute temperatures.

If `True` the exporter will use the absolute form of the temperature unit defined in the
selected unit-system. Otherwise, it will use the relative form.

* **Returns:**
  bool

#### *property* absolute\_temperatures\_optional

Whether this exporter allows the user to specify absolute or relative temperatures.

If `True` the user can choose to use the absolute or relative form of the temperature
unit defined in the unit system. Otherwise, the exporter will use the form defined in the
`.exp` file.

* **Returns:**
  bool

#### *property* transforms

Iterable containing the transform steps defined for this exporter.

Each entry in the iterable contains the index of the transform stage, and the ID.
Either can be used when running the exporter to selectively run transformation steps.

* **Returns:**
  Iterable\[Mapping\[str, Union\[str, int]]]

## Record level

### Record

### *class* Record(name, table, parent=None, short\_name=None, attributes=None, subsets=None, folder=None, record\_color=None, release\_record=True)

Stores and provides access to record attributes, pseudo-attributes, links and children. Provides methods for adding,
editing and deleting records, and importing/exporting record data.

New [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) objects may be created to represent records that do not currently exist in the database:

* A name and parent table must be specified. `name` will become the record’s long name. The record short name
  (or tree name) can be set via the argument `short_name`, or via the [`Record.short_name`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.short_name) property following
  object creation. If a record is pushed to MI without a specifying short name, the short name will default to the
  record name.
* Records created this way will not exist in the host database until the changes have been
  pushed to MI (see [`Session.update()`](#GRANTA_MIScriptingToolkit.granta.mi.Session.update)).

#### NOTE

Do not create new instances of [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) objects for records which are already in the database.
Existing records will have Foundation API classes associated with them, from which the Streamlined API will
automatically generate and return [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) objects as required.

#### \_\_init\_\_(name, table, parent=None, short\_name=None, attributes=None, subsets=None, folder=None, record\_color=None, release\_record=True)

* **Parameters:**
  * **name** – [`str`](https://docs.python.org/3/library/stdtypes.html#str) (Long name for new records)
  * **table** – [`Table`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table) object
  * **parent** – [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) or [`Table`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table) object
  * **short\_name** – [`str`](https://docs.python.org/3/library/stdtypes.html#str) (Short (tree) name for new records)
  * **attributes** – Dict\[[`str`](https://docs.python.org/3/library/stdtypes.html#str), [`AttributeValue`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeValue)]
  * **subsets** – Set\[[`str`](https://docs.python.org/3/library/stdtypes.html#str)] (Subsets the record belongs to)
  * **folder** – [`bool`](https://docs.python.org/3/library/functions.html#bool) (Whether the record is ‘Folder’ type)
  * **record\_color** – [`RecordColor`](#GRANTA_MIScriptingToolkit.granta.mi_constants.RecordColor) (Color of the record)
  * **release\_record** – [`bool`](https://docs.python.org/3/library/functions.html#bool) (Release state of the record; `True` to release next version)
* **Returns:**
  None

#### *property* name

Long name of record.

If the [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object represents an existing record:

* The property will initially return the exported name of the record. It will be
  fetched if it has not already been exported.
* If the property is modified, the [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) name will be set to the specified
  value.
* If the property is set to `None`, the [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) name will be reset to the
  exported value.

If the [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object represents a new record:

* The property will initially return the value specified in the [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) constructor.
* If the property is modified, the [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) name will be set to the specified
  value.
* If the property is set to `None`, the [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) name will be set to `None`.

#### NOTE

If a [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) is imported with `name` set to `None`, a `ValueError` will be
raised.

* **Return type:**
  [str](https://docs.python.org/3/library/stdtypes.html#str)

#### *property* mi

MI Session that was used to create or access the record.
Used for any Service Layer calls made by the [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object.

* **Returns:**
  [`Session`](#GRANTA_MIScriptingToolkit.granta.mi.Session) object

#### *property* table

Parent [`Table`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table) the record belongs to.

* **Returns:**
  [`Table`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table) object

#### *property* table\_name

Name of parent table.

* **Returns:**
  str

#### *property* db\_key

Database key for the database the record belongs to.

* **Returns:**
  str

#### *property* subsets

Subsets that the record belongs to.

* **Returns:**
  Set\[str]

#### *property* flag\_for\_release

Whether the record will be made available to users when it is next updated.

* `True` (default): If changes were made to the [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record), a new version will be
  created, otherwise the unreleased version of the record will be released when the server is updated.
* `False`: If changes were made to the [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record), a new, unreleased version
  will be created when the server is updated.

#### NOTE

If you do not have the correct permissions to change release states, setting this property
will not have the documented effect. Please see the Service Layer documentation for more details.

* **Returns:**
  bool or None

#### *property* color

Color of the record when displayed in MI Viewer and other Granta MI applications.

If the [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object represents an existing record:

* The `color` property will initially return the exported color of the record. It will be
  fetched if it has not already been exported.
* If `color` is modified, the [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) color will be set to the specified value.
* If `color` is set to `None`, the [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) color will be reset to the
  exported value.

If the [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object represents a new record:

* The `color` property will initially return the value specified in the [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)
  constructor. If not set, it will default to the value InheritFromParent.
* If `color` is modified, the [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) color will be set to the specified value.
* If `color` is set to `None`, the [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) color will be set to the value
  InheritFromParent.

#### NOTE

If a [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) is imported with `color` set to `None`, the record will
inherit the color of the parent record.

* **Returns:**
  [`RecordColor`](#GRANTA_MIScriptingToolkit.granta.mi_constants.RecordColor)

#### *property* short\_name

Short (tree) name of the record.

If the [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object represents an existing record:

* The `short_name` property will initially return the exported short name of the record.
  It will be fetched if it has not already been exported.
* If `short_name` is modified, the [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) short name will be set to the specified
  value.
* If `short_name` is set to `None`, the [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) short name will be reset to the
  exported value.

If the [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object represents a new record:

* The `short_name` property will initially return the value specified in the
  [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) constructor.
* If `short_name` is modified, the [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) short name will be set to the specified
  value.
* If `short_name` is set to `None`, the [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) short name will be set to
  `None`.

#### NOTE

If a [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) is imported with `short_name` set to `None`, the short name
will default to the record name.

* **Returns:**
  str, optional

#### *property* parent

Parent record or table of this record.

* **Returns:**
  [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) or [`Table`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table) object

#### find\_parent()

Finds and sets the parent record or table.

If a [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) has been created from a Foundation API [`GRANTA_MIScriptingToolkit.RecordReference`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.RecordReference)
object (for example, an existing database record), its parent may not be defined. This function gets the
Foundation API [`GRANTA_MIScriptingToolkit.TreeRecord`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.TreeRecord) object (if it does not already exist) and uses
it to create and/or set a parent [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object. If the record is at the highest level, the parent is
set as the host [`Table`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table) object instead.

Since the parent record is in all subsets that this record is in, this operation performs no subset filtering.

* **Returns:**
  None

#### *property* history\_guid

Record History GUID, if it exists. Records can be uniquely identified by their Record History GUID, which
will return the latest version the user has access to.

* **Returns:**
  str or None

#### *property* record\_guid

Record GUID, if it exists. Each version of a record can be uniquely identified by its Record GUID.

* **Returns:**
  str or None

#### *property* history\_identity

Record history identity, if it exists.

* **Returns:**
  int or None

#### set\_attributes(attributes)

Flags attributes to update on the server when [`Session.update()`](#GRANTA_MIScriptingToolkit.granta.mi.Session.update)
is next called. If [`set_attributes()`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.set_attributes) is not called on modified attributes, changes
to those attributes will not be transferred to MI.

* **Parameters:**
  **attributes** – Union\[Iterable\[AttributeValue]]
* **Returns:**
  None

#### clear\_attributes(attributes)

Flags attributes to have their data value on the server deleted when [`Session.update()`](#GRANTA_MIScriptingToolkit.granta.mi.Session.update)
is next called. Does not delete the local value of flagged attributes, only the data on MI. Supersedes
previous [`set_attributes()`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.set_attributes) calls.

* **Parameters:**
  **attributes** – Union\[Iterable\[AttributeValue]]
* **Returns:**
  None

#### *property* viewer\_url

The MI Viewer URL for the record.

* **Returns:**
  str

#### *property* path

Browse tree path for the record as a list of folder short names.

* **Returns:**
  List\[str]

#### *property* pseudo\_attributes

Pseudo-attributes associated with the record, indexed by name.

#### NOTE

Supported names are:

* `recordType`
* `recordHistoryIdentity`
* `recordColor`
* `recordVersionNumber`
* `tableName`
* `writable`
* `parentShortName`
* `parentName`
* `parentRecordHistoryIdentity`
* `shortName`
* `modifiedDate`
* `createdDate`
* `releasedDate`
* `lastModifier`
* `creator`
* `subsets`
* `name`

#### WARNING

This property is deprecated. Pseudo-attribute values are available as properties:

* [`Record.type`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.type)
* [`Record.history_identity`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.history_identity)
* [`Record.color`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.color)
* [`Record.version_number`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.version_number)
* [`Record.table_name`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.table_name)
* [`Record.is_writable`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.is_writable)
* [`Record.parent_record_short_name`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.parent_record_short_name)
* [`Record.parent_record_name`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.parent_record_name)
* [`Record.parent_record_history_identity`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.parent_record_history_identity)
* [`Record.short_name`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.short_name)
* [`Record.last_modified_on`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.last_modified_on)
* [`Record.created_on`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.created_on)
* [`Record.released_on`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.released_on)
* [`Record.last_modified_by`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.last_modified_by)
* [`Record.created_by`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.created_by)
* [`Record.subsets`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.subsets)
* [`Record.name`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.name)

- **Returns:**
  Dict\[str, [`PseudoAttributeValue`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.PseudoAttributeValue)]

#### refresh\_path()

Re-calculates the record path within the current table.

Since all ancestor records are in all subsets that this record is in, this operation
performs no subset filtering.

Makes a Service Layer call.

* **Returns:**
  None

#### *property* exists\_on\_server

Whether the record exists on the server (True) or has been created in memory (False).

* **Returns:**
  bool

#### refresh\_properties()

Refreshes the Foundation API [`GRANTA_MIScriptingToolkit.TreeRecord`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.TreeRecord) object associated with the
[`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record), if it has one.
Makes a Service Layer call.

* **Returns:**
  None

#### refetch\_children(filter\_by\_subset=True, subset\_name=None)

Refreshes the list of children belonging to the record. If `filter_by_subset` is True then the
operation will only return records that are in the subset given in `subset_name`, if no value is
provided then the subset specified on the table will be used. If `filter_by_subset` is False
then records will be returned from all subsets. Makes a Service Layer call.

* **Parameters:**
  * **filter\_by\_subset** – bool
  * **subset\_name** – str
* **Returns:**
  None

#### WARNING

If you set `filter_by_subset` to True, you must provide a `subset_name` or ensure that the table
has only one subset applied. If more than one subset is applied, this will raise a ValueError.

#### refresh\_attributes()

Checks whether the record’s attributes have changed on the server, and updates the [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object if
required. Can also be used to populate attributes. Makes a Service Layer call.

Always includes binary data in the response. Use the [`bulk_fetch()`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.bulk_fetch) method if URL
data representation is required.

* **Returns:**
  None

#### refetch\_pseudos()

Fetches pseudo-attribute data for this record, and updates subsets for the record if not set.
Makes a Service Layer call.

* **Returns:**
  None

#### *property* attributes

Attributes associated with the record, indexed by attribute name.

* **Returns:**
  Dict\[str,
  [`AttributeValue`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeValue)]

#### get\_attributes(names=None, types=None, include\_attributes=True, include\_metas=False, include\_pseudos=False, empty=None)

Retrieve a list of attributes from the `record.attributes` dictionary. You can narrow the results by
specifying the attribute names or data types, or the required attribute categories (attribute,
meta-attribute, or pseudo-attribute).

If the `record.attributes` dictionary is empty when `get_attributes` is called, it will be
populated before retrieving any attributes.

This operation performs no subset filtering, so all tabular rows will be included in the response
regardless of the subset membership of the linked records.

* **Example:**
  `r.get_attributes(names=['Density', 'Stress-Strain'], types=['POIN', 'FUNC'], include_metas=True)`
  will return all point or functional series attributes or meta-attributes named Density or Stress-Strain
  from the record.
* **Parameters:**
  * **names** – List\[str]
  * **types** – List\[str] (Attribute data types; allowed values are: DISC, DTTM, FILE, FUNC, HLNK, INPT, LOGI,
    LTXT, PICT, POIN, RNGE, STXT, TABL)
  * **include\_attributes** – bool (whether to retrieve attributes that are not meta-attributes or
    pseudo-attributes; `True` by default)
  * **include\_metas** – bool (whether to retrieve meta-attributes; `False` by default)
  * **include\_pseudos** – bool (whether to retrieve pseudo-attributes; `False` by default)
  * **empty** – bool (whether to check if the returned attributes are populated)
* **Returns:**
  List\[Union\[[`PseudoAttributeValue`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.PseudoAttributeValue),
  [`AttributeValue`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeValue)]]

#### *property* type

Record type.

On record creation via the MI Scripting Toolkit, the record type can only be set to [`RecordType.Folder`](#GRANTA_MIScriptingToolkit.granta.mi_constants.RecordType.Folder) or
[`RecordType.Record`](#GRANTA_MIScriptingToolkit.granta.mi_constants.RecordType.Record). The type of an existing record cannot be set via this property.

Adding children to a record, or populating attributes on a folder both result in the type updating to
[`RecordType.Generic`](#GRANTA_MIScriptingToolkit.granta.mi_constants.RecordType.Generic) during the update.

* **Return type:**
  [RecordType](#GRANTA_MIScriptingToolkit.granta.mi_constants.RecordType)

#### all\_children(include\_folders=False, include\_generics=True, filter\_by\_subset=True, subset\_name=None)

Returns a flattened list of all descendants of a record and populates the [`children`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.children) property of
each [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object traversed in the process.

#### WARNING

This method is deprecated. Use [`get_descendants()`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.get_descendants).

#### get\_descendants(include\_folders=False, include\_generics=True, filter\_by\_subset=True, subset\_name=None)

Returns a flattened list of all descendants of a record and populates the [`children`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.children) property of
each [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object traversed in the process.

If `filter_by_subset` is True then the operation will only return records that are in the subset given in
`subset_name`, if no value is provided then the subset specified on the table will be used.
If `filter_by_subset` is False then records will be returned from all subsets. Makes a Service Layer call.

* **Parameters:**
  * **include\_folders** – bool
  * **include\_generics** – bool
  * **filter\_by\_subset** – bool
  * **subset\_name** – str
* **Returns:**
  List\[[`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]

#### WARNING

If you set `filter_by_subset` to True, you must either provide a `subset_name` or ensure that the table
has only one subset applied. If more than one subset is applied, this will raise a ValueError.

#### *property* children

Records that are direct children of the current record.

Records returned by this property may have been cached from previous calls to
[`Record.get_descendants()`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.get_descendants) (previously [`Record.all_children()`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.all_children)), [`Record.refetch_children()`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.refetch_children) or
[`Table.all_records()`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.all_records), which all apply subset filtering. If the [`Table`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table) subset configuration has
since been updated, refresh the list of children via one of the methods listed.

If there is no cached list of children, children are dynamically fetched on property access via
[`refetch_children()`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.refetch_children). The default subset filtering behavior is applied.

* **Returns:**
  List\[[`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]

#### WARNING

You must ensure that the table has only one subset applied. If more than one subset is
applied, this will raise a ValueError when dynamically retrieving children records.

#### *property* links

Link groups for this [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object, and the records they link to. Smart links may be viewed but not
edited through the `links` property.

This operation performs no subset filtering.

* **Returns:**
  Dict\[str, Set\[[`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]]

#### get\_associated\_records(target\_table, link\_direction='Both', attribute\_path=None)

Gets all records in a target table that are linked to the current [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object via tabular data
association chains. This can be filtered by link direction and to a specific path.

If `attribute_path` is provided, then only records from that exact path will be returned. Note that the
specified tabular attributes will be the ‘source’ of the tabular link, and there may be tables in the chain
with no attributes.

This operation performs no subset filtering.

* **Parameters:**
  * **target\_table** – [`Table`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table) object
  * **link\_direction** – str (Which direction to follow links in: `Both` (default), `Forward`, `Reverse`)
  * **attribute\_path** – List\[[`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition)] (Path of tabular attributes to follow - if `None`, all
    paths are followed)
* **Returns:**
  List\[[`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]

#### set\_links(link\_name, records)

Adds the specified records to the named record link group and flags those links for update. Links that are not
set through this method will not be updated on the server.

* **Parameters:**
  * **link\_name** – str
  * **records** – Iterable\[[`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]
* **Returns:**
  None

#### decache\_attributes()

Removes all attributes from the [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record), replacing the `attributes` property with an empty
dictionary.

* **Returns:**
  None

#### decache\_links()

Removes all links from the [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record), setting the `links` property to `None`.

* **Returns:**
  None

#### *property* is\_folder

Whether the record is a [`RecordType.Folder`](#GRANTA_MIScriptingToolkit.granta.mi_constants.RecordType.Folder) type.

* **Returns:**
  bool

#### *property* release\_state

Release state of the record. Allowed values are ‘Released’, ‘Superseded’, ‘Withdrawn’, ‘Unreleased’,
‘Unversioned’ or ‘Unknown’.

* **Returns:**
  str

#### *property* record\_history

Details about the record history. Includes user, datetime, and notes associated with events of the record’s
life cycle.

* **Returns:**
  [`RecordVersionHistory`](#GRANTA_MIScriptingToolkit.granta.mi_meta_classes.RecordVersionHistory)

#### refetch\_record\_release\_state()

Fetches the record’s release state from the server. Makes a Service Layer call.

* **Returns:**
  None

#### *property* all\_versions

Returns all versions or the record as dictionary of [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) objects indexed by version number, and the
letter ‘v’, e.g. ‘v1’ or ‘v2’. In a version controlled table this can be many, and in a non-version-controlled
table there will only ever be one, with the key ‘v0’.

* **Returns:**
  Dict\[str, [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]

#### refetch\_record\_versions()

Refetches version information and all visible versions of the record for this user.
Makes a Service Layer call.

* **Return None:**

#### delete\_or\_withdraw\_record\_on\_server(withdrawal\_notes=None)

Deletes the record from the server, or withdraws it from a version-controlled table. Makes a Service Layer call.

* **Parameters:**
  **withdrawal\_notes** – Optional\[str], withdrawal revision notes.
* **Returns:**
  None

#### get\_available\_exporters(package=None, model=None, applicability\_tag=None)

Returns exporters available for this record filtered by package, model, and applicability tag value.

* **Parameters:**
  * **package** – str (Name of target FEA analysis package, for example ‘NX 10.0’ or ‘CATIA V5’)
  * **model** – str (Material model type, for example ‘Isotropic’ or ‘Linear, temperature-independent,
    isotropic, thermal, plastic’)
  * **applicability\_tag** – str (Tag that identifies the MI applications an exporter is intended to be used with,
    for example, ‘MIMaterialsGateway’ or ‘MIViewer’)
* **Returns:**
  List\[[`Exporter`](#GRANTA_MIScriptingToolkit.granta.mi_exporters.Exporter)]

#### *property* data\_revision\_history

Data revision history for all attributes, indexed by attribute name.

* **Returns:**
  Dict\[str,
  [`DataRevisionHistory`](#GRANTA_MIScriptingToolkit.granta.mi_meta_classes.DataRevisionHistory)]

#### move\_to(new\_parent)

Moves the record and all its descendants to a new parent.

The provided new parent must be a [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) of type [`RecordType.Folder`](#GRANTA_MIScriptingToolkit.granta.mi_constants.RecordType.Folder) or
[`RecordType.Generic`](#GRANTA_MIScriptingToolkit.granta.mi_constants.RecordType.Generic), or a [`Table`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table) to move the record at the root of the table.

Some cached properties are cleared after the record has been moved, as they would be out-of-date:

* [`Record.pseudo_attributes`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.pseudo_attributes) and pseudo-attribute properties
* [`Record.path`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.path)
* [`Record.parent`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.parent)

They will be dynamically retrieved from the server on property access, or can be manually refreshed via the
following methods:

* [`Record.refetch_pseudos()`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.refetch_pseudos)
* [`Record.refresh_path()`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.refresh_path)
* [`Record.find_parent()`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.find_parent)
* [`Record.refresh_properties()`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.refresh_properties)

[`Record.children`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.children) is not cleared, because children are moved with the parent. Their internal state might
be outdated, and if necessary can be updated via the methods listed above.

`children` properties of the source and target parent are not cleared or updated. This is by design, to
prevent unnecessary updates in scripts performing a large number of record move operations.
To update the list of children of a table (after moving a child record from it or to it), use the method
[`Table.refetch_children()`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.refetch_children).
To update the list of children of a record (after moving a child record from it or to it), use the method
[`Record.refetch_children()`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.refetch_children).

* **Parameters:**
  **new\_parent** – [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) | [`Table`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table)
* **Returns:**
  None

#### copy\_to(destination, record\_name=None, release=False)

Creates a copy of the record at the provided location.

Returns a record object that represents the newly created record. The resulting record is added to the
same subsets as the original record, and contains identical attribute values.

#### WARNING

Data validation rules, such as attribute value uniqueness, might prevent record copying.

* **Parameters:**
  * **destination** ([*Record*](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) *or* [*Table*](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table)) – Location in the tree where to create the copy.
  * **record\_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *or* *None*) – Record name for the created record. By default, the copied record is created with the same
    name as the original record. If the destination already contains a record with an identical name, use this
    parameter to override the name.
  * **release** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) – Whether to release the created record, defaults to `False`. The argument has no effect for
    records in tables that are not version-controlled.
* **Return type:**
  [Record](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)

#### *property* version\_number

Record version number. This is set to None if the record is in a non version-controlled table.

Read-only property. This is only available for records that exist on the server.
This property is populated from a pseudo-attribute value and can be refreshed via [`refetch_pseudos()`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.refetch_pseudos).

* **Return type:**
  [int](https://docs.python.org/3/library/functions.html#int) | None

#### *property* is\_writable

Whether the current user has write permissions on the record.

Read-only property. This is only available for records that exist on the server.
This property is populated from a pseudo-attribute value and can be refreshed via [`refetch_pseudos()`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.refetch_pseudos).

* **Return type:**
  [bool](https://docs.python.org/3/library/functions.html#bool)

#### *property* parent\_record\_short\_name

Short name of the parent record.

If the record is at the root of the table, returns the name of the table.

Read-only property. This is only available for records that exist on the server.
This property is populated from a pseudo-attribute value and can be refreshed via [`refetch_pseudos()`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.refetch_pseudos).

* **Return type:**
  [str](https://docs.python.org/3/library/stdtypes.html#str)

#### *property* parent\_record\_name

Name of the parent record.

If the record is at the root of the table, returns the name of the table.

Read-only property. This is only available for records that exist on the server.
This property is populated from a pseudo-attribute value and can be refreshed via [`refetch_pseudos()`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.refetch_pseudos).

* **Return type:**
  [str](https://docs.python.org/3/library/stdtypes.html#str)

#### *property* parent\_record\_history\_identity

History identity of the parent record.

If the record is at the root of the table, returns the history identity of the table root node.

Read-only property. This is only available for records that exist on the server.
This property is populated from a pseudo-attribute value and can be refreshed via [`refetch_pseudos()`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.refetch_pseudos).

* **Return type:**
  [int](https://docs.python.org/3/library/functions.html#int)

#### *property* last\_modified\_on

Datetime of the last modification.

Read-only property. This is only available for records that exist on the server.
This property is populated from a pseudo-attribute value and can be refreshed via [`refetch_pseudos()`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.refetch_pseudos).

* **Return type:**
  [datetime.datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime)

#### *property* last\_modified\_by

User who last modified the record.

Read-only property. This is only available for records that exist on the server.
This property is populated from a pseudo-attribute value and can be refreshed via [`refetch_pseudos()`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.refetch_pseudos).

* **Return type:**
  [str](https://docs.python.org/3/library/stdtypes.html#str)

#### *property* created\_on

Datetime of the record creation.

Read-only property. This is only available for records that exist on the server.
This property is populated from a pseudo-attribute value and can be refreshed via [`refetch_pseudos()`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.refetch_pseudos).

* **Return type:**
  [datetime.datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime)

#### *property* created\_by

User who created the record.

Read-only property. This is only available for records that exist on the server.
This property is populated from a pseudo-attribute value and can be refreshed via [`refetch_pseudos()`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.refetch_pseudos).

* **Return type:**
  [str](https://docs.python.org/3/library/stdtypes.html#str)

#### *property* released\_on

Datetime of the record release.

Read-only property. This is only available for records that exist on the server.
This property is populated from a pseudo-attribute value and can be refreshed via [`refetch_pseudos()`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.refetch_pseudos).

* **Return type:**
  [datetime.datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime)

## Attribute level

There are two types of attribute object at the attribute level: [Attribute Definitions](#attribute-defs) and [Attribute Values](#attribute-vals).

### Attribute Definitions

These classes describe how an attribute appears in the schema of a given table. There are two base types:

> * [PseudoAttributeDefinition](#pseudo-attribute-def) - Class for pseudo-attributes. Operates like [AttributeDefinition](#attribute-def) but is not a child of it.
> * [AttributeDefinition](#attribute-def) - Base class and parent of all AttributeDefinition classes.

The AttributeDefinition class hierarchy is as follows:

> * [AttributeDefinition](#attribute-def) (no objects are direct instances of this type)
>   * [AttributeDefinitionDatetime](#attribute-def-datetime)
>   * [AttributeDefinitionDiscrete](#attribute-def-discrete)
>   * [AttributeDefinitionFile](#attribute-def-file)
>   * [AttributeDefinitionHyperlink](#attribute-def-hyperlink)
>   * [AttributeDefinitionInteger](#attribute-def-integer)
>   * [AttributeDefinitionLogical](#attribute-def-logical)
>   * [AttributeDefinitionLongText](#attribute-def-long-text)
>   * [AttributeDefinitionPicture](#attribute-def-picture)
>   * [AttributeDefinitionRange](#attribute-def-range)
>   * [AttributeDefinitionShortText](#attribute-def-short-text)
>   * [AttributeDefinitionTabular](#attribute-def-tabular)
>   * [AttributeDefinitionMultiValue](#attribute-def-multi-valued) (no objects are direct instances of this type)
>     * [AttributeDefinitionFloatFunctional](#attribute-def-float-functional)
>     * [AttributeDefinitionPoint](#attribute-def-point)
>   * [AttributeDefinitionUnsupported](#attribute-def-unsupported) (no objects are direct instances of this type)
>     * [AttributeDefinitionDiscreteFunctional](#attribute-def-discrete-functional)

#### PseudoAttributeDefinition

### *class* PseudoAttributeDefinition(name)

#### \_\_init\_\_(name)

Stores basic information about a pseudo-attribute.

#### NOTE

Supported names are:

* `recordType`
* `recordHistoryIdentity`
* `recordColor`
* `recordVersionNumber`
* `tableName`
* `writable`
* `parentShortName`
* `parentName`
* `parentRecordHistoryIdentity`
* `shortName`
* `modifiedDate`
* `createdDate`
* `releasedDate`
* `lastModifier`
* `creator`
* `subsets`
* `name`

- **Parameters:**
  **name** – str
- **Returns:**
  None

#### *property* id

Attribute identifier (this is always 0 for pseudo-attributes).

* **Returns:**
  int

#### *property* read\_only

Whether the current user has the correct permissions to edit the attribute.

* **Returns:**
  bool

#### *property* unit

Unit symbol for the pseudo-attribute.

* **Returns:**
  str

#### *property* name

Name of the pseudo-attribute.

* **Returns:**
  str

#### *property* type

Data type of the pseudo-attribute (four-character string).

* **Returns:**
  str

#### AttributeDefinition

### *class* AttributeDefinition

Base attribute definition class.

#### NOTE

Do not create new instances of this class or its subclasses; it represents a pre-existing database
structure.

Stores basic information about an attribute, such as data type or possible values. Contains information about
the attribute itself, and cannot be used to set attribute values.

#### *property* table

Parent [`Table`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table) the attribute belongs to.

* **Returns:**
  [`Table`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table) object

#### *property* id

Attribute identifier.

* **Returns:**
  int

#### *property* axis\_name

Y-axis name (for functional data attributes only).

* **Returns:**
  str

#### *property* name

Attribute name.

* **Returns:**
  str

#### *property* order

Display order in MI Viewer.

* **Returns:**
  int

#### *property* is\_meta

Whether the attribute is a meta-attribute or not.

* **Returns:**
  bool

#### *property* is\_meta\_for

Name of the parent attribute, if the attribute is a meta-attribute. Returns `None` if not a meta-attribute.

* **Returns:**
  str or None

#### *property* type

Attribute data type, as a four-character string. Possible attribute types are:

POIN = point,

RNGE = range,

FUNC = float functional,

INPT = integer,

LOGI = logical,

DISC = discrete,

STXT = short text,

LTXT = long text,

DTTM = date time,

HLNK = hyperlink,

PICT = picture,

FILE = file,

DSFN = discrete functional,

MAFN = maths functional (equations and logic),

TABL = tabular.

DSFN attributes are not fully supported by the MI Scripting Toolkit. Definitions can be obtained but attribute
values are exported as `UNSUPPORTED DATA TYPE` and contain no data.
MAFN attribute definitions cannot be obtained via the MI Scripting Toolkit.

* **Returns:**
  str

#### *property* unit

Unit symbol.

* **Returns:**
  str

#### *property* meta\_attributes

Meta-attributes associated with this attribute, indexed by name.

* **Returns:**
  Dict\[str, [`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition)]

#### search\_criterion(less\_than=None, greater\_than=None, contains=None, contains\_any=None, contains\_all=None, does\_not\_contain=None, exists=None, equal\_to=None, between\_dates=None, in\_column=None)

Creates a search criterion for use with [`Table.search_for_records_where()`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.search_for_records_where) or
[`Database.search_for_records_where()`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Database.search_for_records_where).
Operator priority is the same as the order of the arguments.

* **Parameters:**
  * **less\_than** – float
  * **greater\_than** – float
  * **contains** – Union\[str, bool]
  * **contains\_any** – List\[str]
  * **contains\_all** – List\[str]
  * **does\_not\_contain** – str
  * **exists** – bool
  * **equal\_to** – Union\[int, str]
  * **between\_dates** – Union\[str, datetime.datetime] (Two dates in chronological order, str must be
    in YYYY-MM-DD format)
  * **in\_column** – str (Name of tabular column to search)
* **Returns:**
  [`SearchCriterion`](#GRANTA_MIScriptingToolkit.granta.mi_meta_classes.SearchCriterion) object

#### NOTE

To perform an exact search on a discrete attribute, use either the `contains_any` or
`contains_all` parameters. In the case of searching for a single discrete value, the argument
should be a list containing the search term.

#### *property* history

Revision history of the attribute, as an [`ObjectHistory`](#GRANTA_MIScriptingToolkit.granta.mi_meta_classes.ObjectHistory) object.

* **Returns:**
  [`ObjectHistory`](#GRANTA_MIScriptingToolkit.granta.mi_meta_classes.ObjectHistory) object

#### AttributeDefinitionDatetime

### *class* AttributeDefinitionDatetime

Extended [`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) class for date-time attributes.

Provides properties to view the table-wide minimum and maximum values for this attribute.

#### *property* max

Maximum value of the data attribute. Affected by user read permissions.

* **Returns:**
  Optional\[Union\[float, int, datetime.datetime]]

#### *property* min

Minimum value of the data attribute. Affected by user read permissions.

* **Returns:**
  Optional\[Union\[float, int, datetime.datetime]]

#### AttributeDefinitionDiscrete

### *class* AttributeDefinitionDiscrete

Extended [`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) class for discrete attributes.

Provides a method to view the possible discrete values of an attribute.

#### *property* discrete\_values

All possible discrete values of the attribute.

* **Returns:**
  List\[str]

#### *property* is\_multivalued

Whether this attribute allows multiple values to be set.

* **Returns:**
  bool

#### AttributeDefinitionFile

### *class* AttributeDefinitionFile

Extended [`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) class for file attributes.

#### AttributeDefinitionHyperlink

### *class* AttributeDefinitionHyperlink

Extended [`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) class for hyperlink attributes.

#### AttributeDefinitionInteger

### *class* AttributeDefinitionInteger

Extended [`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) class for integer attributes.

Provides properties to view the table-wide minimum and maximum values for this attribute.

#### *property* max

Maximum value of the data attribute. Affected by user read permissions.

* **Returns:**
  Optional\[Union\[float, int, datetime.datetime]]

#### *property* min

Minimum value of the data attribute. Affected by user read permissions.

* **Returns:**
  Optional\[Union\[float, int, datetime.datetime]]

#### AttributeDefinitionLogical

### *class* AttributeDefinitionLogical

Extended [`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) class for logical attributes.

#### AttributeDefinitionLongText

### *class* AttributeDefinitionLongText

Extended [`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) class for long text attributes.

#### AttributeDefinitionPicture

### *class* AttributeDefinitionPicture

Extended [`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) class for picture attributes.

#### AttributeDefinitionRange

### *class* AttributeDefinitionRange

Extended [`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) class for range attributes.

Provides access to range-specific information and methods.

#### *property* database\_unit

The database unit for this attribute.

* **Returns:**
  str

#### *property* max

Maximum value of the data attribute. Affected by user read permissions.

* **Returns:**
  Optional\[Union\[float, int, datetime.datetime]]

#### *property* min

Minimum value of the data attribute. Affected by user read permissions.

* **Returns:**
  Optional\[Union\[float, int, datetime.datetime]]

#### *property* unit

Unit symbol.

* **Returns:**
  str

#### AttributeDefinitionShortText

### *class* AttributeDefinitionShortText

Extended [`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) class for short text attributes.

#### AttributeDefinitionTabular

### *class* AttributeDefinitionTabular

Extended [`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) class for tabular data attributes.

Provides access to tabular-specific information and methods, such as columns, linking attribute and
cross-table links.

#### *property* linking\_attribute

Linking attribute, a short text-type attribute used to link rows in the tabular data attribute to records.
Returns `None` for purely local tabular data or if the user cannot access the table in Granta MI.

* **Returns:**
  [`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) object or None

#### *property* linking\_table

[`Table`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table) object which the linking attribute belongs to. Returns `None` for purely local tabular data
or if the user cannot access the table in Granta MI.

* **Returns:**
  [`Table`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table) object or None

#### *property* column\_types

Data type in each column. Only populated for local tabular columns. The element will be an empty string
otherwise.

* **Example:**
  `['STXT', 'POIN', 'DISC', '', '']`
* **Returns:**
  List\[str]

#### *property* column\_histories

The revision histories of each column, as an ordered list of [`ObjectHistory`](#GRANTA_MIScriptingToolkit.granta.mi_meta_classes.ObjectHistory) objects.

The object history of unavailable columns is `None`. See [`column_targets`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinitionTabular.column_targets).

* **Returns:**
  List\[Optional\[[`ObjectHistory`](#GRANTA_MIScriptingToolkit.granta.mi_meta_classes.ObjectHistory)]]

#### *property* column\_units

Unit symbols for each column.

* **Returns:**
  List\[str]

#### *property* column\_database\_units

Database unit symbols for each column.

* **Returns:**
  List\[str]

#### *property* discrete\_values

All possible discrete values, for all columns with the discrete data type.

* **Returns:**
  List\[List\[str]]

#### *property* column\_targets

Column meta-types. Possible column targets are:

`Local` - Contains local data

`TargetAttribute` - Contains data from a linked attribute

`TargetRecord` - Contains the records that the rows link to

`TargetTabularColumn` - Contains data from a linked tabular column

`Unavailable` - Data cannot be viewed, usually due to version control or permissions

* **Returns:**
  List\[str]

#### *property* columns

Column names (headers).

* **Returns:**
  List\[str]

#### *property* columns\_to\_process

Columns to be included when populating an AttributeTabular object. Defaults to all
columns, which will fully populate the AttributeTabular object. Columns that aren’t processed contain the
value `<Ignored>`. Tabular attributes with `<Ignored>` columns can be imported back into Granta MI with no
loss of data (additional conditions exist for Picture and File columns, see Warning below).

Ignoring columns that aren’t required by the script can significantly improve performance for operations with
large amounts of tabular data.

#### NOTE

This property must be set on the AttributeDefinitionTabular object associated with the Table
object *before* data export for the setting to have an effect.

#### WARNING

If the intention is to export, modify, and update tabular data, and [`Table.bulk_fetch()`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.bulk_fetch) is
being used for the initial export of data, it is recommended to call [`Table.bulk_fetch()`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.bulk_fetch) with
`include_binary_data = True`.

If [`Table.bulk_fetch()`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.bulk_fetch) is called with `include_binary_data = False`, Picture and File columns **must
not** be removed from the `columns_to_process` list or an exception will be raised when attempting to
re-import the tabular attribute.

It is possible to call [`Table.bulk_fetch()`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.bulk_fetch) with `include_binary_data = False` as long as all Picture
and File columns are set to be processed, but this will have a performance impact. See the
[`Table.bulk_fetch()`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.bulk_fetch) documentation for more details.

* **Returns:**
  List\[str]

#### *property* ignore\_linked\_records

Whether to ignore linked records when creating Record objects. Defaults to `False`.
Even when set to `True`, linking values are still available if populated.

Ignoring linked records if they aren’t required can significantly improve performance for operations with large
amounts of tabular data.

#### NOTE

This property must be set on the AttributeDefinitionTabular object associated with the Table
object *before* data export for the setting to have an effect.

* **Returns:**
  bool

#### AttributeDefinitionMultiValue

### *class* AttributeDefinitionMultiValue

Extended [`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) class for functional and point data attributes.

Provides access to functional data parameters.

#### *property* parameters

Parameters associated with the attribute, indexed by name.

* **Returns:**
  Dict\[str, [`AttributeParameter`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeParameter)]

#### *property* database\_unit

The database unit for this attribute.

* **Returns:**
  str

#### AttributeDefinitionFloatFunctional

### *class* AttributeDefinitionFloatFunctional

Extended [`AttributeDefinitionMultiValue`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinitionMultiValue) class for float functional attributes.

#### *property* database\_unit

The database unit for this attribute.

* **Returns:**
  str

#### *property* parameters

Parameters associated with the attribute, indexed by name.

* **Returns:**
  Dict\[str, [`AttributeParameter`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeParameter)]

#### AttributeDefinitionPoint

### *class* AttributeDefinitionPoint

Extended [`AttributeDefinitionMultiValue`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinitionMultiValue) class for point attributes.

Provides access to point-specific information and methods.

#### *property* is\_multivalued

Whether this attribute allows multiple values to be set.

* **Returns:**
  bool

#### *property* database\_unit

The database unit for this attribute.

* **Returns:**
  str

#### *property* max

Maximum value of the data attribute. Affected by user read permissions.

* **Returns:**
  Optional\[Union\[float, int, datetime.datetime]]

#### *property* min

Minimum value of the data attribute. Affected by user read permissions.

* **Returns:**
  Optional\[Union\[float, int, datetime.datetime]]

#### *property* parameters

Parameters associated with the attribute, indexed by name.

* **Returns:**
  Dict\[str, [`AttributeParameter`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeParameter)]

#### *property* unit

Unit symbol.

* **Returns:**
  str

#### AttributeDefinitionUnsupported

### *class* AttributeDefinitionUnsupported

Extended [`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) class for unsupported attribute types (discrete functional).

Provides access to the limited information available for unsupported attribute types (name, type and unit, if
present).

#### AttributeDefinitionDiscreteFunctional

### *class* AttributeDefinitionDiscreteFunctional

Extended [`AttributeDefinitionUnsupported`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinitionUnsupported) class for discrete functional attributes.

Provides access to the limited information available (name, type and unit, if present).”

### Attribute Values

These classes are attribute objects that contain data. There is (at least) one for each type.

> * [AttributeValue](#attribute-val) - Base class for all attributes
> * [AttributeBinary](#attribute-val-bin) - Parent class for the binary attributes, [AttributePicture](#attribute-val-pic) and [AttributeFile](#attribute-val-file)
>   * [AttributePicture](#attribute-val-pic) - Attribute value class covering picture data
>   * [AttributeFile](#attribute-val-file) - Attribute value class covering file data
> * [AttributeDate](#attribute-val-dttm) - Attribute value class covering datetime data
> * [AttributeDiscrete](#attribute-val-disc) - Attribute value class covering discrete data
> * [AttributeFunctional](#attribute-val-func) - Attribute value class covering functional data. This is subclassed by [FunctionalSeries](#attribute-val-series) and [FunctionalGrid](#attribute-val-grid).
>   * [FunctionalSeries](#attribute-val-series) - Attribute value class covering float functional series data
>   * [FunctionalGrid](#attribute-val-grid) - Attribute value class covering float functional gridded data
> * [AttributeHyperlink](#attribute-val-hlnk) - Attribute value class covering hyperlink data
> * [AttributeInteger](#attribute-val-int) - Attribute value class covering integer data
> * [AttributeLogical](#attribute-val-logi) - Attribute value class covering logical data
> * [AttributePoint](#attribute-val-poin) - Attribute value class covering point with parameter data
> * [AttributeRange](#attribute-val-rnge) - Attribute value class covering range data
> * [AttributeTabular](#attribute-val-tabl) - Attribute value class covering tabular data
> * [AttributeShortText](#attribute-val-short-text) - Attribute value class covering short text data
> * [AttributeLongText](#attribute-val-long-text) - Attribute value class covering long text data
> * [AttributeUnsupported](#attribute-val-unsup) - Attribute value class covering unsupported data
> * [PseudoAttributeValue](#pseudo-attribute-val) - Pseudo-attribute value class covering all pseudo-attribute types

#### AttributeValue

### *class* AttributeValue(attr\_def, \_gdl\_av, \_mi, record, metas=None)

Stores and provides access to attribute data values.

#### NOTE

Do not create new instances of this class; it represents a pre-existing database structure,
and empty instances are provided when needed.

The attributes in a [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) are represented in the MI Scripting Toolkit by
[`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) objects,
with an associated [`AttributeValue`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeValue) object containing the attribute’s data.
[`AttributeValue`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeValue) is the base class, and each attribute type has a specialised class that inherits from it.

#### NOTE

The ‘Notes’ meta-attribute, common to all attributes, is not accessible through the MI Scripting Toolkit.

#### \_\_init\_\_(attr\_def, \_gdl\_av, \_mi, record, metas=None)

* **Parameters:**
  * **attr\_def** – [`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) object
  * **\_gdl\_av** – Foundation API [`GRANTA_MIScriptingToolkit.AttributeValue`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.AttributeValue) class for this attribute
  * **\_mi** – [`Session`](#GRANTA_MIScriptingToolkit.granta.mi.Session) object
  * **record** – Parent [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object
  * **metas** – List\[[`GRANTA_MIScriptingToolkit.AttributeValue`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.AttributeValue)]
    (Foundation API [`GRANTA_MIScriptingToolkit.AttributeValue`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.AttributeValue) classes for each meta-attribute of this
    attribute)
* **Returns:**
  None

#### *property* value

Current value of the attribute. Can be modified.

* **Returns:**
  Union\[List\[str], List\[float], str, Dict\[str, float], int, float, bool, bytes]

#### *property* record

[`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) in which the attribute value is defined. Would be None
if the [`AttributeValue`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeValue) has been created outside a Record context, e.g.
with [`Table.create_empty_attribute_value`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.create_empty_attribute_value).

* **Returns:**
  [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object or None

#### is\_empty()

Checks whether the attribute value is populated.

* **Returns:**
  bool

#### *property* definition

[`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) associated with this [`AttributeValue`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeValue).

* **Returns:**
  [`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) object

#### *property* id

Attribute identifier.

* **Returns:**
  int

#### *property* is\_meta

Whether the attribute is a meta-attribute.

* **Returns:**
  bool

#### *property* is\_meta\_for

Name of the parent attribute, if a meta-attribute. Returns `None` if not.

* **Returns:**
  str or None

#### *property* meta\_attributes

Meta-attributes associated with this attribute. Does not make calls to the Service Layer.

* **Returns:**
  Dict\[str, [`AttributeValue`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeValue)]

#### *property* name

Attribute name.

* **Returns:**
  str

#### *property* type

Attribute data type, as a four-character string. Possible attribute types are:

POIN = point,

RNGE = range,

FUNC = float functional,

INPT = integer,

LOGI = logical,

DISC = discrete,

STXT = short text,

LTXT = long text,

DTTM = date time,

HLNK = hyperlink,

PICT = picture,

FILE = file,

DSFN = discrete functional,

MAFN = maths functional (equations and logic),

TABL = tabular.

DSFN and MAFN are not supported by the MI Scripting Toolkit, and appear as UNSUPPORTED DATA TYPE.

* **Returns:**
  str

#### *property* unit

Unit symbol.

* **Returns:**
  str

#### *property* is\_applicable

Whether the attribute is applicable to the current record. Setting this to `False` will clear
any data values on the attribute.

* **Returns:**
  bool

#### AttributeBinary

### *class* AttributeBinary(attr\_def, \_gdl\_av, \_mi, record, metas=None, path=None, content\_type=None)

Extended [`AttributeValue`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeValue) class to handle [`BinaryType`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.BinaryType) objects
as attribute data values.

Provides access to [`BinaryType`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.BinaryType) object methods and properties.

#### \_\_init\_\_(attr\_def, \_gdl\_av, \_mi, record, metas=None, path=None, content\_type=None)

* **Parameters:**
  * **attr\_def** – [`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) object
  * **\_gdl\_av** – Foundation API [`GRANTA_MIScriptingToolkit.AttributeValue`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.AttributeValue) class for this attribute
  * **\_mi** – [`Session`](#GRANTA_MIScriptingToolkit.granta.mi.Session) object
  * **record** – Parent [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object
  * **metas** – List\[[`GRANTA_MIScriptingToolkit.AttributeValue`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.AttributeValue)] (Foundation API
    [`GRANTA_MIScriptingToolkit.AttributeValue`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.AttributeValue) class for each meta-attribute of this attribute)
  * **path** – str (Path to the file associated with the attribute)
  * **content\_type** – str (MIME content/file type; see [`BinaryType`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.BinaryType))
* **Returns:**
  None

#### *property* url

URL of the hosted file. Returns `None` if not populated.

The data can be retrieved by using a Python HTTP library (e.g. Requests, HTTPX) and by supplying the
appropriate authentication for your Granta MI server.

To populate this property, the [`Table.bulk_fetch()`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.bulk_fetch) method must be used with
`include_binary_data = False` (default). If `include_binary_data = True` is specified, or if the attribute
is fetched on-demand by accessing the `attributes` dictionary without performing a bulk fetch, this property
will always return `None`.

* **Returns:**
  str or None

#### *property* mime\_file\_type

MIME (Multipurpose Internet Mail Extensions) file type, if populated.

When exporting, this property is populated with the value of the MIME file type as determined by Granta MI.

When importing, this property is populated automatically by the `load()` method:

* For Picture attributes, the MIME file type is determined by the image data.
* For File attributes, this property is not used and is set to `None`.

Some commonly-used extensions are:

image/png - .png

image/gif - .gif

image/bmp - .bmp

image/tiff - .tif, .tiff

text/plain - .txt

application/zip - .zip

application/pdf - .pdf

application/vnd.ms-excel - .xls

application/vnd.openxmlformats-officedocument.spreadsheetml.sheet - .xlsx

application/vnd.ms-powerpoint - .ppt

application/vnd.openxmlformats-officedocument.presentationml.presentation - .pptx

application/msword - .doc

application/vnd.openxmlformats-officedocument.wordprocessingml.document - .docx

* **Returns:**
  str

#### is\_empty()

Checks if the [`BinaryType`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.BinaryType) object is populated by checking if it contains any binary data.

* **Returns:**
  bool

#### *property* value

Returns the file as a bytes object, or None if unset.

* **Returns:**
  bytes or None.

#### AttributePicture

### *class* AttributePicture(attr\_def, \_gdl\_av, \_mi, record, metas=None)

Extended [`AttributeBinary`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeBinary) class for handling [`Picture`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.Picture) objects.

Provides access to [`Picture`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.Picture) save/load methods.

#### \_\_init\_\_(attr\_def, \_gdl\_av, \_mi, record, metas=None)

* **Parameters:**
  * **attr\_def** – [`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) object
  * **\_gdl\_av** – Foundation API [`GRANTA_MIScriptingToolkit.AttributeValue`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.AttributeValue) class for this attribute
  * **\_mi** – [`Session`](#GRANTA_MIScriptingToolkit.granta.mi.Session) object
  * **record** – Parent [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object
  * **metas** – List\[[`GRANTA_MIScriptingToolkit.AttributeValue`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.AttributeValue)] (Foundation API
    [`GRANTA_MIScriptingToolkit.AttributeValue`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.AttributeValue) class for each meta-attribute of this attribute)
* **Returns:**
  None

#### save(path)

Wraps the [`Picture.save()`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.Picture.save) method.

* **Parameters:**
  **path** (*Union* *\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* [*pathlib.Path*](https://docs.python.org/3/library/pathlib.html#pathlib.Path) *]*) – Path where the image should be saved.
  Takes the form `C:\\Users\\yourname\\Pictures\\image.jpg` or `/home/username/Pictures/image.jpg`.
* **Returns:**
  None

#### load(path)

Wraps the [`Picture.load()`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.Picture.load) method (populates the [`Picture`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.Picture) object with the specified image file).

* **Parameters:**
  **path** (*Union* *\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* [*pathlib.Path*](https://docs.python.org/3/library/pathlib.html#pathlib.Path) *]*) – Path to the image file to load.
  Takes the form `C:\\Users\\yourname\\Pictures\\image.jpg` or `/home/username/Pictures/image.jpg`.
* **Returns:**
  None

#### AttributeFile

### *class* AttributeFile(attr\_def, \_gdl\_av, \_mi, record, metas=None)

Extended [`AttributeBinary`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeBinary) class to handle [`File`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.File) objects.

Provides access to [`File`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.File) object save/load methods, file name, and description.

#### \_\_init\_\_(attr\_def, \_gdl\_av, \_mi, record, metas=None)

* **Parameters:**
  * **attr\_def** – [`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) object
  * **\_gdl\_av** – Foundation API [`GRANTA_MIScriptingToolkit.AttributeValue`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.AttributeValue) class for this attribute
  * **\_mi** – [`Session`](#GRANTA_MIScriptingToolkit.granta.mi.Session) object
  * **record** – Parent [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object
  * **metas** – List\[[`GRANTA_MIScriptingToolkit.AttributeValue`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.AttributeValue)] (Foundation API
    [`GRANTA_MIScriptingToolkit.AttributeValue`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.AttributeValue) class for each meta-attribute of this attribute)
* **Returns:**
  None

#### save(path)

Wraps the [`File.save()`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.File.save) method.

* **Parameters:**
  **path** (*Union* *\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* [*pathlib.Path*](https://docs.python.org/3/library/pathlib.html#pathlib.Path) *]*) – Path where the file should be saved.
  Takes the form `C:\\Users\\yourname\\Documents\\file.pdf` or `/home/username/Documents/file.pdf`.
* **Returns:**
  None

#### load(path)

Wraps the [`File.load()`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.File.load) method (populates the [`File`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.File) object with the specified file).

* **Parameters:**
  **path** – Union\[str, pathlib.Path] (Path to the file to be imported.
  Takes the form `C:\\Users\\yourname\\Documents\\file.pdf` or `/home/username/Documents/file.pdf`.
* **Returns:**
  None

#### *property* file\_name

Name of the file associated with the [`File`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.File) object. Displayed in MI applications.

* **Returns:**
  str

#### *property* description

Description of the file displayed in MI applications.

* **Returns:**
  str

#### AttributeDate

### *class* AttributeDate(attr\_def, \_gdl\_av, \_mi, record, metas=None)

Extended [`AttributeValue`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeValue) class for date attributes.

#### \_\_init\_\_(attr\_def, \_gdl\_av, \_mi, record, metas=None)

* **Parameters:**
  * **attr\_def** – [`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) object
  * **\_gdl\_av** – Foundation API [`GRANTA_MIScriptingToolkit.AttributeValue`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.AttributeValue) class for this attribute
  * **\_mi** – [`Session`](#GRANTA_MIScriptingToolkit.granta.mi.Session) object
  * **record** – Parent [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object
  * **metas** – List\[[`GRANTA_MIScriptingToolkit.AttributeValue`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.AttributeValue)] (Foundation API
    [`GRANTA_MIScriptingToolkit.AttributeValue`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.AttributeValue) class for each meta-attribute of this attribute)
* **Returns:**
  None

#### *property* value\_as\_string

Return the value of the date attribute as a string.

* **Returns:**
  str | None

#### *property* value

Return the value of the date attribute as a [`datetime.datetime`](https://docs.python.org/3/library/datetime.html#datetime.datetime) object.

* **Returns:**
  [`datetime.datetime`](https://docs.python.org/3/library/datetime.html#datetime.datetime) object | None

#### AttributeDiscrete

### *class* AttributeDiscrete(attr\_def, \_gdl\_av, \_mi, record, metas=None)

Extended [`AttributeValue`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeValue) class for discrete attributes.

Provides access to the list of strings that store the attribute’s data values, and their display order.

#### \_\_init\_\_(attr\_def, \_gdl\_av, \_mi, record, metas=None)

* **Parameters:**
  * **attr\_def** – [`AttributeDefinitionDiscrete`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinitionDiscrete) object
  * **\_gdl\_av** – Foundation API [`GRANTA_MIScriptingToolkit.AttributeValue`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.AttributeValue) class for this attribute
  * **\_mi** – [`Session`](#GRANTA_MIScriptingToolkit.granta.mi.Session) object
  * **record** – Parent [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object
  * **metas** – List\[[`GRANTA_MIScriptingToolkit.AttributeValue`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.AttributeValue)] (Foundation API
    [`GRANTA_MIScriptingToolkit.AttributeValue`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.AttributeValue) class for each meta-attribute of this attribute)
* **Returns:**
  None

#### *property* value

Discrete value(s) associated with this attribute.

* **Returns:**
  List\[str] or str if not multivalued

#### *property* order

Display order of the discrete data values (strings) in MI Viewer. Order cannot be edited using the MI
Scripting Toolkit.

* **Returns:**
  List\[int]

#### *property* is\_multivalued

Whether this attribute allows multiple values to be set.

* **Returns:**
  bool

#### *property* possible\_discrete\_values

List of the attribute’s possible discrete data values.

* **Returns:**
  List\[str]

#### AttributeFunctional

### *class* AttributeFunctional(attr\_def, \_gdl\_av, \_mi, record, metas=None)

Extended [`AttributeValue`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeValue) class for functional data attributes.

Stores and provides access to a data structure, parameters (constraints), specified x-axis, and individual
columns and series within the functional data attribute. Series and Gridded data are stored identically in
[`AttributeFunctional`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeFunctional) objects. However, the two data types are imported into MI differently.

The [`AttributeFunctional`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeFunctional) object data structure is as follows:

```python theme={null}
[[ 'y min', 'y max', 'constraint 1', 'constraint 2', 'Estimated point?'],
 [  0.0,      0.0,      'Test',         0.5,       ,      False,       ],
 [   . ,       . ,         .  ,          . ,       ,        .  ,       ],
 [   . ,       . ,         .  ,          . ,       ,        .  ,       ],
 [   . ,       . ,         .  ,          . ,       ,        .  ,       ]]
```

The allowed data types are `float` for x-y data, `float`, `str` or `None` for constraints, and `bool` for
flagging whether the data point is estimated or not.

The functional data type is used to store graphical data in Granta MI. In MI Viewer there are two ways to
view the data: *Series* and *Gridded*.

* Series data is grouped according to constraints or parameters placed on x-y data. The x-axis is a
  constraint that is specified on import. Each group (‘Series’) can have a different linestyle.
* Gridded data is similar to Series data, except that the x-axis is dynamically chosen within MI Viewer, and
  all data groups share one linestyle.

#### \_\_init\_\_(attr\_def, \_gdl\_av, \_mi, record, metas=None)

* **Parameters:**
  * **attr\_def** – [`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) object
  * **\_gdl\_av** – Foundation API [`GRANTA_MIScriptingToolkit.AttributeValue`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.AttributeValue) class for this attribute
  * **\_mi** – [`Session`](#GRANTA_MIScriptingToolkit.granta.mi.Session) object
  * **record** – Parent [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object
  * **metas** – List\[[`GRANTA_MIScriptingToolkit.AttributeValue`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.AttributeValue)] (Foundation API
    [`GRANTA_MIScriptingToolkit.AttributeValue`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.AttributeValue) class for each meta-attribute of this attribute)
* **Returns:**
  None

#### update\_header\_units()

Updates the unit symbols in the header with the currently selected units.

* **Returns:**
  None

#### *property* unit

Unit symbol for the y-axis.

To access the unit for the x-axis parameter or constraint parameters, use the `unit` property on the object
returned by the [`xaxis_parameter`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeFunctional.xaxis_parameter) or [`ParameterDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.ParameterDefinition) respectively.

* **Returns:**
  str

#### clear()

Deletes all data stored in the [`AttributeFunctional`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeFunctional) object.

* **Returns:**
  None

#### is\_empty()

Checks whether any of the data values in the attribute are populated.

* **Returns:**
  bool

#### add\_point(columns)

Adds a point value to the [`AttributeFunctional`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeFunctional) object. Requires a dictionary with keys for the y-value,
each constraint, and whether the value is estimated (optional):

* Dictionary keys for the y-value can be either ‘y’, ‘Y’, the attribute name, or the attribute name prefixed
  with ‘Y ‘ and suffixed with the unit symbol in square brackets, i.e. formatted as in [`column_headers`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeFunctional.column_headers).
* Constraint keys can be either the parameter name, or the parameter name with units.
* Constraints are optional and can either be omitted entirely or set to None.
* The key for whether the value is estimated must be ‘Estimated?’.

#### NOTE

The Estimated? flag can currently only be set for *Gridded* data, not *Series*.

* **Parameters:**
  **columns** – Dict\[str, Union\[str, float, bool, int]]
* **Returns:**
  None

#### add\_range(columns)

Adds a range value to the [`AttributeFunctional`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeFunctional) object. Requires a dictionary with keys for the two
y-values (ymin and ymax), each constraint, and whether the value is estimated (optional).

* Dictionary keys for the y-value can be either ‘ymin’, ‘ymax’, or the attribute name with units and
  ‘Y min’ or ‘Y max’ appended.
* Constraint keys can either be the parameter name, or the parameter name with units.
* Constraints are optional and can either be omitted entirely or set to None.
* The key for whether the value is estimated must be ‘Estimated?’.

#### NOTE

The Estimated? flag can currently only be set for *Gridded* data, not *Series*.

* **Parameters:**
  **columns** – dict
* **Returns:**
  None

#### *property* xaxis\_parameter

[`AttributeParameter`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeParameter) for the current x-axis parameter of the functional data attribute.

Modify the [`ParameterDefinition.unit`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.ParameterDefinition.unit) property on the returned object to specify a different unit for
import.

* **Returns:**
  [`AttributeParameter`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeParameter) object

#### *property* column\_headers

Column headers with units.

* **Returns:**
  List\[str]

#### *property* constraint\_column\_index

Mapping of columns to indices for functional data attributes.

* **Returns:**
  Dict\[str, int]

#### data\_by\_column()

Sorts data into columns (lists of values indexed by column name). Changing a dictionary generated
using this method does not affect the underlying data, and data in the dictionary will not be
refreshed automatically if the underlying data changes.

* **Returns:**
  Dict\[str, List\[Any]]

#### *property* parameters

Parameters used by the functional data attribute, indexed by name.

Modify the [`ParameterDefinition.unit`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.ParameterDefinition.unit) property on the returned objects to specify a different unit for
import.

* **Returns:**
  Dict\[str, [`AttributeParameter`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeParameter)]

#### FunctionalSeries

### *class* FunctionalSeries(attr\_def, \_gdl\_av, \_mi, record, metas=None)

Extended [`AttributeFunctional`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeFunctional) class for Series functional data attributes.

Provides access to Series numbers and linestyles, and a method of generating a [`FunctionalGrid`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.FunctionalGrid) object from a
[`FunctionalSeries`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.FunctionalSeries) object ([`generate_grid_version()`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.FunctionalSeries.generate_grid_version)).

#### \_\_init\_\_(attr\_def, \_gdl\_av, \_mi, record, metas=None)

* **Parameters:**
  * **attr\_def** – [`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) object
  * **\_gdl\_av** – Foundation API [`GRANTA_MIScriptingToolkit.AttributeValue`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.AttributeValue) class for this attribute
  * **\_mi** – [`Session`](#GRANTA_MIScriptingToolkit.granta.mi.Session) object
  * **record** – Parent [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object
  * **metas** – List\[[`GRANTA_MIScriptingToolkit.AttributeValue`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.AttributeValue)] (Foundation API
    [`GRANTA_MIScriptingToolkit.AttributeValue`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.AttributeValue) class for each meta-attribute of this attribute)
* **Returns:**
  None

#### generate\_grid\_version()

Creates a Gridded version of the [`FunctionalSeries`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.FunctionalSeries) object and returns a copy of it.

* **Returns:**
  [`FunctionalGrid`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.FunctionalGrid) object

#### *property* data\_with\_series\_number

Series number for all data points, returned as an additional column with the data values.

* **Returns:**
  List\[List\[Union\[str, float, bool, int]]]

#### *property* series\_linestyles

Linestyles for each series (linestyle can be ‘Lines’, ‘Markers’, or ‘Both’).

* **Returns:**
  Dict\[int, str]

#### *property* log\_yaxis

Whether the Y axis is using a logarithmic scale.

* **Returns:**
  bool

#### FunctionalGrid

### *class* FunctionalGrid(attr\_def, \_gdl\_av, \_mi, record, metas=None)

Extended [`AttributeFunctional`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeFunctional) class for Gridded functional data attributes.

Provides access to linestyle and a method of generating a [`FunctionalSeries`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.FunctionalSeries) object from a
[`FunctionalGrid`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.FunctionalGrid) object ([`generate_series_version()`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.FunctionalGrid.generate_series_version)).

#### \_\_init\_\_(attr\_def, \_gdl\_av, \_mi, record, metas=None)

* **Parameters:**
  * **attr\_def** – [`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) object
  * **\_gdl\_av** – Foundation API [`GRANTA_MIScriptingToolkit.AttributeValue`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.AttributeValue) class for this attribute
  * **\_mi** – [`Session`](#GRANTA_MIScriptingToolkit.granta.mi.Session) object
  * **record** – Parent [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object
  * **metas** – List\[[`GRANTA_MIScriptingToolkit.AttributeValue`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.AttributeValue)] (Foundation API
    [`GRANTA_MIScriptingToolkit.AttributeValue`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.AttributeValue) class for each meta-attribute of this attribute)
* **Returns:**
  None

#### generate\_series\_version()

Creates a Series version of the [`FunctionalGrid`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.FunctionalGrid) object and returns a copy of it.

* **Returns:**
  [`FunctionalSeries`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.FunctionalSeries) object

#### *property* linestyle

Linestyle for gridded functional data (gridded data can only have one linestyle:
‘Lines’, ‘Markers’, or ‘Both’).

* **Returns:**
  str

#### AttributeHyperlink

### *class* AttributeHyperlink(attr\_def, \_gdl\_av, \_mi, record, metas=None)

Extended [`AttributeValue`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeValue) class for hyperlink attributes.

Provides access to the `hyperlink_description` and `hyperlink_display` text properties.

#### \_\_init\_\_(attr\_def, \_gdl\_av, \_mi, record, metas=None)

* **Parameters:**
  * **attr\_def** – [`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) object
  * **\_gdl\_av** – Foundation API [`GRANTA_MIScriptingToolkit.AttributeValue`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.AttributeValue) class for this attribute
  * **\_mi** – [`Session`](#GRANTA_MIScriptingToolkit.granta.mi.Session) object
  * **record** – Parent [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object
  * **metas** – List\[[`GRANTA_MIScriptingToolkit.AttributeValue`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.AttributeValue)] (Foundation API
    [`GRANTA_MIScriptingToolkit.AttributeValue`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.AttributeValue) class for each meta-attribute of this attribute)
* **Returns:**
  None

#### *property* object

Hyperlink attribute object value.

* **Returns:**
  [`Hyperlink`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.Hyperlink)

#### *property* value

Returns the URL as a string, or `None` if unset.

* **Returns:**
  str or `None`.

#### *property* hyperlink\_display

Indicates how the hyperlink should be opened when clicked on in MI applications. Takes one of the
following values:

* `New`: Open in a new window or tab.
* `Top`: Open in the current window or tab.
* `Content`: Open within the current MI application (for example, in a frame or dialog).

#### *property* hyperlink\_description

Text which displays instead of the URL in MI applications.

* **Returns:**
  str

#### AttributeInteger

### *class* AttributeInteger(attr\_def, \_gdl\_av, \_mi, record, metas=None)

Extended [`AttributeValue`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeValue) class for integer attributes.

#### \_\_init\_\_(attr\_def, \_gdl\_av, \_mi, record, metas=None)

* **Parameters:**
  * **attr\_def** – [`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) object
  * **\_gdl\_av** – Foundation API [`GRANTA_MIScriptingToolkit.AttributeValue`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.AttributeValue) class for this attribute
  * **\_mi** – [`Session`](#GRANTA_MIScriptingToolkit.granta.mi.Session) object
  * **record** – Parent [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object
  * **metas** – List\[[`GRANTA_MIScriptingToolkit.AttributeValue`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.AttributeValue)]
    (Foundation API [`GRANTA_MIScriptingToolkit.AttributeValue`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.AttributeValue) class for each meta-attribute
    of this attribute)
* **Returns:**
  None

#### *property* value

Current value of the attribute. Can be modified.

* **Returns:**
  Union\[List\[str], List\[float], str, Dict\[str, float], int, float, bool, bytes]

#### AttributeLogical

### *class* AttributeLogical(attr\_def, \_gdl\_av, \_mi, record, metas=None)

Extended [`AttributeValue`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeValue) class for logical attributes.

#### \_\_init\_\_(attr\_def, \_gdl\_av, \_mi, record, metas=None)

* **Parameters:**
  * **attr\_def** – [`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) object
  * **\_gdl\_av** – Foundation API [`GRANTA_MIScriptingToolkit.AttributeValue`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.AttributeValue) class for this attribute
  * **\_mi** – [`Session`](#GRANTA_MIScriptingToolkit.granta.mi.Session) object
  * **record** – Parent [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object
  * **metas** – List\[[`GRANTA_MIScriptingToolkit.AttributeValue`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.AttributeValue)]
    (Foundation API [`GRANTA_MIScriptingToolkit.AttributeValue`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.AttributeValue) class for each meta-attribute of
    this attribute)
* **Returns:**
  None

#### AttributePoint

### *class* AttributePoint(attr\_def, \_gdl\_av, \_mi, record, metas=None)

Extended [`AttributeValue`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeValue) class for point data attributes.

Provides access to lists of point values and their parameters. Points can be multi-valued and are represented
in the Streamlined API as lists of floats. They can have multiple parameters.

#### \_\_init\_\_(attr\_def, \_gdl\_av, \_mi, record, metas=None)

* **Parameters:**
  * **attr\_def** – [`AttributeDefinitionPoint`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinitionPoint) object
  * **\_gdl\_av** – Foundation API [`GRANTA_MIScriptingToolkit.AttributeValue`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.AttributeValue) class for this attribute
  * **\_mi** – [`Session`](#GRANTA_MIScriptingToolkit.granta.mi.Session) object
  * **record** – Parent [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object
  * **metas** – List\[[`GRANTA_MIScriptingToolkit.AttributeValue`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.AttributeValue)]
    (Foundation API [`GRANTA_MIScriptingToolkit.AttributeValue`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.AttributeValue) class for each meta-attribute
    of this attribute)
* **Returns:**
  None

#### *property* is\_multivalued

Whether this attribute allows multiple values to be set.

* **Returns:**
  bool

#### is\_empty()

Checks whether the attribute value is populated. [`AttributePoint`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributePoint) objects are empty if the length
of the list [`AttributePoint.value`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributePoint.value) == 0.

* **Returns:**
  bool

#### *property* is\_estimated

Whether the value has been estimated.

Defaults to False for new attribute values.

return: bool

#### *property* parameter\_definitions

Parameter definitions for the parameters associated with the point attribute, indexed by name.

Modify the [`ParameterDefinition.unit`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.ParameterDefinition.unit) property on the returned objects to specify a different unit for
import.

* **Returns:**
  Dict\[str, [`AttributeParameter`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeParameter)]

#### *property* parameters

Parameters associated with each point in [`AttributePoint.value`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributePoint.value). Each point has a
dictionary, indexed by parameter name and containing the parameter value for that point.

* **Returns:**
  List\[Dict\[str, Union\[float, str]]]

#### *property* value

Point values associated with this attribute.

* **Returns:**
  Union\[List\[float], float]

#### AttributeRange

### *class* AttributeRange(attr\_def, \_gdl\_av, \_mi, record, metas=None)

Extended [`AttributeValue`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeValue) class for range data attributes.  Range attribute values are represented in
the MI Scripting Toolkit by dictionaries of the form `{'low': float, 'high': float}`, and should be entered
in this form when editing them.

#### \_\_init\_\_(attr\_def, \_gdl\_av, \_mi, record, metas=None)

* **Parameters:**
  * **attr\_def** – [`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) object
  * **\_gdl\_av** – Foundation API [`GRANTA_MIScriptingToolkit.AttributeValue`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.AttributeValue) class for this attribute
  * **\_mi** – [`Session`](#GRANTA_MIScriptingToolkit.granta.mi.Session) object
  * **record** – Parent [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object
  * **metas** – List\[[`GRANTA_MIScriptingToolkit.AttributeValue`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.AttributeValue)] (Foundation API
    [`GRANTA_MIScriptingToolkit.AttributeValue`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.AttributeValue) class for each meta-attribute of this attribute)
* **Returns:**
  None

#### *property* value

Current value of the attribute. Can be modified.

* **Returns:**
  Union\[List\[str], List\[float], str, Dict\[str, float], int, float, bool, bytes]

#### *property* is\_estimated

Whether the value has been estimated.

Defaults to False for new attribute values.

return: bool

#### *property* high\_value\_is\_inclusive

Whether the high value is included in the range.

Defaults to True for new attribute values.

return: bool

#### *property* low\_value\_is\_inclusive

Whether the low value is included in the range.

Defaults to True for new attribute values.

return: bool

#### AttributeTabular

### *class* AttributeTabular(attr\_def, \_gdl\_av, \_mi, record, metas=None)

Extended [`AttributeValue`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeValue) class for tabular data attributes.

Provides access to tabular data and its properties, such as linking attribute and table, and methods for
adding, deleting or swapping rows.

#### WARNING

Importing an empty tabular attribute is deprecated. To delete all rows in an existing tabular attribute,
use the [`Record.clear_attributes`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.clear_attributes) method to delete the attribute value. To mark the attribute
as Not Applicable, set the [`AttributeValue.is_applicable`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeValue.is_applicable) property to `False`.

Use the [`AttributeTabular.shape`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeTabular.shape) property to determine the current number of rows in the
tabular attribute.

#### \_\_init\_\_(attr\_def, \_gdl\_av, \_mi, record, metas=None)

* **Parameters:**
  * **attr\_def** – [`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) object
  * **\_gdl\_av** – Foundation API [`GRANTA_MIScriptingToolkit.AttributeValue`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.AttributeValue) class for this attribute
  * **\_mi** – [`Session`](#GRANTA_MIScriptingToolkit.granta.mi.Session) object
  * **record** – Parent [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object
  * **metas** – List\[[`GRANTA_MIScriptingToolkit.AttributeValue`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.AttributeValue)] (Foundation API
    [`GRANTA_MIScriptingToolkit.AttributeValue`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.AttributeValue) class for each meta-attribute of this attribute)
* **Returns:**
  None

#### *property* columns

List of columns in the tabular data.

* **Returns:**
  List\[str]

#### *property* column\_types

Data type in each column. Only populated for local, linked attribute, or linked column tabular columns.
The element will be an empty string otherwise.

* **Example:**
  `['STXT', 'POIN', 'DISC', '', '']`
* **Returns:**
  List\[str]

#### *property* linked\_columns

Whether each column is linked or not.

* **Returns:**
  List\[bool]

#### *property* linking\_table

[`Table`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table) object which the linking attribute belongs to. Returns `None` for purely local tabular data.

* **Returns:**
  [`Table`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table) object or None

#### *property* linking\_attribute

Linking attribute, a short text-type attribute used to link rows in the tabular data attribute to records.
Returns `None` for purely local tabular data.

* **Returns:**
  [`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) object or None

#### *property* value

Raw data for the attribute (list of data values per column).

* **Returns:**
  List\[List\[Union\[str, list, [`Picture`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.Picture), [`File`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.File), [`Hyperlink`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.Hyperlink), float, int, tuple]]]

#### *property* units

[`TabularUnits`](#GRANTA_MIScriptingToolkit.granta.mi_meta_classes.TabularUnits) object associated with this [`AttributeTabular`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeTabular) object.

* **Returns:**
  [`TabularUnits`](#GRANTA_MIScriptingToolkit.granta.mi_meta_classes.TabularUnits) object

#### show()

Displays the data as an ascii-art style table.

* **Returns:**
  None

#### load()

Loads linked tabular data into the class.

* **Returns:**
  None

#### *property* linked\_records

The records linked to each row, indexed by the linking value of each row at loading.

These links are calculated in Granta MI, and therefore cannot be edited by the user. The dictionary is
unaffected by local changes to the tabular data, and the data must be re-imported to reflect local changes.

This property will be empty if the user cannot access the linked table, or if
[`AttributeDefinitionTabular.ignore_linked_records`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinitionTabular.ignore_linked_records) was set to `True` before data export.

* **Returns:**
  Dict\[str, List\[[`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]]

#### is\_empty()

Checks whether the attribute value is populated.

* **Returns:**
  bool

#### *property* shape

Number of columns by number of rows.

* **Returns:**
  Tuple\[int, int]

#### add\_row(linking\_value='\<linking value not chosen>')

Inserts a new unpopulated row, and sets the linking value for that row if one is provided.

* **Parameters:**
  **linking\_value** – str
* **Returns:**
  None

#### delete\_row(index)

Removes the row at the specified index.

* **Example:**
  `delete_row(0)` deletes the first row.
* **Parameters:**
  **index** – int
* **Returns:**
  None

#### swap\_rows(row1, row2)

Change the positions of two rows with indices `row1` and `row2`.

* **Example:**
  `my_data.swap_rows(0, 4)` swaps the first and fifth rows in the Tabular data structure `my_data`.
* **Parameters:**
  * **row1** – int
  * **row2** – int
* **Returns:**
  None

#### AttributeShortText

### *class* AttributeShortText(attr\_def, \_gdl\_av, \_mi, record, metas=None)

Extended [`AttributeValue`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeValue) class for short text attributes.

#### \_\_init\_\_(attr\_def, \_gdl\_av, \_mi, record, metas=None)

* **Parameters:**
  * **attr\_def** – [`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) object
  * **\_gdl\_av** – Foundation API [`GRANTA_MIScriptingToolkit.AttributeValue`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.AttributeValue) class for this attribute
  * **\_mi** – [`Session`](#GRANTA_MIScriptingToolkit.granta.mi.Session) object
  * **record** – Parent [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object
  * **metas** – List\[[`GRANTA_MIScriptingToolkit.AttributeValue`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.AttributeValue)] (Foundation API
    [`GRANTA_MIScriptingToolkit.AttributeValue`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.AttributeValue) class for each meta-attribute of this attribute)
* **Returns:**
  None

#### *property* value

Current value of the attribute. Can be modified.

* **Returns:**
  Union\[List\[str], List\[float], str, Dict\[str, float], int, float, bool, bytes]

#### AttributeLongText

### *class* AttributeLongText(attr\_def, \_gdl\_av, \_mi, record, metas=None)

Extended [`AttributeValue`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeValue) class for long text attributes.

#### \_\_init\_\_(attr\_def, \_gdl\_av, \_mi, record, metas=None)

* **Parameters:**
  * **attr\_def** – [`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) object
  * **\_gdl\_av** – Foundation API [`GRANTA_MIScriptingToolkit.AttributeValue`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.AttributeValue) class for this attribute
  * **\_mi** – [`Session`](#GRANTA_MIScriptingToolkit.granta.mi.Session) object
  * **record** – Parent [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object
  * **metas** – List\[[`GRANTA_MIScriptingToolkit.AttributeValue`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.AttributeValue)] (Foundation API
    [`GRANTA_MIScriptingToolkit.AttributeValue`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.AttributeValue) class for each meta-attribute of this attribute)
* **Returns:**
  None

#### AttributeUnsupported

### *class* AttributeUnsupported(attr\_def, \_gdl\_av, \_mi, record, metas=None)

Extended [`AttributeValue`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeValue) class for attributes with unsupported data types.

Note that unsupported attribute data will not yield any information regarding its value in that record. However,
some meta-data is still available through this class (such as the attribute’s name and data type).
An unsupported attribute value remains unpopulated, and these objects cannot be edited.

#### \_\_init\_\_(attr\_def, \_gdl\_av, \_mi, record, metas=None)

* **Parameters:**
  * **attr\_def** – [`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) object
  * **\_gdl\_av** – Foundation API [`GRANTA_MIScriptingToolkit.AttributeValue`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.AttributeValue) class for this attribute
  * **\_mi** – [`Session`](#GRANTA_MIScriptingToolkit.granta.mi.Session) object
  * **record** – Parent [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object
  * **metas** – List\[[`GRANTA_MIScriptingToolkit.AttributeValue`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.AttributeValue)] (Foundation API
    [`GRANTA_MIScriptingToolkit.AttributeValue`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.AttributeValue) class for each meta-attribute of this attribute)
* **Returns:**
  None

#### *property* object

Gets the underlying [`UnsupportedType`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.UnsupportedType) object representing the attribute value or the tabular cell. Does
not allow access to the data.

#### *property* is\_applicable

Whether the attribute is applicable to the current record. Setting this to `False` will clear
any data values on the attribute.

* **Returns:**
  bool

#### is\_empty()

Checks whether the attribute value is populated.

* **Returns:**
  bool

#### PseudoAttributeValue

### *class* PseudoAttributeValue(name, record)

Stores and provides access to pseudo-attribute data values.

#### \_\_init\_\_(name, record)

* **Parameters:**
  * **name** – str
  * **record** – Parent [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)
* **Returns:**
  None

#### *property* record

Parent [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) described by the [`PseudoAttributeValue`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.PseudoAttributeValue)

* **Returns:**
  [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object

#### *property* value

Current value of the pseudo-attribute. Cannot be modified. Modification of pseudo-attributes must be done
through the [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object properties `color`, `short_name` and `name`.

* **Returns:**
  Union\[List\[str], str, int, bool, Set\[str], [`datetime.datetime`](https://docs.python.org/3/library/datetime.html#datetime.datetime), [`RecordColor`](#GRANTA_MIScriptingToolkit.granta.mi_constants.RecordColor)]

#### *property* id

Attribute identifier (this is always 0 for pseudo-attributes).

* **Returns:**
  int

#### is\_empty()

Checks whether the pseudo-attribute value is populated or not.

* **Returns:**
  bool

#### *property* name

Name of the pseudo-attribute.

* **Returns:**
  str

#### *property* type

Data type of the pseudo-attribute value (four-character string).

* **Returns:**
  str

## Sub-attribute level

Classes that are used by attribute objects but are not attributes themselves.

### ParameterDefinition

### *class* ParameterDefinition

Base class for parameters.

Provides access to parameter properties such as revision history, default and possible values, and units.

#### NOTE

Do not create new instances of this class; it represents a pre-existing database structure.

#### *property* name

Parameter name.

* **Returns:**
  str

#### *property* history

Revision history of the parameter, as an [`ObjectHistory`](#GRANTA_MIScriptingToolkit.granta.mi_meta_classes.ObjectHistory) object.

* **Returns:**
  [`ObjectHistory`](#GRANTA_MIScriptingToolkit.granta.mi_meta_classes.ObjectHistory) object

#### *property* default\_value

Default value of the parameter (all parameters must have a default value).

* **Returns:**
  str or float

#### *property* history\_of\_default

Revision history of the parameter’s default value, as an [`ObjectHistory`](#GRANTA_MIScriptingToolkit.granta.mi_meta_classes.ObjectHistory) object.

* **Returns:**
  [`ObjectHistory`](#GRANTA_MIScriptingToolkit.granta.mi_meta_classes.ObjectHistory) object

#### *property* interpolation\_type

The interpolation type for the parameter (‘None’, ‘Linear’, or ‘Cubic Spline’).

* **Returns:**
  str

#### *property* axis\_scale\_type

Axis scale type for the parameter (‘Linear’, ‘Log’).

`None` for discrete parameters.

* **Returns:**
  str

#### *property* unit

Unit symbol for the parameter.

This property is used to specify a unit in the following situations:

* Specify a unit on an object of any [`ParameterDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.ParameterDefinition) subclass to control the unit of the values
  returned by the [`default_value`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.ParameterDefinition.default_value) and [`values`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.ParameterDefinition.values) properties on that object.
* Specify a unit on an [`ExporterParameter`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.ExporterParameter) object to provide a value with a different unit to the
  [`ExporterParameter.value_for_exporters`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.ExporterParameter.value_for_exporters) property.
* Specify a unit on an [`AttributeParameter`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeParameter) object returned by the
  [`AttributeFunctional.parameters`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeFunctional.parameters) or [`AttributePoint.parameter_definitions`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributePoint.parameter_definitions) properties to
  provide parameter values for import in a different unit.

This property does not impact data export. Attribute parameter values are always exported according to the
[`Database.unit_system`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Database.unit_system) and [`Database.absolute_temperatures`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Database.absolute_temperatures) settings.

* **Returns:**
  str

#### *property* database\_unit

Database unit symbol for the parameter.

* **Returns:**
  str

#### reset\_unit()

Resets the unit back to its original value (the unit in use when the parameter was initially exported).
Does not make a call to the Service Layer.

* **Returns:**
  None

#### *property* values

List of all possible values the parameter can take.

* **Returns:**
  List\[Union\[str, float]]

#### *property* values\_histories

Revision histories of each possible value of a parameter, as a list of [`ObjectHistory`](#GRANTA_MIScriptingToolkit.granta.mi_meta_classes.ObjectHistory) objects.

* **Returns:**
  List\[[`ObjectHistory`](#GRANTA_MIScriptingToolkit.granta.mi_meta_classes.ObjectHistory)]

#### *property* type

Parameter type  (‘Unrestricted numeric’, ‘Restricted numeric’, or ‘Discrete’).

#### WARNING

This property is deprecated. Use [`data_type`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.ParameterDefinition.data_type) and [`restricted`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.ParameterDefinition.restricted).

* **Returns:**
  str

#### *property* data\_type

Parameter data type (Numeric or Discrete).

* **Returns:**
  str

#### *property* restricted

Whether the parameter is restricted to specific values.

* **Returns:**
  bool

#### *property* id

Parameter identifier.

* **Returns:**
  int

### *class* DatabaseParameter

Bases: [`ParameterDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.ParameterDefinition)

Definition of a parameter at the database level.

### *class* AttributeParameter

Bases: [`DatabaseParameter`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.DatabaseParameter)

Definition of a parameter as configured for an attribute.

Inherited properties [`default_value`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.ParameterDefinition.default_value), [`axis_scale_type`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.ParameterDefinition.axis_scale_type), and [`interpolation_type`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.ParameterDefinition.interpolation_type) can differ
from the database parameter definition.

#### *property* parent\_attribute

Attribute to which this parameter applies.

* **Returns:**
  [`AttributeDefinitionMultiValue`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinitionMultiValue)

#### *property* order

Order in which the parameter is stored in the attribute. This is relevant for
some interpolation methods, and determines the display order in MI Viewer.

* **Returns:**
  int

### *class* ExporterParameter

Bases: [`DatabaseParameter`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.DatabaseParameter)

Definition of a parameter that is used by an exporter, the value and unit can be set to control the exporter’s
output.

If the value is not set then the database parameter default value will be used.

#### *property* value\_for\_exporters

Value on the [`ExporterParameter`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.ExporterParameter) instance for use in any exporters the parameter is passed to. Can be set
by the user.

If this value is unset, the exporter will use the default value defined in Granta MI.

* **Returns:**
  Union\[str, float]

#### clear\_value\_for\_exporters()

Clear the value on the [`ExporterParameter`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.ExporterParameter) instance and return it to the default value.

### ObjectHistory

### *class* ObjectHistory(\_gdl\_revision\_info)

Provides access to the revision history of an MI database element. Object histories are currently
supported via the following properties:

> * [`AttributeDefinition.history`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition.history)
> * [`AttributeDefinitionTabular.column_histories`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinitionTabular.column_histories)
> * [`ParameterDefinition.history`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.ParameterDefinition.history)
> * [`ParameterDefinition.history_of_default`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.ParameterDefinition.history_of_default)
> * [`ParameterDefinition.values_histories`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.ParameterDefinition.values_histories)
> * [`DataRevisionHistory.history`](#GRANTA_MIScriptingToolkit.granta.mi_meta_classes.DataRevisionHistory.history)

#### NOTE

Do not create new instances of this class; it represents a pre-existing database structure.

#### \_\_init\_\_(\_gdl\_revision\_info)

* **Parameters:**
  **\_gdl\_revision\_info** – Foundation API [`GRANTA_MIScriptingToolkit.RevisionInfo`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.RevisionInfo) class
* **Returns:**
  None

#### *property* last\_modified\_date

Date the database element was last modified.

* **Returns:**
  str

#### *property* last\_modified\_at

Date and time the database element was last modified.

* **Returns:**
  datetime.datetime

#### *property* date\_created

Date the database element was created.

* **Returns:**
  str

#### *property* created\_at

Date and time the database element was created.

* **Returns:**
  datetime.datetime

#### *property* last\_modified\_by

The username of the last user to modify the database element.

* **Returns:**
  str

#### *property* created\_by

The username of the user who created the database element.

* **Returns:**
  str

#### *property* update\_count

The number of times the object has been updated.

* **Returns:**
  str

### RecordVersionHistory

### *class* RecordVersionHistory(record\_version\_state)

Provides access to the revision history of an MI Record.

#### NOTE

Do not create new instances of this class; it represents a pre-existing database structure.

#### \_\_init\_\_(record\_version\_state)

#### *property* created\_at

Date and time the record version was created.

* **Returns:**
  datetime.datetime

#### *property* created\_by

The username of the user who created the record version.

* **Returns:**
  str

#### *property* creation\_notes

Notes associated with the creation of the record version.

* **Returns:**
  str

#### *property* last\_modified\_at

Date and time the record version was last modified.

* **Returns:**
  datetime.datetime

#### *property* last\_modified\_by

The username of the user who last modified the record version.

* **Returns:**
  str

#### *property* last\_modification\_notes

Notes associated with the last modification made to record version.

* **Returns:**
  str

#### *property* released\_at

Date and time the record version was released.

* **Returns:**
  datetime.datetime

#### *property* released\_by

The username of the user who released the record version.

* **Returns:**
  str

#### *property* release\_notes

Notes associated with the release of the record version.

* **Returns:**
  str

#### *property* superseded\_at

Date and time the record version was superseded.

* **Returns:**
  datetime.datetime

#### *property* superseded\_by

The username of the user who superseded the record version.

* **Returns:**
  str

#### *property* supersession\_notes

Notes associated with the last operation that superseded the record version.

* **Returns:**
  str

#### *property* withdrawn\_at

Date and time the record version was withdrawn.

* **Returns:**
  datetime.datetime

#### *property* withdrawn\_by

The username of the user who withdrew the record version.

* **Returns:**
  str

#### *property* withdrawal\_notes

Notes associated with the withdrawal of the record version.

* **Returns:**
  str

### DataRevisionHistory

### *class* DataRevisionHistory(record\_attribute)

Provides revision history information about the data in an attribute of a record.

#### NOTE

Do not create new instances of this class; it represents a pre-existing database structure.

#### \_\_init\_\_(record\_attribute)

#### *property* name

Name of the attribute.

* **Returns:**
  str

#### *property* is\_populated

Whether the attribute is populated.

* **Returns:**
  bool

#### *property* created\_in\_record\_version

Version of the record when this datum was created.

* **Returns:**
  int

#### *property* retired\_in\_record\_version

Version of the record when this datum was retired.

* **Returns:**
  int

#### *property* data\_version\_number

Data version number.

* **Returns:**
  int

#### *property* history

Revision history of the attribute data, as an [`ObjectHistory`](#GRANTA_MIScriptingToolkit.granta.mi_meta_classes.ObjectHistory) object. Is None for empty attributes.

* **Returns:**
  [`ObjectHistory`](#GRANTA_MIScriptingToolkit.granta.mi_meta_classes.ObjectHistory) object or None

#### *property* meta\_attributes

Data revision history of meta-attributes associated with this attribute, indexed by meta-attribute name.

* **Returns:**
  Dict\[str, [`DataRevisionHistory`](#GRANTA_MIScriptingToolkit.granta.mi_meta_classes.DataRevisionHistory)]

#### *property* is\_meta\_for

Name of the parent attribute, if a meta-attribute. Returns `None` otherwise.

* **Returns:**
  str or None

#### *property* is\_meta

Whether the attribute is a meta-attribute or not.

* **Returns:**
  bool

### SearchCriterion

### *class* SearchCriterion(attribute, operator, value=None, column\_name=None)

Defines a single criterion for use in a search. The criterion can be as simple as the presence of the
specified attribute, or as complex as the data in a specified column of the tabular attribute being
greater than a specified value. The search will use the same units as the
[`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition).

#### \_\_init\_\_(attribute, operator, value=None, column\_name=None)

* **Parameters:**
  * **attribute** – [`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) object
  * **operator** – str
  * **value** – Input type corresponding to your [`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition)
  * **column\_name** – str

#### NOTE

To perform an exact search on a discrete attribute, the operator argument should be
either `CONTAINS_ANY` or `CONTAINS_ALL`. In the case of searching for a single discrete
value, the `value` argument should be a list containing the search term.

* **Returns:**
  None

#### *property* attribute

[`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) for the attribute used in this search criterion.

* **Returns:**
  [`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) object

#### *property* operation

Operator used in this criterion, if provided.

* **Example:**
  ‘EXISTS’ or ‘CONTAINS’
* **Returns:**
  str

### Hyperlink

### *class* Hyperlink(url=None, hyperlink\_display='New', hyperlink\_description='')

Represents hyperlinks in MI. Can be used directly in tabular data, or within [`AttributeHyperlink`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeHyperlink) objects for
standalone hyperlink attributes.

#### \_\_init\_\_(url=None, hyperlink\_display='New', hyperlink\_description='')

* **Parameters:**
  * **url** – str
  * **hyperlink\_display** – str (Hyperlink display mode: `New`, `Content`, `Top`)
  * **hyperlink\_description** – str (Hyperlink description, displayed in MI applications)
* **Returns:**
  None

#### *property* hyperlink\_display

Indicates how the hyperlink should be opened when clicked on in MI applications. Takes one of the
following values:

* `New`: Open in a new window or tab.

* `Top`: Open in the current window or tab.

* `Content`: Open within the current MI application (for example, in a frame or dialog).

* **Returns:**
  str

### BinaryType

### *class* BinaryType

Stores and provides access to Pictures and Files, and associated metadata. Pictures and files can appear
in Granta MI as data (for example, in a tabular data column), or as an attribute value.

The [`BinaryType`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.BinaryType) object wraps files and images for inclusion in the corresponding MI Scripting Toolkit
classes.

#### \_\_init\_\_()

* **Returns:**
  None

#### *property* value

Current value of the attribute; [`BinaryType.value`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.BinaryType.value) always returns the current instance of the class
and cannot be modified. In this case, the values are the file or picture, which can be accessed through
the `load` and `save` methods of the [`File`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.File) or [`Picture`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.Picture) classes.

* **Returns:**
  [`BinaryType`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.BinaryType) object

#### *property* url

URL of the hosted file. Returns `None` if not populated.

The data can be retrieved by using a Python HTTP library (e.g. Requests, HTTPX) and by supplying the
appropriate authentication for your Granta MI server.

To populate this property, the [`Table.bulk_fetch()`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.bulk_fetch) method must be used with
`include_binary_data = False` (default). If `include_binary_data = True` is specified, or if the attribute
is fetched on-demand by accessing the `attributes` dictionary without performing a bulk fetch, this property
will always return `None`.

* **Returns:**
  str or None

#### *property* mime\_file\_type

MIME (Multipurpose Internet Mail Extensions) file type.

When exporting, this property is populated with the value of the MIME file type as determined by Granta MI.

When importing, this property is populated automatically by the `load()` method:

* For Picture attributes, the MIME file type is determined by the image data.
* For File attributes, this property is not used and is set to `None`.

Some commonly-used extensions are:

image/png - .png

image/gif - .gif

image/bmp - .bmp

image/tiff - .tif, .tiff

text/plain - .txt

application/zip - .zip

application/pdf - .pdf

application/vnd.ms-excel - .xls

application/vnd.openxmlformats-officedocument.spreadsheetml.sheet - .xlsx

application/vnd.ms-powerpoint - .ppt

application/vnd.openxmlformats-officedocument.presentationml.presentation - .pptx

application/msword - .doc

application/vnd.openxmlformats-officedocument.wordprocessingml.document - .docx

* **Returns:**
  str

#### is\_empty()

Checks whether the [`BinaryType`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.BinaryType) object is populated by checking whether there is binary data in the object.

* **Returns:**
  bool

#### *property* binary\_data

The binary data for the file. Binary data can be set with a bytes object or file buffer.

* **Returns:**
  bytes or None.

#### load(path)

Populates the object with the data located on `path`. Relative paths are permitted.

* **Parameters:**
  **path** (*Union* *\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* [*pathlib.Path*](https://docs.python.org/3/library/pathlib.html#pathlib.Path) *]*) – Path to the object to load.
* **Returns:**
  None

#### save(path)

Saves an object to file location `path`. Relative paths are permitted.

* **Parameters:**
  **path** (*Union* *\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* [*pathlib.Path*](https://docs.python.org/3/library/pathlib.html#pathlib.Path) *]*) – Path where the object should be saved.
* **Returns:**
  None

### Picture

### *class* Picture(\*, path=None)

Extended [`BinaryType`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.BinaryType) class for Pictures in MI.

#### \_\_init\_\_(\*, path=None)

* **Parameters:**
  **path** (*Optional* \*\[\**Union* *\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* [*pathlib.Path*](https://docs.python.org/3/library/pathlib.html#pathlib.Path) *]* *]*) – Path to the image file to load. Takes the form
  `C:\\Users\\username\\Pictures\\image.jpg` or `/home/username/Pictures/image.jpg`.
* **Returns:**
  None

#### load(path)

Populates the Picture object with the image located on `path`. Relative paths are permitted.

* **Parameters:**
  **path** (*Union* *\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* [*pathlib.Path*](https://docs.python.org/3/library/pathlib.html#pathlib.Path) *]*) – Path to the image file to load. Takes the form
  `C:\\Users\\username\\Pictures\\image.jpg` or `/home/username/Pictures/image.jpg`.
* **Returns:**
  None

#### save(path)

Saves a Picture object to file location `path`. Relative paths are permitted.

* **Parameters:**
  **path** (*Union* *\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* [*pathlib.Path*](https://docs.python.org/3/library/pathlib.html#pathlib.Path) *]*) – Path where the image should be saved. Takes the form
  `C:\\Users\\username\\Pictures\\image.jpg` or `/home/username/Pictures/image.jpg`.
* **Returns:**
  None

#### *property* binary\_data

The binary data for the file. Binary data can be set with a bytes object or file buffer.

* **Returns:**
  bytes or None.

### File

### *class* File(\*, path=None)

Extended [`BinaryType`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.BinaryType) class for Files in MI.

#### \_\_init\_\_(\*, path=None)

* **Parameters:**
  **path** (*Optional* \*\[\**Union* *\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* [*pathlib.Path*](https://docs.python.org/3/library/pathlib.html#pathlib.Path) *]* *]*) – Path to the file to load. Takes the form
  `C:\\Users\\username\\Documents\\file.pdf` or `/home/username/Documents/file.pdf`.
* **Returns:**
  None

#### save(path)

Saves a File object to file location `path`. Relative paths are permitted.

* **Parameters:**
  **path** (*Union* *\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* [*pathlib.Path*](https://docs.python.org/3/library/pathlib.html#pathlib.Path) *]*) – Path where the file should be saved. Takes the form
  `C:\\Users\\username\\Documents\\file.pdf` or `/home/username/Documents/file.pdf`.
* **Returns:**
  None

#### load(path)

Populates the File object with the file located by `path`. Relative paths are permitted.

* **Parameters:**
  **path** (*Union* *\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* [*pathlib.Path*](https://docs.python.org/3/library/pathlib.html#pathlib.Path) *]*) – Path to the file to load. Takes the form
  `C:\\Users\\username\\Documents\\file.pdf` or `/home/username/Documents/file.pdf`.
* **Returns:**
  None

#### *property* file\_name

Name of the file.

* **Returns:**
  str

#### *property* description

File description.

Stored with the data value. If provided, the description replaces the file name for the attribute when
displayed on a datasheet in MI Viewer.

* **Returns:**
  str

### UnsupportedType

### *class* UnsupportedType(\_gdl\_av)

Represents a data type that is unsupported. No information about the value of the Attribute or the
Tabular Cell is available. However, the object’s data type is available through this class, along
with the underlying gdl object, which may contain more information. Properties of this object cannot
be edited.

#### \_\_init\_\_(\_gdl\_av)

### CurrencyInfo

### *class* CurrencyInfo(code, name, factor)

Stores information about a Currency known to Granta MI.

* **Parameters:**
  * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – Human-readable name of the currency.
  * **code** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – str Currency short code, this appears in derived units.
  * **factor** ([*float*](https://docs.python.org/3/library/functions.html#float)) – Conversion factor from USD to this unit.

#### \_\_init\_\_(code, name, factor)

### TabularUnits

### *class* TabularUnits(units, default\_units, database\_units)

Stores and provides access to the units for a parent [`AttributeTabular`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeTabular) object, in the same tabular format as
the data.

Units can be set on a cell-by-cell basis. [`TabularUnits`](#GRANTA_MIScriptingToolkit.granta.mi_meta_classes.TabularUnits) is populated when the parent
[`AttributeTabular`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeTabular) object is loaded.

Any changes made to the underlying [`AttributeTabular.value()`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeTabular.value) property must also be made to the corresponding
[`TabularUnits.data()`](#GRANTA_MIScriptingToolkit.granta.mi_meta_classes.TabularUnits.data) and vice versa, or your changes will not import successfully and may be lost
([`AttributeTabular.add_row()`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeTabular.add_row) and [`AttributeTabular.delete_row()`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeTabular.delete_row) make the necessary changes to both
objects, but you must duplicate other changes to `data` yourself).

#### \_\_init\_\_(units, default\_units, database\_units)

* **Parameters:**
  * **units** – List\[List\[str]]
  * **default\_units** – List\[str] the default units applied when creating new rows for each column
  * **database\_units** – List\[str] the units defined in the database for each column
* **Returns:**
  None

#### *property* database\_units

The database units, as a list corresponding to each column.

* **Returns:**
  List\[str]

#### *property* default\_units

The default units, as a list corresponding to each column.

* **Returns:**
  List\[str]

#### *property* data

Data values (unit symbol strings) stored in the [`TabularUnits`](#GRANTA_MIScriptingToolkit.granta.mi_meta_classes.TabularUnits) object.

* **Returns:**
  List\[List\[str]]

## Helper Functions

### connect

### connect(service\_layer\_url, user\_name=None, password=None, domain=None, autologon=None, timeout=300000, existing\_session=None, oidc=False, auth\_token=None, refresh\_token=None, use\_stored\_token=False, store\_password=False, max\_retries=0)

Establishes a connection to the Granta MI server and returns a [`Session`](#GRANTA_MIScriptingToolkit.granta.mi.Session) object.

An existing session may be specified.

* **Parameters:**
  * **service\_layer\_url** – str
  * **user\_name** – str
  * **password** – str
  * **domain** – str
  * **autologon** – bool
  * **timeout** – int (maximum time to wait for a response, in milliseconds)
  * **existing\_session** – Foundation API [`GRANTA_MIScriptingToolkit.GRANTA_MISession`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.GRANTA_MISession) class
  * **oidc** – bool
  * **auth\_token** – str
  * **refresh\_token** – str
  * **use\_stored\_token** – bool
  * **store\_password** – bool (Default value False. Set to True when the password is given and needs to be saved
    for the session’s duration, for example when parallelisation is required.)
  * **max\_retries** – int (Default value 0. Maximum number of times to retry requests sent to the Service Layer.)
* **Returns:**
  [`Session`](#GRANTA_MIScriptingToolkit.granta.mi.Session) object

#### NOTE

If MI Scripting Toolkit has been installed on the same server machine as Granta MI, then the Granta MI
server name *must* be specified in full in the url parameter. If you use ‘localhost’ or a loopback address, MI
Scripting Toolkit will be unable to use the specified user account to connect to Granta MI.

### extract\_parameter\_value

### extract\_parameter\_value(param\_value)

Returns the data value stored in a Foundation API [`GRANTA_MIScriptingToolkit.ParameterValue`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.ParameterValue) object.

* **Parameters:**
  **param\_value** – Foundation API [`GRANTA_MIScriptingToolkit.ParameterValue`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-1/GRANTA_MIScriptingToolkit#module-GRANTA_MIScriptingToolkit.ParameterValue) class
* **Returns:**
  str or float

### get\_foundation\_logger

### get\_foundation\_logger()

Return the logger used by the Foundation API (has the name “GDL”).

* **Returns:**
  [`logging.Logger`](https://docs.python.org/3/library/logging.html#logging.Logger) class

### log\_to\_file\_in\_local\_app\_data

### log\_to\_file\_in\_local\_app\_data(path='Granta Design\\\MIScriptingToolkit\\\Python')

Set up the built-in Granta logger to log to a file in the user’s local app data directory
(%LOCALAPPDATA% on Windows, ‘\~/.appdata/’ on Linux).
The log file name is MIScriptingToolkitForPython\_YYYY.MM.DD.log and you can
specify the filepath. The default filepath is Granta Design/MIScriptingToolkit/Python.

#### WARNING

This function is deprecated and will be removed in a future version. To log messages
to a file, use the Python logging module. The Foundation Layer logger can be obtained
with the function [`get_foundation_logger()`](#GRANTA_MIScriptingToolkit.granta.mi_functions.get_foundation_logger).

* **Parameters:**
  **path** – str
* **Returns:**
  None

## Constants

### RecordProperties

### *class* RecordProperties

Provides [`PseudoAttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.PseudoAttributeDefinition) for every supported pseudo-attribute.

Attribute names match the corresponding property on [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record).

#### name *= \<PseudoAttributeDefinition name: name, type: STXT>*

#### short\_name *= \<PseudoAttributeDefinition name: shortName, type: STXT>*

#### subsets *= \<PseudoAttributeDefinition name: subsets, type: DISC>*

#### type *= \<PseudoAttributeDefinition name: recordType, type: STXT>*

#### history\_identity *= \<PseudoAttributeDefinition name: recordHistoryIdentity, type: INPT>*

#### color *= \<PseudoAttributeDefinition name: recordColor, type: STXT>*

#### version\_number *= \<PseudoAttributeDefinition name: recordVersionNumber, type: INPT>*

#### table\_name *= \<PseudoAttributeDefinition name: tableName, type: STXT>*

#### is\_writable *= \<PseudoAttributeDefinition name: writable, type: LOGI>*

#### parent\_record\_short\_name *= \<PseudoAttributeDefinition name: parentShortName, type: STXT>*

#### parent\_record\_name *= \<PseudoAttributeDefinition name: parentName, type: STXT>*

#### parent\_record\_history\_identity *= \<PseudoAttributeDefinition name: parentRecordHistoryIdentity, type: INPT>*

#### released\_on *= \<PseudoAttributeDefinition name: releasedDate, type: TIDT>*

#### last\_modified\_on *= \<PseudoAttributeDefinition name: modifiedDate, type: TIDT>*

#### created\_on *= \<PseudoAttributeDefinition name: createdDate, type: TIDT>*

#### last\_modified\_by *= \<PseudoAttributeDefinition name: lastModifier, type: STXT>*

#### created\_by *= \<PseudoAttributeDefinition name: creator, type: STXT>*

#### *classmethod* all()

All pseudo-attribute definitions.

* **Return type:**
  List\[[PseudoAttributeDefinition](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.PseudoAttributeDefinition)]

### RecordColor

### *enum* RecordColor(value)

Valid values are as follows:

#### Red *= RecordColor.Red*

#### Maroon *= RecordColor.Maroon*

#### Fuchsia *= RecordColor.Fuchsia*

#### Yellow *= RecordColor.Yellow*

#### Black *= RecordColor.Black*

#### Gray *= RecordColor.Gray*

#### Aqua *= RecordColor.Aqua*

#### Green *= RecordColor.Green*

#### Navy *= RecordColor.Navy*

#### Purple *= RecordColor.Purple*

#### Blue *= RecordColor.Blue*

#### Silver *= RecordColor.Silver*

#### Lime *= RecordColor.Lime*

#### Olive *= RecordColor.Olive*

#### Teal *= RecordColor.Teal*

#### White *= RecordColor.White*

#### InheritFromParent *= RecordColor.InheritFromParent*

### RecordType

### *enum* RecordType(value)

* **Member Type:**
  [`str`](https://docs.python.org/3/library/stdtypes.html#str)

Valid values are as follows:

#### Record *= RecordType.Record*

#### Folder *= RecordType.Folder*

#### Generic *= RecordType.Generic*

### DATABASE\_CURRENCY

### DATABASE\_CURRENCY

Value used to refer to the ‘Database currency’

### DATABASE\_UNIT\_SYSTEM

### DATABASE\_UNIT\_SYSTEM

Value used to refer to the ‘Database unit system’.

## Exceptions

### *class* UnsupportedLinkGroupError

Exception raised when an operation is performed on a record link group which is incompatible
with that operation.
