Skip to main content

Granta MI Scripting Toolkit 4.2

Streamlined API structure

Last update: 16.07.2025

The Streamlined Streamlined API reference documents all the classes and functions that make up the interface, and is split up into sections which represent the different logical components of the Streamlined API. These logical components are described in the sections below:

Session object

The Session section documents the Session class. The Session class is instantiated by specifying Granta MI connection information, and the returned object represents a connection to the server. It acts as the root object from which most other Streamlined API objects are spawned, and is typically used to:

This section also documents other classes which perform bulk activities across multiple records in different databases and tables.

Database and table classes

The Database section documents the Database class, which represents Granta MI databases. Database objects are typically obtained by using the Session.get_db() method.

The Table section documents Table class, which represents tables on the Granta MI server. Table objects are typically obtained by using the Database.get_table() method.

Database and Table objects are used to:

Record classes

The Record section documents the Record class, which represents a record on the Granta MI server. Record objects are used to:

Attribute definition classes

The Attribute definitions section documents the AttributeDefinition class and all sub-classes. These classes represent the definition of an attribute on a Granta MI server, as opposed to an instance of an attribute which contains data. They are not associated with a particular record, only with the table that they are defined in. AttributeDefinition classes can be used to access the attribute name, attribute unit, and additional schema-level configuration based on the type of the attribute.

The AttributeDefinition class is subclassed according to the hierarchy described below:

This section also documents the PseudoAttributeDefinition class. Objects of this type can generally be used in place of AttributeDefinition objects to search or export pseudo-attributes.

Attribute classes

The Attribute values section documents the AttributeValue class and all sub-classes. These classes are analogous to the attribute definition classes, but represent attribute values. They are associated with both the table and record that they relate to. In addition to being able to access the attribute name and attribute unit, they can be used to access data values (if the attribute is populated for the associated record).

The AttributeValue class is subclassed according to the hierarchy described below:

Sub-attribute classes

The Schema and supporting items section documents classes that are used by attribute objects but are not attributes themselves. This includes:

Connect with Ansys