diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/api/attribute-definitions.md b/2026R1/scripting-toolkit-dev-portal-26-r1/api/attribute-definitions.md deleted file mode 100644 index fea10c4964..0000000000 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/api/attribute-definitions.md +++ /dev/null @@ -1,723 +0,0 @@ -# Attribute definitions - - - - - - - -### *class* PseudoAttributeDefinition - - - -#### \_\_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 - - - -### *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`](table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table) the attribute belongs to. - -* **Returns:** - [`Table`](table.md#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()`](table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.search_for_records_where) or -[`Database.search_for_records_where()`](database.md#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`](supporting.md#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`](supporting.md#GRANTA_MIScriptingToolkit.granta.mi_meta_classes.ObjectHistory) object. - -* **Returns:** - [`ObjectHistory`](supporting.md#GRANTA_MIScriptingToolkit.granta.mi_meta_classes.ObjectHistory) object - - - -### *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]] - - - -### *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 - - - -### *class* AttributeDefinitionFile - -Extended [`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) class for file attributes. - - - -### *class* AttributeDefinitionHyperlink - -Extended [`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) class for hyperlink attributes. - - - -### *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* is_unique - -Whether this attribute is defined as unique. - -* **Returns:** - bool - - - -#### *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]] - - - -### *class* AttributeDefinitionLogical - -Extended [`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) class for logical attributes. - - - -### *class* AttributeDefinitionLongText - -Extended [`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) class for long text attributes. - - - -### *class* AttributeDefinitionPicture - -Extended [`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) class for picture attributes. - - - -### *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 - - - -### *class* AttributeDefinitionShortText - -Extended [`AttributeDefinition`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) class for short text attributes. - - - -#### *property* is_unique - -Whether this attribute is defined as unique. - -* **Returns:** - bool - - - -### *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`](table.md#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`](table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table) object or None - - - -#### *property* column_types - -Data type in each column. - -Populated for local tabular columns. Empty string for linked columns. [`None`](https://docs.python.org/3/library/constants.html#None) for unavailable columns. - -* **Example:** - `['STXT', 'POIN', 'DISC', '', '']` -* **Returns:** - List[str] - - - -#### *property* column_histories - -The revision histories of each column, as an ordered list of [`ObjectHistory`](supporting.md#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`](supporting.md#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 ``. Tabular attributes with `` 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()`](table.md#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()`](table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.bulk_fetch) with -`include_binary_data = True`. - -If [`Table.bulk_fetch()`](table.md#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()`](table.md#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()`](table.md#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 - - - -### *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`](supporting.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeParameter)] - - - -#### *property* database_unit - -The database unit for this attribute. - -* **Returns:** - str - - - -### *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`](supporting.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeParameter)] - - - -### *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`](supporting.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeParameter)] - - - -#### *property* unit - -Unit symbol. - -* **Returns:** - str - - - -### *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). - - - -### *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).” diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/api/attribute-values.md b/2026R1/scripting-toolkit-dev-portal-26-r1/api/attribute-values.md deleted file mode 100644 index 6043978195..0000000000 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/api/attribute-values.md +++ /dev/null @@ -1,1371 +0,0 @@ -# Attribute values - - - - - -### *class* AttributeValue - -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`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) are represented in the MI Scripting Toolkit by -[`AttributeDefinition`](attribute-definitions.md#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, \_mi, record) - -* **Parameters:** - * **attr_def** – [`AttributeDefinition`](attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) object - * **\_mi** – [`Session`](session.md#GRANTA_MIScriptingToolkit.granta.mi.Session) object - * **record** – Parent [`Record`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object -* **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`](record.md#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`](table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.create_empty_attribute_value). - -* **Returns:** - [`Record`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object or None - - - -#### is_empty() - -Checks whether the attribute value is populated. - -* **Returns:** - bool - - - -#### *property* definition - -[`AttributeDefinition`](attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) associated with this [`AttributeValue`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeValue). - -* **Returns:** - [`AttributeDefinition`](attribute-definitions.md#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 - - - -### *class* AttributeBinary - -Extended [`AttributeValue`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeValue) class to handle [`BinaryType`](supporting.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.BinaryType) objects -as attribute data values. - -Provides access to [`BinaryType`](supporting.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.BinaryType) object methods and properties. - - - -#### \_\_init_\_(attr_def, \_mi, record) - -* **Parameters:** - * **attr_def** – [`AttributeDefinition`](attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) object - * **\_mi** – [`Session`](session.md#GRANTA_MIScriptingToolkit.granta.mi.Session) object - * **record** – Parent [`Record`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object - * **content_type** – str (MIME content/file type; see [`BinaryType`](supporting.md#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()`](table.md#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`](supporting.md#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. - - - -### *class* AttributePicture - -Extended [`AttributeBinary`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeBinary) class for handling [`Picture`](supporting.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.Picture) objects. - -Provides access to [`Picture`](supporting.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.Picture) save/load methods. - -Pictures of up to 500 MB in size may be stored in Granta MI. To upload pictures larger than 20 Mb using Scripting -Toolkit: - -* Granta MI Service Layer must be configured to allow large requests. If this is not configured, - [`Session.update()`](session.md#GRANTA_MIScriptingToolkit.granta.mi.Session.update) will raise a [`GRANTA_ServiceLayerError`](./../foundation/api.md#GRANTA_MIScriptingToolkit.GRANTA_Exceptions.GRANTA_ServiceLayerError) for a “413 Request Entity Too Large” HTTP - response. For more information, contact your Ansys technical representative. -* The Python client environment must have sufficient system resources to load and Base64-encode the binary data. If - there are insufficient system resources, unhandled Python exceptions may be raised. - - - -#### \_\_init_\_(attr_def, \_mi, record) - -* **Parameters:** - * **attr_def** – [`AttributeDefinition`](attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) object - * **\_mi** – [`Session`](session.md#GRANTA_MIScriptingToolkit.granta.mi.Session) object - * **record** – Parent [`Record`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object -* **Returns:** - None - - - -#### save(path) - -Wraps the [`Picture.save()`](supporting.md#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()`](supporting.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.Picture.load) method (populates the [`Picture`](supporting.md#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 - - - -### *class* AttributeFile - -Extended [`AttributeBinary`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeBinary) class to handle [`File`](supporting.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.File) objects. - -Provides access to [`File`](supporting.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.File) object save/load methods, file name, and description. - -Files of up to 500 MB in size may be stored in Granta MI. To upload files larger than 20 Mb using Scripting Toolkit: - -* Granta MI Service Layer must be configured to allow large requests. If this is not configured, - [`Session.update()`](session.md#GRANTA_MIScriptingToolkit.granta.mi.Session.update) will raise a [`GRANTA_ServiceLayerError`](./../foundation/api.md#GRANTA_MIScriptingToolkit.GRANTA_Exceptions.GRANTA_ServiceLayerError) for a “413 Request Entity Too Large” HTTP - response. For more information, contact your Ansys technical representative. -* The Python client environment must have sufficient system resources to load and Base64-encode the binary data. If - there are insufficient system resources, unhandled Python exceptions may be raised. - - - -#### \_\_init_\_(attr_def, \_mi, record) - -* **Parameters:** - * **attr_def** – [`AttributeDefinition`](attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) object - * **\_mi** – [`Session`](session.md#GRANTA_MIScriptingToolkit.granta.mi.Session) object - * **record** – Parent [`Record`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object -* **Returns:** - None - - - -#### save(path) - -Wraps the [`File.save()`](supporting.md#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()`](supporting.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.File.load) method (populates the [`File`](supporting.md#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`](supporting.md#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 - - - -### *class* AttributeDate - -Extended [`AttributeValue`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeValue) class for date attributes. - - - -#### \_\_init_\_(attr_def, \_mi, record) - -* **Parameters:** - * **attr_def** – [`AttributeDefinition`](attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) object - * **\_mi** – [`Session`](session.md#GRANTA_MIScriptingToolkit.granta.mi.Session) object - * **record** – Parent [`Record`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object -* **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 - - - -### *class* AttributeDiscrete - -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, \_mi, record) - -* **Parameters:** - * **attr_def** – [`AttributeDefinitionDiscrete`](attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinitionDiscrete) object - * **\_mi** – [`Session`](session.md#GRANTA_MIScriptingToolkit.granta.mi.Session) object - * **record** – Parent [`Record`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object -* **Returns:** - None - - - -#### *property* value - -Discrete value(s) associated with this attribute. - -#### Versionchanged -Changed in version 4.1: Property `value` now validates the provided value against the attribute’s allowed discrete values. -Check [`AttributeDefinitionDiscrete.discrete_values`](attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinitionDiscrete.discrete_values) for available values. This validation is case-sensitive. - -* **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:** - Optional[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] - - - -### *class* AttributeFunctional - -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 -[[ '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, \_mi, record) - -* **Parameters:** - * **attr_def** – [`AttributeDefinition`](attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) object - * **\_mi** – [`Session`](session.md#GRANTA_MIScriptingToolkit.granta.mi.Session) object - * **record** – Parent [`Record`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object -* **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`](supporting.md#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`](supporting.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeParameter) for the current x-axis parameter of the functional data attribute. - -Modify the [`ParameterDefinition.unit`](supporting.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.ParameterDefinition.unit) property on the returned object to specify a different unit for -import. - -* **Returns:** - [`AttributeParameter`](supporting.md#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`](supporting.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.ParameterDefinition.unit) property on the returned objects to specify a different unit for -import. - -* **Returns:** - Dict[str, [`AttributeParameter`](supporting.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeParameter)] - - - -### *class* FunctionalSeries - -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, \_mi, record) - -* **Parameters:** - * **attr_def** – [`AttributeDefinition`](attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) object - * **\_mi** – [`Session`](session.md#GRANTA_MIScriptingToolkit.granta.mi.Session) object - * **record** – Parent [`Record`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object -* **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 - - - -### *class* FunctionalGrid - -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, \_mi, record) - -* **Parameters:** - * **attr_def** – [`AttributeDefinition`](attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) object - * **\_mi** – [`Session`](session.md#GRANTA_MIScriptingToolkit.granta.mi.Session) object - * **record** – Parent [`Record`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object -* **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 - - - -### *class* AttributeHyperlink - -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, \_mi, record) - -* **Parameters:** - * **attr_def** – [`AttributeDefinition`](attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) object - * **\_mi** – [`Session`](session.md#GRANTA_MIScriptingToolkit.granta.mi.Session) object - * **record** – Parent [`Record`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object -* **Returns:** - None - - - -#### *property* object - -Hyperlink attribute object value. - -* **Returns:** - [`Hyperlink`](supporting.md#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 - - - -### *class* AttributeInteger - -Extended [`AttributeValue`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeValue) class for integer attributes. - - - -#### \_\_init_\_(attr_def, \_mi, record) - -* **Parameters:** - * **attr_def** – [`AttributeDefinition`](attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) object - * **\_mi** – [`Session`](session.md#GRANTA_MIScriptingToolkit.granta.mi.Session) object - * **record** – Parent [`Record`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object -* **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] - - - -### *class* AttributeLogical - -Extended [`AttributeValue`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeValue) class for logical attributes. - - - -#### \_\_init_\_(attr_def, \_mi, record) - -* **Parameters:** - * **attr_def** – [`AttributeDefinition`](attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) object - * **\_mi** – [`Session`](session.md#GRANTA_MIScriptingToolkit.granta.mi.Session) object - * **record** – Parent [`Record`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object -* **Returns:** - None - - - -### *class* AttributePoint - -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, \_mi, record) - -* **Parameters:** - * **attr_def** – [`AttributeDefinitionPoint`](attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinitionPoint) object - * **\_mi** – [`Session`](session.md#GRANTA_MIScriptingToolkit.granta.mi.Session) object - * **record** – Parent [`Record`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object -* **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`](supporting.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.ParameterDefinition.unit) property on the returned objects to specify a different unit for -import. - -* **Returns:** - Dict[str, [`AttributeParameter`](supporting.md#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] - - - -### *class* AttributeRange - -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, \_mi, record) - -* **Parameters:** - * **attr_def** – [`AttributeDefinition`](attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) object - * **\_mi** – [`Session`](session.md#GRANTA_MIScriptingToolkit.granta.mi.Session) object - * **record** – Parent [`Record`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object -* **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 - - - -### *class* AttributeTabular - -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. - -Importing a tabular attribute using Granta MI Scripting Toolkit replaces all data in the existing attribute. This -can have implications if you use Data Updater to manage this data. - -#### WARNING -Importing an empty tabular attribute is deprecated. To delete all rows in an existing tabular attribute, -use the [`Record.clear_attributes`](record.md#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, \_mi, record) - -* **Parameters:** - * **attr_def** – [`AttributeDefinition`](attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) object - * **\_mi** – [`Session`](session.md#GRANTA_MIScriptingToolkit.granta.mi.Session) object - * **record** – Parent [`Record`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object -* **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`](table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table) object which the linking attribute belongs to. Returns `None` for purely local tabular data. - -* **Returns:** - [`Table`](table.md#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`](attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) object or None - - - -#### *property* value - -Raw data for the attribute. Data is organized as a list of lists: - -* The items in the outer list represent a row, and so the length of the outer list corresponds to the number of - rows in the tabular attribute. -* The items in each inner list represent a cell, and so the lengths of the inner lists correspond to the number - of columns in the tabular attribute. - -When exporting data as a read user, this property may omit rows for the following reasons: - -* If a row is completely empty. -* If a row contains no local data and has a linking value which does not exist in the target table. -* If a row contains no local data and has a linking value which exists in the target table, but all linked - records are inaccessible to the user because of version control or access control. - -When exporting data as a write user or above, this property will include all rows. - -When assigning a value using this property, the number of items in the inner and outer lists **must** match the -existing value. To modify the number of existing rows, use the [`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) methods before assigning a value. - -* **Returns:** - List[List[Union[str, list, [`Picture`](supporting.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.Picture), [`File`](supporting.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.File), [`Hyperlink`](supporting.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.Hyperlink), float, int, tuple]]] - - - -#### *property* units - -[`TabularUnits`](supporting.md#GRANTA_MIScriptingToolkit.granta.mi_meta_classes.TabularUnits) object associated with this [`AttributeTabular`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeTabular) object. - -* **Returns:** - [`TabularUnits`](supporting.md#GRANTA_MIScriptingToolkit.granta.mi_meta_classes.TabularUnits) object - - - -#### show() - -Displays the data as an ascii-art style table. - -* **Returns:** - None - - - -#### load() - -Loads exported tabular data. - -Exported data is generally lazily loaded by any property of the tabular that requires it. This method can be -used to explicitly load the exported data or to discard staged user modifications and reset the attribute value -to the exported data. - -* **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`](attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinitionTabular.ignore_linked_records) was set to `True` before data export. - -* **Returns:** - Dict[str, List[[`Record`](record.md#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='') - -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 - - - -### *class* AttributeShortText - -Extended [`AttributeValue`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeValue) class for short text attributes. - - - -#### \_\_init_\_(attr_def, \_mi, record) - -* **Parameters:** - * **attr_def** – [`AttributeDefinition`](attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) object - * **\_mi** – [`Session`](session.md#GRANTA_MIScriptingToolkit.granta.mi.Session) object - * **record** – Parent [`Record`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object -* **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] - - - -### *class* AttributeLongText - -Extended [`AttributeValue`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeValue) class for long text attributes. - - - -#### \_\_init_\_(attr_def, \_mi, record) - -* **Parameters:** - * **attr_def** – [`AttributeDefinition`](attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) object - * **\_mi** – [`Session`](session.md#GRANTA_MIScriptingToolkit.granta.mi.Session) object - * **record** – Parent [`Record`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object -* **Returns:** - None - - - -### *class* AttributeUnsupported - -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, \_mi, record) - -* **Parameters:** - * **attr_def** – [`AttributeDefinition`](attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) object - * **\_mi** – [`Session`](session.md#GRANTA_MIScriptingToolkit.granta.mi.Session) object - * **record** – Parent [`Record`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object -* **Returns:** - None - - - -#### *property* object - -Gets the underlying [`UnsupportedType`](supporting.md#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 - - - -### *class* PseudoAttributeValue - -Stores and provides access to pseudo-attribute data values. - - - -#### \_\_init_\_(name, record) - -* **Parameters:** - * **name** – str - * **record** – Parent [`Record`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) -* **Returns:** - None - - - -#### *property* record - -Parent [`Record`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) described by the [`PseudoAttributeValue`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.PseudoAttributeValue) - -* **Returns:** - [`Record`](record.md#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`](record.md#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`](constants.md#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 diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/api/bulk-operators.md b/2026R1/scripting-toolkit-dev-portal-26-r1/api/bulk-operators.md deleted file mode 100644 index a4e77b8d8f..0000000000 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/api/bulk-operators.md +++ /dev/null @@ -1,295 +0,0 @@ -# Bulk operators - - - - - -### *class* AttributeFetcher - -Bulk exporter for record data. Fetches data values for all named [`AttributeDefinition`](attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) and -[`PseudoAttributeDefinition`](attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.PseudoAttributeDefinition) objects from the specified [`Record`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) objects and [`Table`](table.md#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. - -#### Deprecated -Deprecated since version 4.2: This class will be made private in a future release. Use [`Table.bulk_fetch()`](table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.bulk_fetch) to fetch attribute values in -bulk. - - - -#### \_\_init_\_(table, batch_size=100, attributes=None, records=None, max_parallel_threads=6, include_binary_data=False) - -* **Parameters:** - * **table** – [`Table`](table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table) object - * **batch_size** – int (default value of 100) - * **attributes** – Union[List[Union[[`AttributeDefinition`](attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition), [`PseudoAttributeDefinition`](attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.PseudoAttributeDefinition)]], List[str]] - * **records** – List[[`Record`](record.md#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`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)] - - - -#### *property* attribute_list - -List of attributes for which data will be fetched (exported). - -* **Returns:** - List[Union[[`AttributeDefinition`](attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition), [`PseudoAttributeDefinition`](attribute-definitions.md#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`](attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeValue) objects for each record. - -* **Parameters:** - **parallelise** – bool -* **Returns:** - None - - - -### *class* AssociatedRecordFetcher - -Bulk fetcher for associated records. Fetches all [`Record`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) objects via association chains from the specified -[`Record`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) objects in the target [`Table`](table.md#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. - -#### Deprecated -Deprecated since version 4.2: This class will be made private in a future release. Use [`Table.bulk_fetch_associated_records()`](table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.bulk_fetch_associated_records) to fetch -associated records in bulk. - - - -#### \_\_init_\_(table, records, target_table, link_direction='Both', attribute_path=None, batch_size=100) - -* **Parameters:** - * **table** – [`Table`](table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table) - * **records** – List[[`Record`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)] - * **target_table** – [`Table`](table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table) - * **link_direction** – str (`Both`, `Forward`, `Reverse`) - * **attribute_path** – List[[`AttributeDefinition`](attribute-definitions.md#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`](table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table) from the specified [`Record`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) objects. Return -a list of dictionaries with `source_record` and `associated_records` fields for each provided -[`Record`](record.md#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`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record), List[[`Record`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]]]] - - - -### *class* LinkFetcher - -Bulk record link fetcher (exporter). Fetches and populates record link groups for the specified [`Record`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) -objects in the specified [`Table`](table.md#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. - -#### Deprecated -Deprecated since version 4.2: This class will be made private in a future release. Use [`Table.bulk_link_fetch()`](table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.bulk_link_fetch) to fetch links in bulk. - - - -#### \_\_init_\_(table, batch_size=100, records=None, link_groups=None, filter_subsets=True) - -* **Parameters:** - * **table** – [`Table`](table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table) object - * **batch_size** – int (default value of 100) - * **records** – List[[`Record`](record.md#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`](record.md#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`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object pseudo-attributes. - -* **Parameters:** - * **parallelise** – bool - * **max_parallel_threads** – int (default value of 6) -* **Returns:** - None - - - -### *class* ReleaseStateFetcher - -Allows record release states to be fetched from the server in bulk. - -The list of [`Record`](record.md#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`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) properties. - -#### Deprecated -Deprecated since version 4.2: This class will be made private in a future release. Use [`Session.bulk_fetch_release_states()`](session.md#GRANTA_MIScriptingToolkit.granta.mi.Session.bulk_fetch_release_states) to fetch -release states in bulk. - - - -#### \_\_init_\_(session, records, batch_size=100, max_parallel_threads=6) - -* **Parameters:** - * **batch_size** – int (default value of 100) - * **records** – List[[`Record`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)] - * **max_parallel_threads** – int (default value of 6) -* **Returns:** - None - - - -#### *property* records - -List of [`Record`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) objects to be processed. - -* **Returns:** - List[[`Record`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)] - - - -#### fetch_release_states(parallelise=False) - -Fetches the release states of the specified [`Record`](record.md#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 - - - -### *class* BulkRecordDeleterWithdrawer - -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`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) objects for deletion, batch size, and number of threads in parallel can be edited post-creation. - -#### Deprecated -Deprecated since version 4.2: This class will be made private in a future release. Use [`Session.bulk_delete_or_withdraw_records()`](session.md#GRANTA_MIScriptingToolkit.granta.mi.Session.bulk_delete_or_withdraw_records) to -delete and withdraw records in bulk. - - - -#### \_\_init_\_(session, records, batch_size=100, max_parallel_threads=6, withdrawal_notes=None) - -* **Parameters:** - * **session** – [`Session`](session.md#GRANTA_MIScriptingToolkit.granta.mi.Session) object - * **batch_size** – int (default value of 100) - * **records** – List[[`Record`](record.md#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`](record.md#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 - - - -### *class* DataRevisionHistoryFetcher - -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`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.data_revision_history) property. - -See [`AttributeFetcher`](#GRANTA_MIScriptingToolkit.granta.mi_bulk_utilities.AttributeFetcher) to export attribute data. - -#### Deprecated -Deprecated since version 4.2: This class will be made private in a future release. Use [`Table.bulk_fetch_data_revision_history()`](table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.bulk_fetch_data_revision_history) to fetch -data revision history in bulk. - - - -#### \_\_init_\_(\_mi, records, batch_size=100, max_parallel_threads=6) - -* **Parameters:** - * **\_mi** – [`Session`](session.md#GRANTA_MIScriptingToolkit.granta.mi.Session) object - * **records** – List[[`Record`](record.md#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`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.data_revision_history) property. - -* **Parameters:** - **parallelise** – bool diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/api/constants.md b/2026R1/scripting-toolkit-dev-portal-26-r1/api/constants.md deleted file mode 100644 index b043f8a9f7..0000000000 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/api/constants.md +++ /dev/null @@ -1,195 +0,0 @@ -# Constants - - - - - -### *class* RecordProperties - -Provides [`PseudoAttributeDefinition`](attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.PseudoAttributeDefinition) for every supported pseudo-attribute. - -Attribute names match the corresponding property on [`Record`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record). - - - -#### name *= * - - - -#### short_name *= * - - - -#### subsets *= * - - - -#### type *= * - - - -#### history_identity *= * - - - -#### color *= * - - - -#### version_number *= * - - - -#### table_name *= * - - - -#### is_writable *= * - - - -#### parent_record_short_name *= * - - - -#### parent_record_name *= * - - - -#### parent_record_history_identity *= * - - - -#### released_on *= * - - - -#### last_modified_on *= * - - - -#### created_on *= * - - - -#### last_modified_by *= * - - - -#### created_by *= * - - - -#### *classmethod* all() - -All pseudo-attribute definitions. - -* **Return type:** - List[[PseudoAttributeDefinition](attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.PseudoAttributeDefinition)] - - - -### *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* - - - -### *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 - -Value used to refer to the ‘Database currency’ - - - -### DATABASE_UNIT_SYSTEM - -Value used to refer to the ‘Database unit system’. diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/api/database.md b/2026R1/scripting-toolkit-dev-portal-26-r1/api/database.md deleted file mode 100644 index edaec5a3ce..0000000000 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/api/database.md +++ /dev/null @@ -1,408 +0,0 @@ -# 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`](session.md#GRANTA_MIScriptingToolkit.granta.mi.Session) object - - - -#### *property* parameters - -Parameters associated with the database, indexed by name. - -* **Returns:** - Dict[str, [`DatabaseParameter`](supporting.md#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`](constants.md#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`](./../foundation/api.md#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`](./../foundation/api.md#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`](./../foundation/api.md#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`](./../foundation/api.md#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`](./../foundation/api.md#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`](./../foundation/api.md#module-GRANTA_MIScriptingToolkit.RecordLinkGroupDetail) class - - - -#### *property* link_details - -Foundation API [`GRANTA_MIScriptingToolkit.RecordLinkGroupDetail`](./../foundation/api.md#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`](./../foundation/api.md#module-GRANTA_MIScriptingToolkit.RecordLinkGroupDetail)] - - - -#### *property* record_link_groups - -All record link groups in the database. - -* **Returns:** - List[[`LinkGroupDetails`](supporting.md#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() - -Performs a Foundation API [`BrowseService.GetTables()`](./../foundation/api.md#GRANTA_MIScriptingToolkit.BrowseService.BrowseService.GetTables) request and creates a new list of tables with the -response. Also updates the attributes in each table. - -Makes a Service Layer call. - -* **Returns:** - None - - - -#### *property* tables - -Tables associated with the database. - -* **Returns:** - List[[`Table`](table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table)] - - - -#### *property* tables_by_name - -Tables in the database, as dictionary keyed by name. - -* **Returns:** - Dict[str, [`Table`](table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table)] - - - -#### *property* tables_by_guid - -Tables in the database, as dictionary keyed by GUID. - -* **Returns:** - Dict[str, [`Table`](table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table)] - - - -#### get_table(name, subsets=Ellipsis, unit_system=None, absolute_temperatures=None) - -Returns the [`Table`](table.md#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`](table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.subsets), [`Table.add_subsets()`](table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.add_subsets), or -[`Table.remove_subsets()`](table.md#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`](table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table) object - - - -#### get_table_by_guid(guid, subsets=Ellipsis, unit_system=None, absolute_temperatures=None) - -Returns the [`Table`](table.md#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`](table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.subsets), [`Table.add_subsets()`](table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.add_subsets), or -[`Table.remove_subsets()`](table.md#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`](constants.md#GRANTA_MIScriptingToolkit.granta.mi_constants.DATABASE_UNIT_SYSTEM)) - * **absolute_temperatures** – bool (default value of `False`) -* **Returns:** - [`Table`](table.md#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`](record.md#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()`](table.md#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`](record.md#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`](record.md#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()`](table.md#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`](record.md#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()`](table.md#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`](supporting.md#GRANTA_MIScriptingToolkit.granta.mi_meta_classes.SearchCriterion)] - * **silent** – bool -* **Returns:** - a list of [`Record`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) objects that match the provided criteria. -* **Return type:** - List[[`Record`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)] - - - -#### get_records_by_ids(record_identifiers) - -Returns a [`Record`](record.md#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`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)] - - - -#### get_record_by_id(hguid=None, vguid=None, history_identity=None, version_number=None) - -Returns the [`Record`](record.md#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`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/api/exceptions.md b/2026R1/scripting-toolkit-dev-portal-26-r1/api/exceptions.md deleted file mode 100644 index 24213d77fb..0000000000 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/api/exceptions.md +++ /dev/null @@ -1,10 +0,0 @@ -# Exceptions - - - - - -### *class* UnsupportedLinkGroupError - -Exception raised when an operation is performed on a record link group which is incompatible -with that operation. diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/api/helpers.md b/2026R1/scripting-toolkit-dev-portal-26-r1/api/helpers.md deleted file mode 100644 index b7376c361e..0000000000 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/api/helpers.md +++ /dev/null @@ -1,76 +0,0 @@ -# Helper functions - - - - - -### 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`](session.md#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`](./../foundation/api.md#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`](session.md#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(param_value) - -Returns the data value stored in a Foundation API [`GRANTA_MIScriptingToolkit.ParameterValue`](./../foundation/api.md#module-GRANTA_MIScriptingToolkit.ParameterValue) object. - -#### Deprecated -Deprecated since version 4.2: This function will be removed in a future release. - -* **Parameters:** - **param_value** – Foundation API [`GRANTA_MIScriptingToolkit.ParameterValue`](./../foundation/api.md#module-GRANTA_MIScriptingToolkit.ParameterValue) class -* **Returns:** - str or float - - - -### 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(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 diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/api/record.md b/2026R1/scripting-toolkit-dev-portal-26-r1/api/record.md deleted file mode 100644 index e799e14dc4..0000000000 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/api/record.md +++ /dev/null @@ -1,892 +0,0 @@ -# Record - - - - - - - -### *class* Record - -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()`](session.md#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`](table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table) object - * **parent** – [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) or [`Table`](table.md#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`](attribute-values.md#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`](constants.md#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`](session.md#GRANTA_MIScriptingToolkit.granta.mi.Session) object - - - -#### *property* table - -Parent [`Table`](table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table) the record belongs to. - -* **Returns:** - [`Table`](table.md#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`](constants.md#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. - -* **Raises:** - [**PermissionError**](https://docs.python.org/3/library/exceptions.html#PermissionError) – if parent record cannot be accessed due to access control. -* **Returns:** - [`Record`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record), [`Table`](table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table) object, or [`None`](https://docs.python.org/3/library/constants.html#None) - - - -#### find_parent() - -Finds and sets the parent record or table. - -Since the parent record is in all subsets that this record is in, this operation performs no subset filtering. -:raises PermissionError: if parent record cannot be accessed due to access control. -:return: 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()`](session.md#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** – Iterable[AttributeValue] -* **Returns:** - None - - - -#### clear_attributes(attributes) - -Flags attributes to have their data value on the server deleted when [`Session.update()`](session.md#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** – 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`](attribute-values.md#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`](./../foundation/api.md#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()`](table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.bulk_fetch) method if URL -data representation is required. - -* **Returns:** - None - - - -#### refetch_pseudo_attributes() - -Fetches pseudo-attribute data for this record, and updates subsets for the record if not set. -Makes a Service Layer call. - -* **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. - -#### Deprecated -Deprecated since version 4.2: This method has been renamed to `refetch_pseudo_attributes`. - -* **Returns:** - None - - - -#### *property* attributes - -Attributes associated with the record, indexed by attribute name. - -* **Returns:** - Dict[str, - [`AttributeValue`](attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeValue)] - - - -#### get_attributes(names=None, types=None, include_attributes=True, include_meta_attributes=False, include_pseudo_attributes=False, empty=None, \*\*kwargs) - -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_meta_attributes=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_meta_attributes** – bool (whether to retrieve meta-attributes; `False` by default) - * **include_pseudo_attributes** – bool (whether to retrieve pseudo-attributes; `False` by default) - * **empty** – bool (whether to check if the returned attributes are populated) - -#### Versionchanged -Changed in version 4.2: Argument `include_metas` was renamed to `include_meta_attributes`. `include_metas` may still be used, -but is deprecated. - -#### Versionchanged -Changed in version 4.2: Argument `include_pseudos` was renamed to `include_pseudo_attributes`. `include_pseudos` may still be -used, but is deprecated. - -* **Returns:** - List[Union[[`PseudoAttributeValue`](attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.PseudoAttributeValue), - [`AttributeValue`](attribute-values.md#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`](constants.md#GRANTA_MIScriptingToolkit.granta.mi_constants.RecordType.Folder) -or [`RecordType.Record`](constants.md#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`](constants.md#GRANTA_MIScriptingToolkit.granta.mi_constants.RecordType.Generic) during the update. - -* **Return type:** - [RecordType](constants.md#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()`](table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.all_records), which all apply subset filtering. If the [`Table`](table.md#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`](table.md#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`](attribute-definitions.md#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`](constants.md#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`](supporting.md#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. - -* **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`](supporting.md#GRANTA_MIScriptingToolkit.granta.mi_exporters.Exporter)] - - - -#### *property* data_revision_history - -Data revision history for all attributes, indexed by attribute name. - -* **Returns:** - Dict[str, - [`DataRevisionHistory`](supporting.md#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`](constants.md#GRANTA_MIScriptingToolkit.granta.mi_constants.RecordType.Folder) or -[`RecordType.Generic`](constants.md#GRANTA_MIScriptingToolkit.granta.mi_constants.RecordType.Generic), or a [`Table`](table.md#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_pseudo_attributes()`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.refetch_pseudo_attributes) -* [`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()`](table.md#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`](table.md#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*](table.md#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_pseudo_attributes()`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.refetch_pseudo_attributes). - -* **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_pseudo_attributes()`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.refetch_pseudo_attributes). - -* **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_pseudo_attributes()`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.refetch_pseudo_attributes). - -* **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_pseudo_attributes()`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.refetch_pseudo_attributes). - -* **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_pseudo_attributes()`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.refetch_pseudo_attributes). - -* **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_pseudo_attributes()`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.refetch_pseudo_attributes). - -* **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_pseudo_attributes()`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.refetch_pseudo_attributes). - -* **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_pseudo_attributes()`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.refetch_pseudo_attributes). - -* **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_pseudo_attributes()`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.refetch_pseudo_attributes). - -* **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_pseudo_attributes()`](#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.refetch_pseudo_attributes). - -* **Return type:** - [datetime.datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime) diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/api/session.md b/2026R1/scripting-toolkit-dev-portal-26-r1/api/session.md deleted file mode 100644 index 6549384bb3..0000000000 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/api/session.md +++ /dev/null @@ -1,387 +0,0 @@ -# Session - - - - - -### *class* Session - -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, password, domain, autologon, timeout=300000, existing_session, oidc=False, auth_token, refresh_token, use_stored_token=False, store_password=False, max_retries=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`](./../foundation/api.md#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`](record.md#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`](supporting.md#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`](supporting.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.BinaryType.url) property is populated. -* `include_binary_data_in_refresh = True`: The [`BinaryType.binary_data`](supporting.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.BinaryType.binary_data) property, and - [`AttributeFile.save()`](attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeFile.save) and [`AttributePicture.save()`](attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributePicture.save) methods are all available to access and save - the binary data. The [`BinaryType.url`](supporting.md#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()`](table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.bulk_fetch) is unaffected. - -* **Parameters:** - * **records** – List[[`Record`](record.md#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`](record.md#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`](record.md#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`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)] -* **Returns:** - List[[`Record`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)] - - - -#### spawn_session() - -Creates a new Foundation API [`GRANTA_MIScriptingToolkit.GRANTA_MISession`](./../foundation/api.md#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`](./../foundation/api.md#module-GRANTA_MIScriptingToolkit.GRANTA_MISession) class - -#### Deprecated -Deprecated since version 4.2: Use [`GRANTA_MIScriptingToolkit.GRANTA_MISession`](./../foundation/api.md#module-GRANTA_MIScriptingToolkit.GRANTA_MISession) to instantiate a foundation layer session. - - - -#### *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. - -#### Deprecated -Deprecated since version 4.2: Renamed to [`assert_can_run_parallelized()`](#GRANTA_MIScriptingToolkit.granta.mi.Session.assert_can_run_parallelized). - - - -#### assert_can_run_parallelized() - -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`](./../foundation/api.md#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`](./../foundation/api.md#module-GRANTA_MIScriptingToolkit.GRANTA_MISession) class - -#### Deprecated -Deprecated since version 4.2: Use [`GRANTA_MIScriptingToolkit.GRANTA_MISession`](./../foundation/api.md#module-GRANTA_MIScriptingToolkit.GRANTA_MISession) to instantiate a foundation layer session. - - - -#### 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 - - - -#### *property* refresh_token - -The refresh token returned by the OIDC identity provider if one was provided. If a refresh token was not -returned by the OIDC identity provider, the initial provided token is returned. - -#### WARNING -Refresh tokens are bearer tokens that grant access to the Granta MI server, and so should be treated as -confidential. To use a refresh token for unattended Scripting Toolkit authentication, use the -[`persist_oidc_token()`](#GRANTA_MIScriptingToolkit.granta.mi.Session.persist_oidc_token) method to persist the refresh token in a secure credential store. - -* **Returns:** - optional[str] - - - -#### 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`](database.md#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`](database.md#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`](database.md#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`](database.md#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()`](database.md#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`](record.md#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()`](database.md#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`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)] - - - -#### records_from_string(text, use_strict_version=True) - -Generates [`Record`](record.md#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`](record.md#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`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object - - - -#### get_records_by_ids(record_identifiers) - -Returns a [`Record`](record.md#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`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)] - - - -#### bulk_fetch_release_states(records, batch_size=100, parallelize=False, max_num_threads=6) - -Fetches and populates the release states of the specified [`Record`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) objects. - -* **Parameters:** - * **records** – List[[`Record`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)] - * **batch_size** – int (default value of 100) - * **parallelize** – bool (default False) - * **max_num_threads** – int (default value of 6) - -#### Versionchanged -Changed in version 4.2: Argument `parallelise` was renamed to `parallelize`. `parallelise` may still be used, but is -deprecated. - -* **Returns:** - None - - - -#### bulk_delete_or_withdraw_records(records, batch_size=100, parallelize=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`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)] - * **batch_size** – int (default value of 100) - * **parallelize** – bool (default False) - * **max_num_threads** – int (default value of 6) - * **update_release_states** – bool - * **withdrawal_notes** – Optional[str] - -#### Versionchanged -Changed in version 4.2: Argument `parallelise` was renamed to `parallelize`. `parallelise` may still be used, but is -deprecated. - -* **Returns:** - None diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/api/supporting.md b/2026R1/scripting-toolkit-dev-portal-26-r1/api/supporting.md deleted file mode 100644 index 6c3a1b7f00..0000000000 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/api/supporting.md +++ /dev/null @@ -1,1385 +0,0 @@ -# Schema and supporting items - - - - - -### *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 - - - -### *class* TableLayout - -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`](table.md#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] - - - -### *class* Exporter - - - -#### \_\_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`](session.md#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`](record.md#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`](record.md#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`](record.md#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]]] - - - - - -### *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`](attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeFunctional.parameters) or [`AttributePoint.parameter_definitions`](attribute-values.md#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`](database.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Database.unit_system) and [`Database.absolute_temperatures`](database.md#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`](attribute-definitions.md#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. - - - - - -### *class* ObjectHistory - -Provides access to the revision history of an MI database element. Object histories are currently -supported via the following properties: - -> - [`AttributeDefinition.history`](attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition.history) -> - [`AttributeDefinitionTabular.column_histories`](attribute-definitions.md#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`](./../foundation/api.md#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 - - - - - -### *class* RecordVersionHistory - -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_history) - - - -#### *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 - - - - - -### *class* DataRevisionHistory - -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 - - - - - -### *class* SearchCriterion - -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`](attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition). - - - -#### \_\_init_\_(attribute, operator, value=None, column_name=None) - -* **Parameters:** - * **attribute** – [`AttributeDefinition`](attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) object - * **operator** – str - * **value** – Input type corresponding to your [`AttributeDefinition`](attribute-definitions.md#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`](attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) for the attribute used in this search criterion. - -* **Returns:** - [`AttributeDefinition`](attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) object - - - -#### *property* operation - -Operator used in this criterion, if provided. - -* **Example:** - ‘EXISTS’ or ‘CONTAINS’ -* **Returns:** - str - - - - - -### *class* Hyperlink - -Represents hyperlinks in MI. Can be used directly in tabular data, or within [`AttributeHyperlink`](attribute-values.md#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 - - - - - -### *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()`](table.md#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 - - - - - -### *class* Picture - -Extended [`BinaryType`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.BinaryType) class for Pictures in MI. - -Pictures of up to 500 MB in size may be stored in Granta MI. To upload pictures larger than 20 Mb using Scripting -Toolkit: - -* Granta MI Service Layer must be configured to allow large requests. If this is not configured, - [`Session.update()`](session.md#GRANTA_MIScriptingToolkit.granta.mi.Session.update) will raise a [`GRANTA_ServiceLayerError`](./../foundation/api.md#GRANTA_MIScriptingToolkit.GRANTA_Exceptions.GRANTA_ServiceLayerError) for a “413 Request Entity Too Large” HTTP - response. For more information, contact your Ansys technical representative. -* The Python client environment must have sufficient system resources to load and Base64-encode the binary data. If - there are insufficient system resources, unhandled Python exceptions may be raised. - - - -#### \_\_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. - - - - - -### *class* File - -Extended [`BinaryType`](#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.BinaryType) class for Files in MI. - -Files of up to 500 MB in size may be stored in Granta MI. To upload files larger than 20 Mb using Scripting Toolkit: - -* Granta MI Service Layer must be configured to allow large requests. If this is not configured, - [`Session.update()`](session.md#GRANTA_MIScriptingToolkit.granta.mi.Session.update) will raise a [`GRANTA_ServiceLayerError`](./../foundation/api.md#GRANTA_MIScriptingToolkit.GRANTA_Exceptions.GRANTA_ServiceLayerError) for a “413 Request Entity Too Large” HTTP - response. For more information, contact your Ansys technical representative. -* The Python client environment must have sufficient system resources to load and Base64-encode the binary data. If - there are insufficient system resources, unhandled Python exceptions may be raised. - - - -#### \_\_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 - - - - - -### *class* UnsupportedType - -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 object, which may contain more information. Properties of this object cannot -be edited. - - - -#### \_\_init_\_(datum) - - - - - -### *class* CurrencyInfo - -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) - - - - - -### *class* TabularUnits - -Stores and provides access to the units for a parent [`AttributeTabular`](attribute-values.md#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`](attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeTabular) object is loaded. - -Any changes made to the underlying [`AttributeTabular.value()`](attribute-values.md#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()`](attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeTabular.add_row) and [`AttributeTabular.delete_row()`](attribute-values.md#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]] diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/api/table.md b/2026R1/scripting-toolkit-dev-portal-26-r1/api/table.md deleted file mode 100644 index 17fb433da8..0000000000 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/api/table.md +++ /dev/null @@ -1,763 +0,0 @@ -# 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`](record.md#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`](record.md#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`](record.md#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()`](database.md#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`](record.md#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()`](database.md#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`](supporting.md#GRANTA_MIScriptingToolkit.granta.mi_meta_classes.SearchCriterion)] - * **silent** – bool - * **filter_by_subset** – bool - * **subset_name** – str -* **Return type:** - List[[`Record`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)] -* **Returns:** - a list of [`Record`](record.md#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()`](./../foundation/api.md#GRANTA_MIScriptingToolkit.BrowseService.BrowseService.GetAttributeDetails) request and creates a new set -of attributes for the table from the results. - -This method only updates the details of existing attributes. To update the list of available attributes, use -[`Database.refresh_tables()`](database.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Database.refresh_tables). - -Makes a Service Layer call. - -* **Returns:** - None - - - -#### *property* layouts - -Fetch and view the layouts available in this table. - -* **Returns:** - Dict[str, [`TableLayout`](supporting.md#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`](attribute-definitions.md#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`](session.md#GRANTA_MIScriptingToolkit.granta.mi.Session) object - - - -#### *property* database - -[`Database`](database.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Database) in which the [`Table`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table) is defined. - -* **Returns:** - [`Database`](database.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Database) object - - - -#### get_attribute_definition(name=None, identity=None) - -Returns the [`AttributeDefinition`](attribute-definitions.md#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`](attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) object) - * **identity** – int (Attribute identifier) -* **Returns:** - [`AttributeDefinition`](attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) object or List[[`AttributeDefinition`](attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition)] - - - -#### get_records_by_ids(record_identifiers) - -Returns a [`Record`](record.md#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`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)] - - - -#### get_record_by_id(history_identity=None, hguid=None, vguid=None, version_number=None) - -Returns the [`Record`](record.md#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`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object or None - - - -#### get_record_by_lookup_value(attribute_name, lookup_value) - -Returns a [`Record`](record.md#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. - -In Granta MI 2025 R2 and later, if multiple matches are detected, no results are returned. In earlier Granta MI -versions, an exception is raised. - -* **Parameters:** - * **attribute_name** – str - * **lookup_value** – str -* **Returns:** - [`Record`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object or None - - - -#### *property* children - -Return the children of the Table node. Analogous to [`Record.children`](record.md#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`](record.md#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`](record.md#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()`](database.md#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`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)] - - - -#### create_empty_attribute_value(definition) - -Create an empty [`AttributeValue`](attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeValue) instance for an attribute from its -[`AttributeDefinition`](attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition). -This can subsequently be assigned to a record for import. - -* **Parameters:** - **definition** – [`AttributeDefinition`](attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) object -* **Returns:** - [`AttributeValue`](attribute-values.md#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`](record.md#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`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) or [`Table`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table) object - * **short_name** – str - * **attributes** – Dict[str, - [`AttributeValue`](attribute-values.md#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`](record.md#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 -{'starting_node': Optional[Record], -'tree_path': ['list', 'of', 'folders'], -'end_node': '', -'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. - -#### WARNING -The `end_node` key is deprecated and will be removed in a future release. To create records at the -end of tree paths, use [`Table.create_record()`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.create_record) for each element in this method’s return value. - -* **Parameters:** - **paths** – List[Dict[str, Union[[`Record`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record), str, None, List[str]]]] -* **Returns:** - List[Tuple[dict, [`Record`](record.md#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. - -In the case of a version-controlled table, folders are created in an unreleased state. - -#### WARNING -The `end_node` parameter is deprecated and will be removed in a future release. To create records at the -end of tree paths, use [`Table.create_record()`](#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.create_record) with the `parent` parameter set to this method’s return -value. - -* **Parameters:** - * **starting_node** – A [`Record`](record.md#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`](constants.md#GRANTA_MIScriptingToolkit.granta.mi_constants.RecordColor) (Optional) Sets the color of all folders and records in the path. -* **Returns:** - The [`Record`](record.md#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`](record.md#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`](record.md#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`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)] - - - -#### bulk_fetch(records, attributes=None, batch_size=100, parallelize=False, max_num_threads=6, include_binary_data=False) - -Populates data values for all named [`AttributeDefinition`](attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) and [`PseudoAttributeDefinition`](attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.PseudoAttributeDefinition) objects in -the specified [`Record`](record.md#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`](record.md#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`](attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) -in `attributes`. [`AttributeDefinition`](attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) of meta-attributes can be obtained from the parent attribute -[`AttributeDefinition.meta_attributes`](attribute-definitions.md#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`](supporting.md#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`](supporting.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.BinaryType.url) property is populated. -* `include_binary_data = True`: The [`BinaryType.binary_data`](supporting.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.BinaryType.binary_data) property, and - [`AttributeFile.save()`](attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeFile.save) and [`AttributePicture.save()`](attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributePicture.save) methods are both available to access and save - the binary data. The [`BinaryType.url`](supporting.md#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`](attribute-definitions.md#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`](attribute-values.md#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 -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`](attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition), - [`PseudoAttributeDefinition`](attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.PseudoAttributeDefinition), str]] - * **records** – List[[`Record`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)] - * **batch_size** – int (default value of 100) - * **parallelize** – bool (default False) - * **max_num_threads** – int (default value of 6) - * **include_binary_data** – bool (default value of False) - -#### Versionchanged -Changed in version 4.2: Argument `parallelise` was renamed to `parallelize`. `parallelise` may still be used, but is -deprecated. - -* **Returns:** - None - - - -#### bulk_link_fetch(records, link_groups=None, batch_size=100, parallelize=False, max_num_threads=6, filter_subsets=True) - -Fetches and populates record link groups for the specified [`Record`](record.md#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`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)] - * **link_groups** – List[str] - * **batch_size** – int (default value of 100) - * **parallelize** – bool (default False) - * **max_num_threads** – int (default value of 6) - * **filter_subsets** – bool (default value of `True`) - -#### Versionchanged -Changed in version 4.2: Argument `parallelise` was renamed to `parallelize`. `parallelise` may still be used, but is -deprecated. - -* **Returns:** - None - - - -#### bulk_fetch_associated_records(records, target_table, link_direction='Both', attribute_path=None, batch_size=100, parallelize=False, max_num_threads=6) - -Fetches records associated with the specified [`Record`](record.md#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`](record.md#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`](attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinitionTabular) objects in `attribute_path` to follow only those tabular links. - -* **Parameters:** - * **records** – List[[`Record`](record.md#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`](attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinitionTabular)] - * **batch_size** – int (default value of 100) - * **parallelize** – bool (default False) - * **max_num_threads** – int (default value of 6) - -#### Versionchanged -Changed in version 4.2: Argument `parallelise` was renamed to `parallelize`. `parallelise` may still be used, but is -deprecated. - -* **Returns:** - List[Dict[str, Union[[`Record`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record), List[[`Record`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]]]] - - - -#### bulk_fetch_data_revision_history(records, batch_size=100, parallelize=False, max_num_threads=6) - -Fetches the data revision history for all attributes of the provided records and populates the -[`Record.data_revision_history`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.data_revision_history) property. - -* **Parameters:** - * **records** – List[[`Record`](record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)] - * **batch_size** – int (default value of 100) - * **parallelize** – bool (default False) - * **max_num_threads** – int (default value of 6) - -#### Versionchanged -Changed in version 4.2: Argument `parallelise` was renamed to `parallelize`. `parallelise` may still be used, but is -deprecated. - -* **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`](supporting.md#GRANTA_MIScriptingToolkit.granta.mi_exporters.Exporter)] diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/changelog.md b/2026R1/scripting-toolkit-dev-portal-26-r1/changelog.md deleted file mode 100644 index f0f0c20bad..0000000000 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/changelog.md +++ /dev/null @@ -1,349 +0,0 @@ -# Changelog - - - - - - - -## MI Scripting Toolkit 4.2 release notes - - - -### Enhancements - -* [`SearchCriterion`](api/supporting.md#GRANTA_MIScriptingToolkit.granta.mi_meta_classes.SearchCriterion) now accepts [`RecordColor`](api/constants.md#GRANTA_MIScriptingToolkit.granta.mi_constants.RecordColor) and [`RecordType`](api/constants.md#GRANTA_MIScriptingToolkit.granta.mi_constants.RecordType) as criterion values for searches - on record properties [`RecordProperties.color`](api/constants.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.RecordProperties.color) [`RecordProperties.type`](api/constants.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.RecordProperties.type) respectively. -* Range cell data returned by [`AttributeTabular.value`](api/attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeTabular.value) now includes additional items, `low_is_inclusive` - and `high_is_inclusive`, to describe whether the low and high value are included in the range. -* [`Record.find_parent()`](api/record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.find_parent) no longer raises an [`IndexError`](https://docs.python.org/3/library/exceptions.html#IndexError) if the user does not have sufficient permissions - to access the parent record. It now raises a [`PermissionError`](https://docs.python.org/3/library/exceptions.html#PermissionError). -* Classes [`AttributeDefinitionShortText`](api/attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinitionShortText) and [`AttributeDefinitionInteger`](api/attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinitionInteger) now include the `.is_unique` - property which indicates whether the attribute values are required to be unique. - - - -### Bug fixes - -* [`Table.bulk_fetch_data_revision_history()`](api/table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.bulk_fetch_data_revision_history) no longer raises a [`TypeError`](https://docs.python.org/3/library/exceptions.html#TypeError) when `parallelize=True` and the - table contains meta-attributes. -* Using [`Table.set_display_unit()`](api/table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.set_display_unit) for attributes with a temperature based unit now correctly results in the data - being exported in the requested unit. -* [`AttributeTabular`](api/attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeTabular) now correctly loads exported data in cases where the tabular attribute includes columns - unavailable to the user, regardless of the order in which columns are defined. -* [`AttributeTabular.column_types`](api/attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeTabular.column_types) now returns a list with the expected length in cases where the tabular - attribute includes unavailable columns. -* Modifying the number of rows in a tabular attribute value by modifying the shape of the - [`AttributeTabular.value`](api/attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeTabular.value) and [`TabularUnits.data`](api/supporting.md#GRANTA_MIScriptingToolkit.granta.mi_meta_classes.TabularUnits.data) (accessed as `AttributeTabular.units.data`) values - directly is no longer permitted. Instead, the [`AttributeTabular.add_row()`](api/attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeTabular.add_row) and - [`AttributeTabular.delete_row()`](api/attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeTabular.delete_row) methods should be used to change the number of rows in the tabular attribute - value. -* Calling [`AttributeTabular.load()`](api/attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeTabular.load) on an empty [`AttributeTabular`](api/attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeTabular) now correctly initialises the value. - This fixes an issue where the tabular attribute `__repr__` incorrectly included `not loaded` after calling - [`AttributeTabular.load()`](api/attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeTabular.load). -* Editing existing tabular data no longer discards inclusiveness information of range cells. -* [`ReleaseStateFetcher.fetch_release_states()`](api/bulk-operators.md#GRANTA_MIScriptingToolkit.granta.mi_bulk_utilities.ReleaseStateFetcher.fetch_release_states) and [`Session.bulk_fetch_release_states()`](api/session.md#GRANTA_MIScriptingToolkit.granta.mi.Session.bulk_fetch_release_states) now correctly - populate the release state of versioned records that are not the latest version available to the user. -* [`ReleaseStateFetcher.fetch_release_states()`](api/bulk-operators.md#GRANTA_MIScriptingToolkit.granta.mi_bulk_utilities.ReleaseStateFetcher.fetch_release_states) and [`Session.bulk_fetch_release_states()`](api/session.md#GRANTA_MIScriptingToolkit.granta.mi.Session.bulk_fetch_release_states) now correctly - populate the release state of records with identical guids in different databases. - - - -### Examples - -There have been no changes to example scripts in MI Scripting Toolkit 4.2. - - - -### Backwards incompatible API changes - -There are no known backwards-incompatible changes in MI Scripting Toolkit 4.2. - - - -### Foundation API changes - -* Additional logging has been added to assist in debugging scripts, this is available via the `GDL.http` logger. -* Logging has been reorganised to allow more granular control of message logging, existing request and - response log messages are now available via the `GDL.core` logger. -* [`GetRecordAttributesByRefRequest.tabularDataSettings`](foundation/api.md#GRANTA_MIScriptingToolkit.GetRecordAttributesByRefRequest.GetRecordAttributesByRefRequest.tabularDataSettings) added to control how tabular attributes are exported. - - - -## Known issues - -* If an attribute is exported with the [`Table.bulk_fetch()`](api/table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.bulk_fetch) method with `include_binary_data=False`, subsequent - values returned by the `AttributePicture.mime_file_type` property will always return `image/png`, regardless of - the actual image format. The header returned when accessing the URL is unaffected and should be used instead. -* The behavior of [`Table.get_record_by_lookup_value()`](api/table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.get_record_by_lookup_value) when a non-unique lookup value is provided is dependent on - the Granta MI version. In Granta MI 2025 R2 and later, if multiple matches are detected, no results are returned. In - earlier Granta MI versions, an exception is raised. -* If an attribute is removed from the Granta MI database after the parent [`Database`](api/database.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Database) is first accessed, calls to - [`Table.refresh_attributes()`](api/table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.refresh_attributes) raise a [`GRANTA_ServiceLayerError`](foundation/api.md#GRANTA_MIScriptingToolkit.GRANTA_Exceptions.GRANTA_ServiceLayerError). Use [`Database.refresh_tables()`](api/database.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Database.refresh_tables) - instead. -* In version-controlled tables, [`DataRevisionHistory`](api/supporting.md#GRANTA_MIScriptingToolkit.granta.mi_meta_classes.DataRevisionHistory) objects have an ambiguous meaning. The - `history.last_modified_date` for the following attribute types is updated when the release state of the parent - record is modified: - - Date - - Hyperlink - - Integer - - Logical - - Range - - Short text - - The `history.last_modified_date` for the following attribute types is *not* updated when the release state of the - parent record is modified: - - Discrete - - File - - Functional - - Long text - - Picture - - Point - - Tabular -* The following hyperlink display options available in MI Viewer are not supported by - [`Hyperlink.hyperlink_display`](api/supporting.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.Hyperlink.hyperlink_display): - - Current pane - - Left browse pane - - Both panes below toolbar - - If a hyperlink attribute value with one of these three display options is exported, the - [`hyperlink_display`](api/supporting.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.Hyperlink.hyperlink_display) will be set to `Content`. If the attribute is subsequently re-imported, the - display option in MI Viewer will be changed to “Right content pane”. - - - - - -## Planned changes and deprecations - -This section describes deprecated functionality which will be removed or changed in a future release. - - - -### Functionality deprecated with version 4.2 - -| Deprecated functionality | Recommended replacement / future functionality | -|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| [`Session.spawn_session()`](api/session.md#GRANTA_MIScriptingToolkit.granta.mi.Session.spawn_session) | Create foundation layer sessions using [`GRANTA_MIScriptingToolkit.GRANTA_MISession`](foundation/api.md#module-GRANTA_MIScriptingToolkit.GRANTA_MISession). | -| [`Session.connect()`](api/session.md#GRANTA_MIScriptingToolkit.granta.mi.Session.connect) | Create foundation layer sessions using [`GRANTA_MIScriptingToolkit.GRANTA_MISession`](foundation/api.md#module-GRANTA_MIScriptingToolkit.GRANTA_MISession). | -| [`Session.bulk_fetch_release_states()`](api/session.md#GRANTA_MIScriptingToolkit.granta.mi.Session.bulk_fetch_release_states) and [`ReleaseStateFetcher.fetch_release_states()`](api/bulk-operators.md#GRANTA_MIScriptingToolkit.granta.mi_bulk_utilities.ReleaseStateFetcher.fetch_release_states) raise
[`TypeError`](https://docs.python.org/3/library/exceptions.html#TypeError) exceptions on staged records. | Will raise [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError) exceptions in a future version. | -| [`AttributeTabular.value`](api/attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeTabular.value) raises [`AssertionError`](https://docs.python.org/3/library/exceptions.html#AssertionError) exceptions for invalid values. | Will raise [`TypeError`](https://docs.python.org/3/library/exceptions.html#TypeError) or [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError) exceptions in a future version. | -| [`Session.assert_can_run_parallelised()`](api/session.md#GRANTA_MIScriptingToolkit.granta.mi.Session.assert_can_run_parallelised). | Use renamed method [`Session.assert_can_run_parallelized()`](api/session.md#GRANTA_MIScriptingToolkit.granta.mi.Session.assert_can_run_parallelized). | -| Argument `parallelise` of methods [`Session.bulk_fetch_release_states()`](api/session.md#GRANTA_MIScriptingToolkit.granta.mi.Session.bulk_fetch_release_states),
[`Session.bulk_delete_or_withdraw_records()`](api/session.md#GRANTA_MIScriptingToolkit.granta.mi.Session.bulk_delete_or_withdraw_records), [`Table.bulk_fetch()`](api/table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.bulk_fetch), [`Table.bulk_link_fetch()`](api/table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.bulk_link_fetch),
[`Table.bulk_fetch_associated_records()`](api/table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.bulk_fetch_associated_records), and [`Table.bulk_fetch_data_revision_history()`](api/table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.bulk_fetch_data_revision_history). | Use the argument `parallelize`. | -| [`Table.path_from()`](api/table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.path_from) and [`Table.paths_from()`](api/table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.paths_from) `end_node` parameter. | Create records using [`Table.create_record()`](api/table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.create_record). | -| [`Record.refetch_record_versions()`](api/record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.refetch_record_versions) and [`Record.all_versions`](api/record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.all_versions) raise
[`GRANTA_Exception`](foundation/api.md#GRANTA_MIScriptingToolkit.GRANTA_Exceptions.GRANTA_Exception) exceptions on staged records. | Will raise [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError) exceptions in a future version. | -| Record color and record type [`SearchCriterion`](api/supporting.md#GRANTA_MIScriptingToolkit.granta.mi_meta_classes.SearchCriterion) using [`str`](https://docs.python.org/3/library/stdtypes.html#str) criterion values. | Define the criterion value using the enumerations [`RecordColor`](api/constants.md#GRANTA_MIScriptingToolkit.granta.mi_constants.RecordColor) and [`RecordType`](api/constants.md#GRANTA_MIScriptingToolkit.granta.mi_constants.RecordType). | -| [`BulkRecordDeleterWithdrawer`](api/bulk-operators.md#GRANTA_MIScriptingToolkit.granta.mi_bulk_utilities.BulkRecordDeleterWithdrawer) | Use [`Session.bulk_delete_or_withdraw_records()`](api/session.md#GRANTA_MIScriptingToolkit.granta.mi.Session.bulk_delete_or_withdraw_records) to delete and withdraw records in bulk. | -| [`ReleaseStateFetcher`](api/bulk-operators.md#GRANTA_MIScriptingToolkit.granta.mi_bulk_utilities.ReleaseStateFetcher) | Use [`Session.bulk_fetch_release_states()`](api/session.md#GRANTA_MIScriptingToolkit.granta.mi.Session.bulk_fetch_release_states) to fetch release states in bulk. | -| [`AttributeFetcher`](api/bulk-operators.md#GRANTA_MIScriptingToolkit.granta.mi_bulk_utilities.AttributeFetcher) | Use [`Table.bulk_fetch()`](api/table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.bulk_fetch) to fetch attribute values in bulk. | -| [`AssociatedRecordFetcher`](api/bulk-operators.md#GRANTA_MIScriptingToolkit.granta.mi_bulk_utilities.AssociatedRecordFetcher) | Use [`Table.bulk_fetch_associated_records()`](api/table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.bulk_fetch_associated_records) to fetch associated records in bulk. | -| [`LinkFetcher`](api/bulk-operators.md#GRANTA_MIScriptingToolkit.granta.mi_bulk_utilities.LinkFetcher) | Use [`Table.bulk_link_fetch()`](api/table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.bulk_link_fetch) to fetch links in bulk. | -| [`DataRevisionHistoryFetcher`](api/bulk-operators.md#GRANTA_MIScriptingToolkit.granta.mi_bulk_utilities.DataRevisionHistoryFetcher) | Use [`Table.bulk_fetch_data_revision_history()`](api/table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.bulk_fetch_data_revision_history) to fetch data revision history in bulk. | -| [`extract_parameter_value()`](api/helpers.md#GRANTA_MIScriptingToolkit.granta.mi_functions.extract_parameter_value) | Access the [`ParameterValue.discreteValue`](foundation/api.md#GRANTA_MIScriptingToolkit.ParameterValue.ParameterValue.discreteValue) and
[`ParameterValue.numericValue`](foundation/api.md#GRANTA_MIScriptingToolkit.ParameterValue.ParameterValue.numericValue) properties directly. | -| [`debug()`](foundation/api.md#GRANTA_MIScriptingToolkit.GRANTA_Logging.GRANTA_Logging.debug),
[`info()`](foundation/api.md#GRANTA_MIScriptingToolkit.GRANTA_Logging.GRANTA_Logging.info),
[`warning()`](foundation/api.md#GRANTA_MIScriptingToolkit.GRANTA_Logging.GRANTA_Logging.warning), and
[`error()`](foundation/api.md#GRANTA_MIScriptingToolkit.GRANTA_Logging.GRANTA_Logging.error) | Use [`core_logger()`](foundation/api.md#GRANTA_MIScriptingToolkit.GRANTA_Logging.GRANTA_Logging.core_logger) to obtain the
[`Logger`](https://docs.python.org/3/library/logging.html#logging.Logger) object directly. | - - - -### Functionality deprecated with version 4.1 - -| Deprecated functionality | Recommended replacement / future functionality | -|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| [`Session.spawn_session()`](api/session.md#GRANTA_MIScriptingToolkit.granta.mi.Session.spawn_session) if session contains manual credentials and `store_password = False` | Specify `store_password = True` when creating the original session. | -| [`Database.get_all_link_details_where()`](api/database.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Database.get_all_link_details_where) | [`Database.record_link_groups`](api/database.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Database.record_link_groups) | -| [`Database.get_link_detail()`](api/database.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Database.get_link_detail) | [`Database.record_link_groups`](api/database.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Database.record_link_groups) | -| [`Database.link_details`](api/database.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Database.link_details) | [`Database.record_link_groups`](api/database.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Database.record_link_groups) | -| [`Database.set_unit_system()`](api/database.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Database.set_unit_system) | [`Database.unit_system`](api/database.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Database.unit_system) and [`Database.absolute_temperatures`](api/database.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Database.absolute_temperatures) | -| [`Database.get_table()`](api/database.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Database.get_table) and [`Database.get_table_by_guid()`](api/database.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Database.get_table_by_guid): `subsets` parameter | Use [`Table.subsets`](api/table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.subsets) on the returned table object. | -| [`Database.get_table()`](api/database.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Database.get_table) and [`Database.get_table_by_guid()`](api/database.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Database.get_table_by_guid): `unit_system` parameter | Configure database unit system before getting table. | -| [`Database.get_table()`](api/database.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Database.get_table) and [`Database.get_table_by_guid()`](api/database.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Database.get_table_by_guid): `absolute_temperatures` parameter | Configure database absolute temperatures before getting table. | -| [`Record.pseudo_attributes`](api/record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.pseudo_attributes) | Individual [`Record`](api/record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) properties. | -| Setting [`Record.type`](api/record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.type) to a string. | Set to a [`RecordType`](api/constants.md#GRANTA_MIScriptingToolkit.granta.mi_constants.RecordType) value. | -| [`Record.all_children()`](api/record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.all_children) | [`Record.get_descendants()`](api/record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.get_descendants) | -| Setting single-valued [`AttributeDiscrete.value`](api/attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeDiscrete.value) to a list of strings. | Set to a string. | -| [`ParameterDefinition.type`](api/supporting.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.ParameterDefinition.type) | [`ParameterDefinition.data_type`](api/supporting.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.ParameterDefinition.data_type) and [`ParameterDefinition.restricted`](api/supporting.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.ParameterDefinition.restricted) | -| [`log_to_file_in_local_app_data()`](api/helpers.md#GRANTA_MIScriptingToolkit.granta.mi_functions.log_to_file_in_local_app_data) | Use the Python logging module. Obtain the built-in logger with the function [`get_foundation_logger()`](api/helpers.md#GRANTA_MIScriptingToolkit.granta.mi_functions.get_foundation_logger). | - - - -## Upgrading from earlier versions - -This section summarizes all the breaking changes in previous versions of MI Scripting Toolkit. - - - -### Upgrading from MI Scripting Toolkit Version 4.1 - -There are no changes required to upgrade from MI Scripting Toolkit Version 4.1. - - - -### Upgrading from MI Scripting Toolkit Version 4.0 - - - -#### Attribute Values - -* Property [`AttributeDiscrete.value`](api/attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeDiscrete.value) now validates the provided value against the attribute’s allowed - discrete values. Check [`AttributeDefinitionDiscrete.discrete_values`](api/attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinitionDiscrete.discrete_values) for available values. This validation is case-sensitive. - - - -#### Parameters - -* The attribute `parent_record` of the class [`ParameterDefinition`](api/supporting.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.ParameterDefinition) has been removed as the information is not - currently available in Scripting Toolkit. Attempting to access this attribute will raise an [`AttributeError`](https://docs.python.org/3/library/exceptions.html#AttributeError). -* The `order` and `parent_attribute` properties were previously implemented on the [`ParameterDefinition`](api/supporting.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.ParameterDefinition) - class, and so were accessible for all parameter objects. However, these properties only have meaning when requested - for an attribute parameter, and had undefined behavior for database parameters. These properties have been - moved to the [`AttributeParameter`](api/supporting.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeParameter) class. Attempting to access these properties from a - [`DatabaseParameter`](api/supporting.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.DatabaseParameter) object will raise an [`AttributeError`](https://docs.python.org/3/library/exceptions.html#AttributeError). -* It is no longer permitted to provide database or attribute parameters to [`Exporter.run_exporter()`](api/supporting.md#GRANTA_MIScriptingToolkit.granta.mi_exporters.Exporter.run_exporter). The results - of the [`Exporter.get_parameters_required_for_export()`](api/supporting.md#GRANTA_MIScriptingToolkit.granta.mi_exporters.Exporter.get_parameters_required_for_export) method must be used to specify parameter values for - export. If you do not use the results of the [`Exporter.get_parameters_required_for_export()`](api/supporting.md#GRANTA_MIScriptingToolkit.granta.mi_exporters.Exporter.get_parameters_required_for_export) method a - [`TypeError`](https://docs.python.org/3/library/exceptions.html#TypeError) will be raised. - - - -#### Unit systems and absolute temperatures - -This section describes the previous incorrect behavior and usages that are subject to behavior changes in version 4.1. - -* If the `unit_system` and `absolute_temperature` arguments were never used, the default absolute temperature was - `True`. It now defaults to `False`. -* If only the `absolute_temperature` argument was provided, it was ignored and the absolute temperature scale was - not updated on the database. -* If the `unit_system` argument was provided, it only had an effect if the provided value was not the - [`DATABASE_UNIT_SYSTEM`](api/constants.md#GRANTA_MIScriptingToolkit.granta.mi_constants.DATABASE_UNIT_SYSTEM) **and** if the provided value was different from the previously active unit system: - - | Unit system change | `absolute_temperature` provided | `absolute_temperature` not provided | - |----------------------|-----------------------------------|---------------------------------------| - | True | `absolute_temperature` respected | `absolute_temperature` set to `False` | - | False | `absolute_temperature` ignored | `absolute_temperature` unchanged | - -In version 4.1, the behavior of these methods and arguments has been fixed. - - - -### Upgrading from MI Scripting Toolkit for Python Version 3.x - - - -#### Subsets - -* If your code does not use the [`Table.subsets`](api/table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.subsets) property and the default subset in your - tables contain all records, you should see no behavior changes. *This is the most common - scenario.* -* If your code sets the [`Table.subsets`](api/table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.subsets) property to the default subset, then you should - disable this assignment from your code, since it now occurs automatically. -* If your code sets the [`Table.subsets`](api/table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.subsets) property to a non-default subset, then you should - clear the [`Table.subsets`](api/table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.subsets) property with `table_object.subsets.clear()` before setting the - non-default subset. -* If your code sets the [`Table.subsets`](api/table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.subsets) property to a set containing more than one subset and - you perform any subsequent record fetching or search operations, these operations will raise a - `ValueError`. They would previously not consider all applied subsets, and so would return - incorrect results. - - - -#### Searching and browsing for records - -* All searches except [`Database.search_for_records_by_text()`](api/database.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Database.search_for_records_by_text) now apply a subset filter when - searching. If a table included in a search has multiple applied subsets, a `ValueError` is - raised. -* The [`Table.search_for_records_where()`](api/table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.search_for_records_where) `list_of_criteria` parameter must now only contain - criteria based on pseudo-attributes and attribute definitions from the table being searched. - Otherwise a `ValueError` is raised. -* The [`Database.search_for_records_where()`](api/database.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Database.search_for_records_where) `list_of_criteria` parameter must now only - contain criteria based on pseudo-attributes and attribute definitions from at most one table - within the database being searched. Otherwise a `ValueError` is raised. -* Getting records based on the Granta MI tree is generally now subject to subset filtering. If a - table included in a record fetch operation has multiple applied subsets, a `ValueError` is - raised. - - - -#### Other changes - -* [`Session.records_from_string()`](api/session.md#GRANTA_MIScriptingToolkit.granta.mi.Session.records_from_string) now defaults to `use_strict_version=True`. -* `get_records_by_ids` and `get_record_by_id` methods on [`Session`](api/session.md#GRANTA_MIScriptingToolkit.granta.mi.Session), [`Database`](api/database.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Database), - and [`Table`](api/table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table) classes no longer accept the `identity` argument. Use `history_identity` - instead. -* [`Table.paths_from()`](api/table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.paths_from), [`Table.path_from()`](api/table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.path_from), and [`Table.get_records_from_path()`](api/table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.get_records_from_path) no - longer support `str` and [`Table`](api/table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table) inputs. Use `None` to use the table root as starting - node. All three methods now raise a `ValueError` if the record specified as `starting_node` - is not in the current table, and raise a `TypeError` if the argument value is not a - [`Record`](api/record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) or `None`. -* [`Record.color`](api/record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.color) no longer supports `str` inputs. Only [`RecordColor`](api/constants.md#GRANTA_MIScriptingToolkit.granta.mi_constants.RecordColor) objects - are supported. -* [`AttributeFunctional.add_point()`](api/attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeFunctional.add_point) and [`AttributeFunctional.add_range()`](api/attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeFunctional.add_range) methods now - raise `KeyError` exceptions if a dictionary with incorrect keys is provided. -* [`File.load()`](api/supporting.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.File.load), [`File.save()`](api/supporting.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.File.save), [`Picture.load()`](api/supporting.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.Picture.load), and [`Picture.save()`](api/supporting.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.Picture.save) no longer - accept `file_name` as an argument. Provide the full path including the file name to the `path` - argument. For file attributes, the name of the file is part of the attribute value and can be - accessed via [`AttributeFile.file_name`](api/attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeFile.file_name) or [`File.file_name`](api/supporting.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.File.file_name) to build a full path. -* `File.name` has been removed. Use [`File.file_name`](api/supporting.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.File.file_name). -* `Picture.name` has been removed. -* [`File`](api/supporting.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.File) and [`Picture`](api/supporting.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.Picture) no longer accept `name` or `load` as arguments. Provide - the full path to the file/picture (including the file name) to the keyword only argument `path`. -* [`File.description`](api/supporting.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.File.description) now only supports `str` inputs. -* [`AttributeHyperlink.object`](api/attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeHyperlink.object) no longer supports `str` inputs. Only [`Hyperlink`](api/supporting.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.Hyperlink) - objects are supported. -* Any code which performs bulk export operations on file and picture attributes should be modified - either to access the binary data with an HTTP library such as - [requests](https://pypi.org/project/requests/) or [httpx](https://pypi.org/project/httpx/). - Alternatively, the binary data can be exported directly by specifying - `include_binary_data = True` in the call to [`Table.bulk_fetch()`](api/table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.bulk_fetch). However, this is likely - to be less performant for large amounts of data. -* The `Record.id` property has been renamed to [`Record.history_identity`](api/record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.history_identity). - - - -#### AsyncJobs - -The AsyncJobQueue functionality has been moved to a new PyAnsys package called PyGranta JobQueue. -If you are using Granta MI 2024 R2 or later, you can use this package to import and export Excel -files and import text data into Granta MI. If you are using Granta MI 2024 R1 or earlier and require -Job Queue functionality, you should continue to use MI Scripting Toolkit v3.3. - - - -### Upgrading from MI Scripting Toolkit for Python Version 2.X - - - -#### New `store_password` option on the [`Session`](api/session.md#GRANTA_MIScriptingToolkit.granta.mi.Session) class - -**Old behavior:** The `password` for a [`Session`](api/session.md#GRANTA_MIScriptingToolkit.granta.mi.Session) is used to connect to Granta MI once, and cannot be stored. - -**New behavior:** The `password` assigned to a [`Session`](api/session.md#GRANTA_MIScriptingToolkit.granta.mi.Session) can be stored and used multiple times. You must -specify whether you want to store the password or not using the `store_password` property. If `store_password` is -missing, bulk operations will fail. - - - -#### AttributeValue.value property has been standardized - -| Class | Old (2.X) behavior | New (3.0) behavior | -|----------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| [`AttributePoint`](api/attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributePoint) | `.points` returns the attribute value or values as a [`list`](https://docs.python.org/3/library/stdtypes.html#list) in all cases. | [`.value`](api/attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributePoint.value) returns a [`list`](https://docs.python.org/3/library/stdtypes.html#list) of [`float`](https://docs.python.org/3/library/functions.html#float) values if the attribute is listed
as multi-valued in the schema, and a single [`float`](https://docs.python.org/3/library/functions.html#float) value if single-valued. | -| [`AttributeDiscrete`](api/attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeDiscrete) | [`.value`](api/attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeDiscrete.value) always returns a [`list`](https://docs.python.org/3/library/stdtypes.html#list), even when attribute is listed as
single-valued in the schema. | [`.value`](api/attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeDiscrete.value) returns [`list`](https://docs.python.org/3/library/stdtypes.html#list) of [`str`](https://docs.python.org/3/library/stdtypes.html#str) values if the attribute is
multi-valued, and a single [`str`](https://docs.python.org/3/library/stdtypes.html#str) value if single-valued. | -| [`AttributeFunctional`](api/attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeFunctional) | [`.value`](api/attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeValue.value) returns an instance of the class. | [`.value`](api/attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeValue.value) returns a [`list`](https://docs.python.org/3/library/stdtypes.html#list) of data values. | -| [`AttributeTabular`](api/attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeTabular) | [`.value`](api/attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeTabular.value) returns an instance of the class. | [`.value`](api/attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeTabular.value) returns a [`list`](https://docs.python.org/3/library/stdtypes.html#list) of data values for each column. | -| [`AttributeHyperlink`](api/attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeHyperlink) | [`.value`](api/attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeHyperlink.value) returns an instance of the class. | [`.value`](api/attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeHyperlink.value) returns the URL as a [`str`](https://docs.python.org/3/library/stdtypes.html#str), or [`None`](https://docs.python.org/3/library/constants.html#None) if no URL has been
set. | -| [`AttributeFile`](api/attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeFile) | [`.value`](api/attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeValue.value) returns an instance of the class. | [`.value`](api/attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeValue.value) returns binary data as a [`bytes`](https://docs.python.org/3/library/stdtypes.html#bytes) object. | -| [`AttributePicture`](api/attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributePicture) | [`.value`](api/attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeValue.value) returns an instance of the class. | [`.value`](api/attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeValue.value) returns binary data as a [`bytes`](https://docs.python.org/3/library/stdtypes.html#bytes) object. | - - - -#### Additional changes to Version 2.0 scripts - -Version 2.0 scripts may need to be modified to take account of these additional breaking changes: - -| Behavior area | Old (2.X) behavior | New (3.0) behavior | -|----------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Search return types | Text and criteria searches returned [`None`](https://docs.python.org/3/library/constants.html#None) when no results are found, whereas other methods return an empty
[`list`](https://docs.python.org/3/library/stdtypes.html#list). | All search methods return an empty [`list`](https://docs.python.org/3/library/stdtypes.html#list) when no records are found. | -| `search_for_records_by_text` return types | The session method returns an `iterator`. The database and table methods return a [`list`](https://docs.python.org/3/library/stdtypes.html#list). | All methods return a [`list`](https://docs.python.org/3/library/stdtypes.html#list). | -| [`Table.path_from()`](api/table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.path_from) record color behavior | The color of the records in the path is set to the default record color if `color` is not provided. | The color of records in the path inherits from the parent unless `color` is provided. | -| Identifying databases when both `name` and `db_key` are provided | The search stops once a unique name match is made; `db_key` is only used if the name search does not produce a
single result. | The search continues through until a database matching *both* the name *and* key is found. | -| Date data types | Dates are always handled as strings. | Dates can be provided as [`datetime.datetime`](https://docs.python.org/3/library/datetime.html#datetime.datetime) objects or [`str`](https://docs.python.org/3/library/stdtypes.html#str) objects. Dates are returned as
[`datetime.datetime`](https://docs.python.org/3/library/datetime.html#datetime.datetime) objects. | -| The `search_for_records_where` method | The `search_for_records_where` method on the [`Session`](api/session.md#GRANTA_MIScriptingToolkit.granta.mi.Session) class was available. | The `search_for_records_where` method on the [`Session`](api/session.md#GRANTA_MIScriptingToolkit.granta.mi.Session) class has been removed. | diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/copyright.md b/2026R1/scripting-toolkit-dev-portal-26-r1/copyright.md index d0d309fed8..581373642e 100644 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/copyright.md +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/copyright.md @@ -2,7 +2,7 @@ -© 2025 ANSYS, Inc. or its affiliated companies. All rights reserved +© 2026 ANSYS, Inc. or its affiliated companies. All rights reserved Ansys, Ansys Workbench, AUTODYN, CFX, FLUENT and any and all ANSYS, Inc. brand, product, service and feature names, logos and slogans are registered trademarks or trademarks of ANSYS, Inc. or its subsidiaries located in the United diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/docfx.json b/2026R1/scripting-toolkit-dev-portal-26-r1/docfx.json index 25736a07c5..b51dfcd06f 100644 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/docfx.json +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/docfx.json @@ -1,9 +1,9 @@ { "build": { "globalMetadata": { - "title": "Granta MI Scripting Toolkit 4.2", + "title": "Granta MI Scripting Toolkit 5.0", "summary": "Granta MI Scripting Toolkit documentation", - "version": "4.2", + "version": "5.0", "product": "Granta", "programming language": "Python", "physics": "Connect" diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/notebooks/data_analytics.md b/2026R1/scripting-toolkit-dev-portal-26-r1/examples/data_analytics_examples.md similarity index 100% rename from 2026R1/scripting-toolkit-dev-portal-26-r1/notebooks/data_analytics.md rename to 2026R1/scripting-toolkit-dev-portal-26-r1/examples/data_analytics_examples.md diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/examples/foundation_examples.md b/2026R1/scripting-toolkit-dev-portal-26-r1/examples/foundation_examples.md new file mode 100644 index 0000000000..d470ec31d3 --- /dev/null +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/examples/foundation_examples.md @@ -0,0 +1,13 @@ +# Foundation API example notebooks + + + +These example scripts show you how to use the foundation API to search for records, export data, and import data. All +examples use the MI Training database, available from the Ansys Download Center. + +#### WARNING +Always consult your ACE representative before using the Foundation API. See [Foundation API](../user_guide/package_overview.md#foundation-api) for more +information. + +Download all the notebooks and example files [`here`](/samples/foundation/example_files_foundation.zip), or +access individual notebooks via the links in the navigation bar on the left. diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/notebooks/index.md b/2026R1/scripting-toolkit-dev-portal-26-r1/examples/index.md similarity index 58% rename from 2026R1/scripting-toolkit-dev-portal-26-r1/notebooks/index.md rename to 2026R1/scripting-toolkit-dev-portal-26-r1/examples/index.md index 2b3dcde4e8..5e3b9718b6 100644 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/notebooks/index.md +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/examples/index.md @@ -5,17 +5,21 @@ The MI Scripting Toolkit documentation includes example notebooks that cover key features of the Python interface. These are available as HTML reference documents, Jupyter Notebook files, and Python scripts. -To install additional third-party dependencies required to run these notebooks, see [pip extras](./../getting_started/pip.md#pip-extras) and -[Additional conda dependencies](./../getting_started/conda.md#conda-extras). +* [Streamlined API example notebooks](streamlined_examples.md) provide ready-to-use sample code to help you get started with the Streamlined API. +* [Data analytics example notebooks](data_analytics_examples.md) show how to use the Streamlined API to perform common data analytics tasks. +* [Foundation API example notebooks](foundation_examples.md) show basic usage of the Foundation API. - + -## PyGranta dependencies +## Example notebook requirements + +To install additional third-party dependencies required to run these notebooks, see [pip extras](../getting_started/pip.md#pip-extras) and +[Additional conda dependencies](../getting_started/conda.md#conda-extras). The following notebooks also depend on additional PyGranta packages: -* [RecordLists and MI Scripting Toolkit](./../samples/streamlined/18_Record_Lists_Interoperability.md) requires `ansys-grantami-recordlists`. -* [JobQueue and MI Scripting Toolkit](./../samples/streamlined/19_Job_Queue_Interoperability.md) requires `ansys-grantami-jobqueue`. +* [RecordLists and MI Scripting Toolkit](../samples/streamlined/18_Record_Lists_Interoperability.md) requires `ansys-grantami-recordlists`. +* [JobQueue and MI Scripting Toolkit](../samples/streamlined/19_Job_Queue_Interoperability.md) requires `ansys-grantami-jobqueue`. PyGranta packages are not included in the `[notebooks]` extra. Use the [PyGranta and Granta MI compatibility](https://grantami.docs.pyansys.com/version/stable/package_versions.html) section of the PyGranta documentation to identify a version of a PyGranta package compatible with your version of Granta MI. diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/notebooks/stream_example.md b/2026R1/scripting-toolkit-dev-portal-26-r1/examples/streamlined_examples.md similarity index 100% rename from 2026R1/scripting-toolkit-dev-portal-26-r1/notebooks/stream_example.md rename to 2026R1/scripting-toolkit-dev-portal-26-r1/examples/streamlined_examples.md diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/foundation/api.md b/2026R1/scripting-toolkit-dev-portal-26-r1/foundation/api.md deleted file mode 100644 index 3360742728..0000000000 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/foundation/api.md +++ /dev/null @@ -1,17184 +0,0 @@ -# Foundation API reference - - - - - -## Services reference - - - - - -### BrowseService - -### *class* BrowseService(mi_session, retries=0) - -The Browse service provides read-only operation for a Granta MI Server. - -#### GetDatabases() - -List the databases available on the Granta MI Server. - -* **Return type:** - [`GetDatabasesResponse`](#module-GRANTA_MIScriptingToolkit.GetDatabasesResponse) object - -#### GetTables(\_req) - -List the tables contained in a particular Granta MI Database. - -* **Parameters:** - **\_req** ([`GetTables`](#module-GRANTA_MIScriptingToolkit.GetTables) object) -* **Return type:** - [`GetTablesResponse`](#module-GRANTA_MIScriptingToolkit.GetTablesResponse) object - -#### GetRootNode(\_req) - -Returns information about the root node of a particular Table in a Granta MI Database. This can be passed to GetChildNodes operation to find the contents of the rest of the node-tree of the Table. - -* **Parameters:** - **\_req** ([`GetRootNode`](#module-GRANTA_MIScriptingToolkit.GetRootNode) object) -* **Return type:** - [`GetRootNodeResponse`](#module-GRANTA_MIScriptingToolkit.GetRootNodeResponse) object - -#### GetChildNodes(\_req) - -Returns information about the child nodes of the given node in the node-tree of a Granta MI Table. - -* **Parameters:** - **\_req** ([`GetChildNodes`](#module-GRANTA_MIScriptingToolkit.GetChildNodes) object) -* **Return type:** - [`GetChildNodesResponse`](#module-GRANTA_MIScriptingToolkit.GetChildNodesResponse) object - -#### GetSubsets(\_req) - -List the Subsets for a Granta MI Database or for one Table in a Database. - -* **Parameters:** - **\_req** ([`GetSubsetsRequest`](#module-GRANTA_MIScriptingToolkit.GetSubsetsRequest) object) -* **Return type:** - [`GetSubsetsResponse`](#module-GRANTA_MIScriptingToolkit.GetSubsetsResponse) object - -#### GetAssociatedRecords(\_req) - -Returns all the Records, in a single target Table, that are associated with each of a given set of source Records, via Tabular Data links. These links can be in the forward or reverse direction. Note that, if there is more than one Tabular Attribute linking the source and target Tables, the Associated Records are the union of all those linked by each of the Tabular Attributes. - -* **Parameters:** - **\_req** ([`GetAssociatedRecordsRequest`](#module-GRANTA_MIScriptingToolkit.GetAssociatedRecordsRequest) object) -* **Return type:** - [`GetAssociatedRecordsResponse`](#module-GRANTA_MIScriptingToolkit.GetAssociatedRecordsResponse) object - -#### GetAttributeDetails(\_req) - -Returns detailed meta-information about given Attribute(s) in a Granta MI Database. Does not retrieve values of the Data; for that, use the DataExport service. - -* **Parameters:** - **\_req** ([`GetAttributeDetailsRequest`](#module-GRANTA_MIScriptingToolkit.GetAttributeDetailsRequest) object) -* **Return type:** - [`GetAttributeDetailsResponse`](#module-GRANTA_MIScriptingToolkit.GetAttributeDetailsResponse) object - -#### GetTreeRecords(\_req) - -Returns name, record type, and some tree information for the given record(s). Does not retrieve the tree children; for that, use the GetChildRecords operation. - -* **Parameters:** - **\_req** ([`GetTreeRecordsRequest`](#module-GRANTA_MIScriptingToolkit.GetTreeRecordsRequest) object) -* **Return type:** - [`GetTreeRecordsResponse`](#module-GRANTA_MIScriptingToolkit.GetTreeRecordsResponse) object - -#### GetRecordAttributes(\_req) - -Returns information about which Attributes have Data, for given Record(s). Includes information about when Data was created and retired, in a Version-Controlled Table. Does not retrieve values of the Data; for that, use the DataExport or EngineeringData services. - -* **Parameters:** - **\_req** ([`GetRecordAttributesRequest`](#module-GRANTA_MIScriptingToolkit.GetRecordAttributesRequest) object) -* **Return type:** - [`GetRecordAttributesResponse`](#module-GRANTA_MIScriptingToolkit.GetRecordAttributesResponse) object - -#### GetUnitSystems(\_req) - -Returns information about the unit systems known to a Granta MI Database - -* **Parameters:** - **\_req** ([`GetUnitSystems`](#module-GRANTA_MIScriptingToolkit.GetUnitSystems) object) -* **Return type:** - [`GetUnitSystemsResponse`](#module-GRANTA_MIScriptingToolkit.GetUnitSystemsResponse) object - -#### GetRecordVersions(\_req) - -Returns version information about the records specified in the request object. - -* **Parameters:** - **\_req** ([`GetRecordVersionsRequest`](#module-GRANTA_MIScriptingToolkit.GetRecordVersionsRequest) object) -* **Return type:** - [`GetRecordVersionsResponse`](#module-GRANTA_MIScriptingToolkit.GetRecordVersionsResponse) object - -#### GetRecordLinkGroups(\_req) - -Gets details of Record Link Groups in a Granta MI Database. - -* **Parameters:** - **\_req** ([`GetRecordLinkGroups`](#module-GRANTA_MIScriptingToolkit.GetRecordLinkGroups) object) -* **Return type:** - [`GetRecordLinkGroupsResponse`](#module-GRANTA_MIScriptingToolkit.GetRecordLinkGroupsResponse) object - -#### GetLinkedRecords(\_req) - -Returns the linked records for specified records, for one or more record link groups. - -* **Parameters:** - **\_req** ([`GetLinkedRecordsRequest`](#module-GRANTA_MIScriptingToolkit.GetLinkedRecordsRequest) object) -* **Return type:** - [`GetLinkedRecordsResponse`](#module-GRANTA_MIScriptingToolkit.GetLinkedRecordsResponse) object - -#### GetAttributeParameters(\_req) - -Gets detailed information about the Parameters that are declared to be usable with given Attribute(s) in a Granta MI Database. Can only be used with Functional Attributes or Multi-Valued Attributes. - -* **Parameters:** - **\_req** ([`GetAttributeParametersRequest`](#module-GRANTA_MIScriptingToolkit.GetAttributeParametersRequest) object) -* **Return type:** - [`GetAttributeParametersResponse`](#module-GRANTA_MIScriptingToolkit.GetAttributeParametersResponse) object - -#### GetParameterDetails(\_req) - -Returns detailed information about the given Parameter(s) in a Granta MI Database. - -* **Parameters:** - **\_req** ([`GetParameterDetailsRequest`](#module-GRANTA_MIScriptingToolkit.GetParameterDetailsRequest) object) -* **Return type:** - [`GetParameterDetailsResponse`](#module-GRANTA_MIScriptingToolkit.GetParameterDetailsResponse) object - -#### GetMetaAttributes(\_req) - -Returns the Meta-Attributes of one or more parent Attributes in a Table of a Granta MI Database. - -* **Parameters:** - **\_req** ([`GetMetaAttributesRequest`](#module-GRANTA_MIScriptingToolkit.GetMetaAttributesRequest) object) -* **Return type:** - [`GetMetaAttributesResponse`](#module-GRANTA_MIScriptingToolkit.GetMetaAttributesResponse) object - -#### GetDatabaseParameters(\_req) - -List the parameter(s) in a Granta MI Database. - -* **Parameters:** - **\_req** ([`GetDatabaseParameters`](#module-GRANTA_MIScriptingToolkit.GetDatabaseParameters) object) -* **Return type:** - [`GetDatabaseParametersResponse`](#module-GRANTA_MIScriptingToolkit.GetDatabaseParametersResponse) object - -#### GetIntegrationProfiles(\_req) - -List the profiles available on a Granta MI Database. - -* **Parameters:** - **\_req** ([`GetIntegrationProfiles`](#module-GRANTA_MIScriptingToolkit.GetIntegrationProfiles) object) -* **Return type:** - [`GetIntegrationProfilesResponse`](#module-GRANTA_MIScriptingToolkit.GetIntegrationProfilesResponse) object - -#### GetLayouts(\_req) - -List the Layouts for an MI Database or for one Table in a Database. - -* **Parameters:** - **\_req** ([`GetLayouts`](#module-GRANTA_MIScriptingToolkit.GetLayouts) object) -* **Return type:** - [`GetLayoutsResponse`](#module-GRANTA_MIScriptingToolkit.GetLayoutsResponse) object - -#### ResolveReferences(\_req) - -Checks whether the specified Granta MI entities exist in the database and, if so, whether the current user has read permissions or write permissions for it. - -* **Parameters:** - **\_req** ([`ResolveReferencesRequest`](#module-GRANTA_MIScriptingToolkit.ResolveReferencesRequest) object) -* **Return type:** - [`ResolveReferencesResponse`](#module-GRANTA_MIScriptingToolkit.ResolveReferencesResponse) object - -#### GetUnitConversions(\_req) - -Gets all the unit conversions available for a specified unit or unit system. - -* **Parameters:** - **\_req** ([`GetUnitConversionsRequest`](#module-GRANTA_MIScriptingToolkit.GetUnitConversionsRequest) object) -* **Return type:** - [`GetUnitConversionsResponse`](#module-GRANTA_MIScriptingToolkit.GetUnitConversionsResponse) object - -#### GetDatasheetPath(\_req) - -For each record reference gets the relative portion of an HTTP URL to a Granta MI datasheet, served by MI Viewer. - -* **Parameters:** - **\_req** ([`GetDatasheetPath`](#module-GRANTA_MIScriptingToolkit.GetDatasheetPath) object) -* **Return type:** - [`GetDatasheetPathResponse`](#module-GRANTA_MIScriptingToolkit.GetDatasheetPathResponse) object - -#### GetDatasheetPathParameterized(\_req) - -Gets information that may be used to construct an HTTP URL to a Granta MI datasheet, served by MI Viewer. - -* **Parameters:** - **\_req** ([`GetDatasheetPathParameterized`](#module-GRANTA_MIScriptingToolkit.GetDatasheetPathParameterized) object) -* **Return type:** - [`GetDatasheetPathParameterizedResponse`](#module-GRANTA_MIScriptingToolkit.GetDatasheetPathParameterizedResponse) object - -#### GetCurrencies() - -Returns the currencies available in the Granta MI Server. - -* **Return type:** - [`GetCurrenciesResponse`](#module-GRANTA_MIScriptingToolkit.GetCurrenciesResponse) object - -#### GetUnits(\_req) - -Returns information about the units known to one or more Granta MI Databases - -* **Parameters:** - **\_req** ([`GetUnits`](#module-GRANTA_MIScriptingToolkit.GetUnits) object) -* **Return type:** - [`GetUnitsResponse`](#module-GRANTA_MIScriptingToolkit.GetUnitsResponse) object - - - - - -### SearchService - -### *class* SearchService(mi_session, retries=0) - -The Search service finds Records, within Granta MI Databases, matching specified criteria. - -#### SimpleTextSearch(\_req) - -Searches for records matching simple text criteria. - -* **Parameters:** - **\_req** ([`SimpleTextSearch`](#module-GRANTA_MIScriptingToolkit.SimpleTextSearch) object) -* **Return type:** - [`SimpleTextSearchResponse`](#module-GRANTA_MIScriptingToolkit.SimpleTextSearchResponse) object - -#### CriteriaSearch(\_req) - -Searches for records matching attribute-based criteria. - -* **Parameters:** - **\_req** ([`CriteriaSearch`](#module-GRANTA_MIScriptingToolkit.CriteriaSearch) object) -* **Return type:** - [`SimpleTextSearchResponse`](#module-GRANTA_MIScriptingToolkit.SimpleTextSearchResponse) object - -#### RecordNameSearch(\_req) - -Searches for Records with a given exact Record name. - -* **Parameters:** - **\_req** ([`RecordNameSearchRequest`](#module-GRANTA_MIScriptingToolkit.RecordNameSearchRequest) object) -* **Return type:** - [`SimpleTextSearchResponse`](#module-GRANTA_MIScriptingToolkit.SimpleTextSearchResponse) object - - - - - -### DataImportService - -### *class* DataImportService(mi_session, retries=0) - -The DataImport service writes data to attributes of records in Granta MI Databases. - -#### SetRecordAttributes(\_req) - -Sets the data values for the given attribute(s) and record(s) in a Granta MI Database. This method will create any records or folders which do not already exist in the database (however, new folders should be created with ‘EnsureRecordFolderPaths’ instead). Note: This operation can accept an arbitrary number of attributes and records to be imported, but in practice there is a fairly low limit to the amount of data that can be imported in a single operation. Client code should perform large imports in small chunks. - -* **Parameters:** - **\_req** ([`SetRecordAttributesRequest`](#module-GRANTA_MIScriptingToolkit.SetRecordAttributesRequest) object) -* **Return type:** - [`SetRecordAttributesResponse`](#module-GRANTA_MIScriptingToolkit.SetRecordAttributesResponse) object - -#### ModifyRecordLinks(\_req) - -Adds or removes static Links between record(s) in a Granta MI Database. - -* **Parameters:** - **\_req** ([`ModifyRecordLinksRequest`](#module-GRANTA_MIScriptingToolkit.ModifyRecordLinksRequest) object) -* **Return type:** - [`ModifyRecordLinksResponse`](#module-GRANTA_MIScriptingToolkit.ModifyRecordLinksResponse) object - -#### GetUploadAddresses(\_req) - -Returns an address to which a datum can be uploaded, for each combination of given sets of records and attributes in a Granta MI database. Each address will be an HTTP or HTTPS URL. The upload service only supports a subset of all available Granta MI attribute types, but this operation will give an address for an attribute of any type. - -* **Parameters:** - **\_req** ([`GetUploadAddressesRequest`](#module-GRANTA_MIScriptingToolkit.GetUploadAddressesRequest) object) -* **Return type:** - [`GetUploadAddressesResponse`](#module-GRANTA_MIScriptingToolkit.GetUploadAddressesResponse) object - -#### EnsureRecordFolderPaths(\_req) - -Checks whether given hierarchies of folders exist, creating them if not. Each hierarchy is specified as a sequence of tree names; where the folder needs to be created, this name is also used as the full name of the created folder. New folders will be assigned to their parents’ subsets; existing folders are not assigned or removed from any subsets. If a colour is specified, new folders will be of that colour; existing folders’ colours are never changed. Note: this operation can accept an arbitrary number of Record Folder paths to be ensured, but in practice there is a limit to the amount of changes that can be done in a single operation. - -* **Parameters:** - **\_req** ([`EnsureRecordFolderPathsRequest`](#module-GRANTA_MIScriptingToolkit.EnsureRecordFolderPathsRequest) object) -* **Return type:** - [`EnsureRecordFolderPathsResponse`](#module-GRANTA_MIScriptingToolkit.EnsureRecordFolderPathsResponse) object - -#### DeleteOrWithdrawIfLatestRecordVersion(\_req) - -Deletes or withdraws the latest version of the specified record(s). In a version-controlled table, the latest version of a record can be seen by Write users in Edit mode of MI Viewer. This operation will revert (or delete) unreleased record versions, withdraw released versions, and skip withdrawn versions. In a non-version-controlled table, records will only have one version. This operation will delete specified records of this type. Note: this operation will only act on the latest record version. In the case where the specified record corresponds to a record version that is an earlier version, the operation will return a fault. - -* **Parameters:** - **\_req** ([`DeleteOrWithdrawIfLatestRecordVersionRequest`](#module-GRANTA_MIScriptingToolkit.DeleteOrWithdrawIfLatestRecordVersionRequest) object) -* **Return type:** - [`DeleteOrWithdrawIfLatestRecordVersionResponse`](#module-GRANTA_MIScriptingToolkit.DeleteOrWithdrawIfLatestRecordVersionResponse) object - - - - - -### DataExportService - -### *class* DataExportService(mi_session, retries=0) - -The DataExport service retrieves and returns data from attributes of records in Granta MI Databases. - -#### GetRecordAttributesByRef(\_req) - -Retrieves the data values for the given attribute(s) and record(s) in a Granta MI Database. - -* **Parameters:** - **\_req** ([`GetRecordAttributesByRefRequest`](#module-GRANTA_MIScriptingToolkit.GetRecordAttributesByRefRequest) object) -* **Return type:** - [`GetRecordAttributesByRefResponse`](#module-GRANTA_MIScriptingToolkit.GetRecordAttributesByRefResponse) object - - - - - -### EngineeringDataService - -### *class* EngineeringDataService(mi_session, retries=0) - -The EngineeringData service provides custom data export operations for a Granta MI Server. - -#### GetAvailableExporters(\_req) - -Returns the FEA Exporter configurations known to the MI Server, optionally filtering for their applicability to particular situations. - -* **Parameters:** - **\_req** ([`GetAvailableExportersRequest`](#module-GRANTA_MIScriptingToolkit.GetAvailableExportersRequest) object) -* **Return type:** - [`GetAvailableExportersResponse`](#module-GRANTA_MIScriptingToolkit.GetAvailableExportersResponse) object - -#### ExportRecordData(\_req) - -Performs an FEA Export and returns the result as the response. - -* **Parameters:** - **\_req** ([`ExportRecordDataRequest`](#module-GRANTA_MIScriptingToolkit.ExportRecordDataRequest) object) -* **Return type:** - [`ExportRecordDataResponse`](#module-GRANTA_MIScriptingToolkit.ExportRecordDataResponse) object - -#### GetExporterParameters(\_req) - -Returns information about the MI Parameter Values that will need to be chosen, to run the specified Exporter on the specified Record(s). - -* **Parameters:** - **\_req** ([`GetExporterParametersRequest`](#module-GRANTA_MIScriptingToolkit.GetExporterParametersRequest) object) -* **Return type:** - [`GetExporterParametersResponse`](#module-GRANTA_MIScriptingToolkit.GetExporterParametersResponse) object - -#### ExportersForRecords(\_req) - -Returns the FEA Exporter configurations, known to the MI Server, filtering for their applicability to given Record(s) and optionally to particular situations. - -* **Parameters:** - **\_req** ([`ExportersForRecordsRequest`](#module-GRANTA_MIScriptingToolkit.ExportersForRecordsRequest) object) -* **Return type:** - [`ExportersForRecordsResponse`](#module-GRANTA_MIScriptingToolkit.ExportersForRecordsResponse) object - - - - - -### RecordManipulatorService - -### *class* RecordManipulatorService(mi_session, retries=0) - -The Record Manipulator service provides a way to move a record whilst preserving its metadata and attribute values. - -#### MoveRecord(\_req) - -Reparents a record. Metadata such as creation date will be preserved, along with attribute values. - -* **Parameters:** - **\_req** ([`RecordMoveRequest`](#module-GRANTA_MIScriptingToolkit.RecordMoveRequest) object) -* **Return type:** - [`EmptyRestResponse`](#module-GRANTA_MIScriptingToolkit.EmptyRestResponse) object - - - -## Objects reference - - - - - -### AssociatedRecords - - - -### *class* AssociatedRecords(associatedRecords=None, sourceRecord=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Object containing a source [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) object and an array -of associated [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) objects. - -* **Parameters:** - * **associatedRecords** (list of [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference)) - * **sourceRecord** ([`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference)) - - - -#### *property* associatedRecords - -Property associatedRecords is a list of [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) - - - -#### *property* sourceRecord - -Property sourceRecord is of type [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference). - -* **Return type:** - [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### AttributeAddress - - - -### *class* AttributeAddress(URL=None, attributeID=None, attributeName=None, attributeStandardName=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -The upload URL of an attribute and an attribute identifier. -The attribute is identified by the identity, name, and where available, standard name. - -* **Parameters:** - * **URL** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **attributeID** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **attributeName** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **attributeStandardName** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* attributeID - -Property attributeID is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* attributeName - -Property attributeName is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* attributeStandardName - -Property attributeStandardName is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* URL - -Property URL is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### AttributeCategory - - - -### *class* AttributeCategory(categoryAttributeDetails=None, name=None, order=None, recordLinkGroupDetails=None, displayNames=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Gives the details of contents of a category in a layout. Does not include Tabular Data Association -Chains. - -* **Parameters:** - * **categoryAttributeDetails** (list of [`CategoryAttributeDetail`](#module-GRANTA_MIScriptingToolkit.CategoryAttributeDetail)) - * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **order** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **recordLinkGroupDetails** (list of [`RecordLinkGroupDetail`](#module-GRANTA_MIScriptingToolkit.RecordLinkGroupDetail)) - * **displayNames** (list of [`DisplayName`](#module-GRANTA_MIScriptingToolkit.DisplayName)) - - - -#### *property* categoryAttributeDetails - -Property categoryAttributeDetails is a list of [`CategoryAttributeDetail`](#module-GRANTA_MIScriptingToolkit.CategoryAttributeDetail) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`CategoryAttributeDetail`](#module-GRANTA_MIScriptingToolkit.CategoryAttributeDetail) - - - -#### *property* recordLinkGroupDetails - -Property recordLinkGroupDetails is a list of [`RecordLinkGroupDetail`](#module-GRANTA_MIScriptingToolkit.RecordLinkGroupDetail) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`RecordLinkGroupDetail`](#module-GRANTA_MIScriptingToolkit.RecordLinkGroupDetail) - - - -#### *property* displayNames - -Property displayNames is a list of [`DisplayName`](#module-GRANTA_MIScriptingToolkit.DisplayName) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`DisplayName`](#module-GRANTA_MIScriptingToolkit.DisplayName) - - - -#### *property* name - -Property name is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* order - -Property order is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### AddCategoryAttributeDetail(\_categoryAttributeDetail) - -Appends \_categoryAttributeDetail to categoryAttributeDetails property on AttributeCategory C-object. - -* **Parameters:** - **\_categoryAttributeDetail** ([`CategoryAttributeDetail`](#module-GRANTA_MIScriptingToolkit.CategoryAttributeDetail)) - - - -#### AddRecordLinkGroupDetail(\_recordLinkGroupDetail) - -Appends \_recordLinkGroupDetail to recordLinkGroupDetails property on AttributeCategory C-object. - -* **Parameters:** - **\_recordLinkGroupDetail** ([`RecordLinkGroupDetail`](#module-GRANTA_MIScriptingToolkit.RecordLinkGroupDetail)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### AttributeDetail - - - -### *class* AttributeDetail(about=None, attribute=None, axisName=None, chartable=None, databaseUnit=None, defaultThreshold=None, discreteValues=None, identity=None, isMeta=None, isMultiValued=None, isSearchable=None, isUnique=None, minMax=None, name=None, order=None, revisionInfo=None, tabular=None, type=None, isFunctionalRange=None, isOrdered=None, displayNames=None, helpInfo=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Detailed meta-information about an attribute in a Granta MI database. -Does not include values of the attribute. For requests, the name, and type are required. - -* **Parameters:** - * **about** ([`NamedAttribute`](#module-GRANTA_MIScriptingToolkit.NamedAttribute)) - * **attribute** ([`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference)) - * **axisName** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **chartable** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **databaseUnit** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **defaultThreshold** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **discreteValues** ([*list*](https://docs.python.org/3/library/stdtypes.html#list) *of* [*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **identity** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **isMeta** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **isMultiValued** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **isSearchable** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **isUnique** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **minMax** ([`MinMax`](#module-GRANTA_MIScriptingToolkit.MinMax)) - * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **order** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **revisionInfo** ([`RevisionInfo`](#module-GRANTA_MIScriptingToolkit.RevisionInfo)) - * **tabular** ([`TabularDetail`](#module-GRANTA_MIScriptingToolkit.TabularDetail)) - * **type** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **isFunctionalRange** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **isOrdered** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **displayNames** (list of [`DisplayName`](#module-GRANTA_MIScriptingToolkit.DisplayName)) - * **helpInfo** ([`HelpInfo`](#module-GRANTA_MIScriptingToolkit.HelpInfo)) - - - -#### *property* about - -Property about is of type [`NamedAttribute`](#module-GRANTA_MIScriptingToolkit.NamedAttribute). Only populated if ‘isMeta’ is True. - -* **Return type:** - [`NamedAttribute`](#module-GRANTA_MIScriptingToolkit.NamedAttribute) - - - -#### *property* attribute - -Property attribute is of type [`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference). - -* **Return type:** - [`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference) - - - -#### *property* axisName - -Property axisName is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* chartable - -Property chartable is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* databaseUnit - -Property databaseUnit is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* defaultThreshold - -Property defaultThreshold is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* discreteValues - -Property discreteValues is a list of str objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - [list](https://docs.python.org/3/library/stdtypes.html#list) of [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* displayNames - -Property displayNames is a list of [`DisplayName`](#module-GRANTA_MIScriptingToolkit.DisplayName) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`DisplayName`](#module-GRANTA_MIScriptingToolkit.DisplayName) - - - -#### *property* helpInfo - -Property helpInfo is of type [`HelpInfo`](#module-GRANTA_MIScriptingToolkit.HelpInfo). - -* **Return type:** - [`HelpInfo`](#module-GRANTA_MIScriptingToolkit.HelpInfo) - - - -#### *property* identity - -Property identity is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* isFunctionalRange - -Property isFunctionalRange is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* isMeta - -Property isMeta is of type bool. If this is True, the ‘about’ property may have additional information about the related parent attribute. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* isMultiValued - -Property isMultiValued is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* isOrdered - -Property isOrdered is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* isSearchable - -Property isSearchable is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* isUnique - -Property isUnique is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* minMax - -Property minMax is of type [`MinMax`](#module-GRANTA_MIScriptingToolkit.MinMax). - -* **Return type:** - [`MinMax`](#module-GRANTA_MIScriptingToolkit.MinMax) - - - -#### *property* name - -Property name is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* order - -Property order is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* revisionInfo - -Property revisionInfo is of type [`RevisionInfo`](#module-GRANTA_MIScriptingToolkit.RevisionInfo). - -* **Return type:** - [`RevisionInfo`](#module-GRANTA_MIScriptingToolkit.RevisionInfo) - - - -#### *property* tabular - -Property tabular is of type [`TabularDetail`](#module-GRANTA_MIScriptingToolkit.TabularDetail). - -* **Return type:** - [`TabularDetail`](#module-GRANTA_MIScriptingToolkit.TabularDetail) - - - -#### *property* type - -Property type is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### AttributeExporterParameters - - - -### *class* AttributeExporterParameters(attribute=None, dataPresence=None, graphDomains=None, parameters=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -A type to contain an attribute along with associated parameters and domains. -All [`Parameters`](#module-GRANTA_MIScriptingToolkit.Parameters) are declared on the MI parameterised Attribute, -even if not used in some combination of [`Exporter`](#module-GRANTA_MIScriptingToolkit.Exporter) and Record. It -also contains the possible domains in which the fixed Parameter values must be chosen. - -* **Parameters:** - * **attribute** ([`NamedAttribute`](#module-GRANTA_MIScriptingToolkit.NamedAttribute)) - * **dataPresence** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **graphDomains** (list of [`GraphDomain`](#module-GRANTA_MIScriptingToolkit.GraphDomain)) - * **parameters** (list of [`ExporterParameter`](#module-GRANTA_MIScriptingToolkit.ExporterParameter)) - - - -#### *class* DataPresence - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - - - -#### Unknown *= 0* - - - -#### Present *= 1* - - - -#### NotApplicable *= 2* - - - -#### Missing *= 3* - - - -#### DataIncompatibleWithConfiguration *= 4* - - - -#### *property* graphDomains - -Property graphDomains is a list of [`GraphDomain`](#module-GRANTA_MIScriptingToolkit.GraphDomain) objects. Each graph domain contains information on the possible values that the corresponding parameter (by list index) can take. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`GraphDomain`](#module-GRANTA_MIScriptingToolkit.GraphDomain) - - - -#### *property* parameters - -Property parameters is a list of [`ExporterParameter`](#module-GRANTA_MIScriptingToolkit.ExporterParameter) objects. This is a list of parameters that parameterize the attribute in question. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`ExporterParameter`](#module-GRANTA_MIScriptingToolkit.ExporterParameter) - - - -#### *property* attribute - -Property attribute is of type [`NamedAttribute`](#module-GRANTA_MIScriptingToolkit.NamedAttribute). - -* **Return type:** - [`NamedAttribute`](#module-GRANTA_MIScriptingToolkit.NamedAttribute) - - - -#### *property* dataPresence - -Property dataPresence is of type int. See [`AttributeExporterParameters.DataPresence`](#GRANTA_MIScriptingToolkit.AttributeExporterParameters.AttributeExporterParameters.DataPresence) for supported values. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### AddGraphDomain(\_graphDomain) - -Appends \_graphDomain to graphDomains property on AttributeExporterParameters C-object. - -* **Parameters:** - **\_graphDomain** ([`GraphDomain`](#module-GRANTA_MIScriptingToolkit.GraphDomain)) - - - -#### AddParameter(\_exporterParameter) - -Appends \_exporterParameter to parameters property on AttributeExporterParameters C-object. - -* **Parameters:** - **\_exporterParameter** ([`ExporterParameter`](#module-GRANTA_MIScriptingToolkit.ExporterParameter)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### AttributeMetaAttributes - - - -### *class* AttributeMetaAttributes(metaAttributes=None, parentAttribute=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Lists the Meta-Attributes of a particular Attribute in a Granta MI Database Table. - -* **Parameters:** - * **metaAttributes** (list of [`NamedAttribute`](#module-GRANTA_MIScriptingToolkit.NamedAttribute)) - * **parentAttribute** ([`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference)) - - - -#### *property* metaAttributes - -Property metaAttributes is a list of [`NamedAttribute`](#module-GRANTA_MIScriptingToolkit.NamedAttribute) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`NamedAttribute`](#module-GRANTA_MIScriptingToolkit.NamedAttribute) - - - -#### *property* parentAttribute - -Property parentAttribute is of type [`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference). - -* **Return type:** - [`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### AttributeReference - - - -### *class* AttributeReference(DBKey=None, attributeID=None, isStandardName=None, name=None, partialTableReference=None, pseudoAttribute=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Identification of a particular attribute in a Granta MI database. -For requests, a DBKey is required and either the attribute ID or the attribute name. If the name is -not a standard name, then a [`PartialTableReference`](#module-GRANTA_MIScriptingToolkit.PartialTableReference) is also -required. - -* **Parameters:** - * **DBKey** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **attributeID** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **isStandardName** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **partialTableReference** ([`PartialTableReference`](#module-GRANTA_MIScriptingToolkit.PartialTableReference)) - * **pseudoAttribute** ([*int*](https://docs.python.org/3/library/functions.html#int)) - - - -#### *class* MIPseudoAttributeReference - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - - - -#### name *= 0* - - - -#### shortName *= 1* - - - -#### subsets *= 2* - - - -#### releasedDate *= 3* - - - -#### modifiedDate *= 4* - - - -#### recordType *= 5* - - - -#### recordHistoryIdentity *= 6* - - - -#### recordColor *= 7* - - - -#### recordGUID *= 10* - - - -#### recordHistoryGUID *= 11* - - - -#### recordVersionNumber *= 12* - - - -#### tableName *= 13* - - - -#### writable *= 16* - - - -#### parentName *= 17* - - - -#### parentShortName *= 18* - - - -#### parentRecordHistoryIdentity *= 19* - - - -#### parentRecordHistoryGUID *= 20* - - - -#### createdDate *= 21* - - - -#### creator *= 22* - - - -#### lastModifier *= 23* - - - -#### *property* attributeID - -Property attributeID is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* DBKey - -Property DBKey is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* isStandardName - -Property isStandardName is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* name - -Property name is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* partialTableReference - -Property partialTableReference is of type [`PartialTableReference`](#module-GRANTA_MIScriptingToolkit.PartialTableReference). - -* **Return type:** - [`PartialTableReference`](#module-GRANTA_MIScriptingToolkit.PartialTableReference) - - - -#### *property* pseudoAttribute - -Property pseudoAttribute is of type int. See [`AttributeReference.MIPseudoAttributeReference`](#GRANTA_MIScriptingToolkit.AttributeReference.AttributeReference.MIPseudoAttributeReference) for supported values. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### AttributeValue - - - -### *class* AttributeValue(attributeID=None, attributeName=None, attributeStandardName=None, dataType=None, dateDataType=None, dateTimeDataType=None, discreteDataValue=None, fileDataType=None, floatFunctionalGriddedDataType=None, floatFunctionalSeriesDataType=None, hyperlinkDataValue=None, integerDataValue=None, logicalDataValue=None, longTextDataType=None, pictureDataType=None, pointDataType=None, rangeDataType=None, shortTextDataType=None, subsetsDataType=None, tabularDataType=None, discreteFunctionalGriddedDataType=None, discreteFunctionalSeriesDataType=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Type representing the value of a piece of data for a particular attribute. Access supported data -types, and the attribute identity by Name, ID, or Standard Name. - -* **Parameters:** - * **attributeID** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **attributeName** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **attributeStandardName** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **dataType** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **dateDataType** ([`DateDataType`](#module-GRANTA_MIScriptingToolkit.DateDataType)) - * **dateTimeDataType** ([`DateTimeDataType`](#module-GRANTA_MIScriptingToolkit.DateTimeDataType)) - * **discreteDataValue** ([`DiscreteDataType`](#module-GRANTA_MIScriptingToolkit.DiscreteDataType)) - * **fileDataType** ([`FileDataType`](#module-GRANTA_MIScriptingToolkit.FileDataType)) - * **floatFunctionalGriddedDataType** ([`FloatFunctionalGriddedDataType`](#module-GRANTA_MIScriptingToolkit.FloatFunctionalGriddedDataType)) - * **floatFunctionalSeriesDataType** ([`FloatFunctionalSeriesDataType`](#module-GRANTA_MIScriptingToolkit.FloatFunctionalSeriesDataType)) - * **hyperlinkDataValue** ([`HyperlinkDataType`](#module-GRANTA_MIScriptingToolkit.HyperlinkDataType)) - * **integerDataValue** ([`IntegerDataType`](#module-GRANTA_MIScriptingToolkit.IntegerDataType)) - * **logicalDataValue** ([`LogicalDataType`](#module-GRANTA_MIScriptingToolkit.LogicalDataType)) - * **longTextDataType** ([`LongTextDataType`](#module-GRANTA_MIScriptingToolkit.LongTextDataType)) - * **pictureDataType** ([`PictureDataType`](#module-GRANTA_MIScriptingToolkit.PictureDataType)) - * **pointDataType** ([`PointDataType`](#module-GRANTA_MIScriptingToolkit.PointDataType)) - * **rangeDataType** ([`RangeDataType`](#module-GRANTA_MIScriptingToolkit.RangeDataType)) - * **shortTextDataType** ([`ShortTextDataType`](#module-GRANTA_MIScriptingToolkit.ShortTextDataType)) - * **subsetsDataType** ([`SubsetsDataType`](#module-GRANTA_MIScriptingToolkit.SubsetsDataType)) - * **tabularDataType** ([`TabularDataType`](#module-GRANTA_MIScriptingToolkit.TabularDataType)) - * **discreteFunctionalGriddedDataType** ([`DiscreteFunctionalGriddedDataType`](#module-GRANTA_MIScriptingToolkit.DiscreteFunctionalGriddedDataType)) - * **discreteFunctionalSeriesDataType** ([`DiscreteFunctionalSeriesDataType`](#module-GRANTA_MIScriptingToolkit.DiscreteFunctionalSeriesDataType)) - - - -#### *property* attributeID - -Property attributeID is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* attributeName - -Property attributeName is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* attributeStandardName - -Property attributeStandardName is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* dataType - -Property dataType is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* dateDataType - -Property dateDataType is of type [`DateDataType`](#module-GRANTA_MIScriptingToolkit.DateDataType). - -* **Return type:** - [`DateDataType`](#module-GRANTA_MIScriptingToolkit.DateDataType) - - - -#### *property* dateTimeDataType - -Property dateTimeDataType is of type [`DateTimeDataType`](#module-GRANTA_MIScriptingToolkit.DateTimeDataType). - -* **Return type:** - [`DateTimeDataType`](#module-GRANTA_MIScriptingToolkit.DateTimeDataType) - - - -#### *property* discreteDataValue - -Property discreteDataValue is of type [`DiscreteDataType`](#module-GRANTA_MIScriptingToolkit.DiscreteDataType). - -* **Return type:** - [`DiscreteDataType`](#module-GRANTA_MIScriptingToolkit.DiscreteDataType) - - - -#### *property* discreteFunctionalGriddedDataType - -Property discreteFunctionalGriddedDataType is of type [`DiscreteFunctionalGriddedDataType`](#module-GRANTA_MIScriptingToolkit.DiscreteFunctionalGriddedDataType). - -* **Return type:** - [`DiscreteFunctionalGriddedDataType`](#module-GRANTA_MIScriptingToolkit.DiscreteFunctionalGriddedDataType) - - - -#### *property* discreteFunctionalSeriesDataType - -Property discreteFunctionalSeriesDataType is of type [`DiscreteFunctionalSeriesDataType`](#module-GRANTA_MIScriptingToolkit.DiscreteFunctionalSeriesDataType). - -* **Return type:** - [`DiscreteFunctionalSeriesDataType`](#module-GRANTA_MIScriptingToolkit.DiscreteFunctionalSeriesDataType) - - - -#### *property* fileDataType - -Property fileDataType is of type [`FileDataType`](#module-GRANTA_MIScriptingToolkit.FileDataType). - -* **Return type:** - [`FileDataType`](#module-GRANTA_MIScriptingToolkit.FileDataType) - - - -#### *property* floatFunctionalGriddedDataType - -Property floatFunctionalGriddedDataType is of type [`FloatFunctionalGriddedDataType`](#module-GRANTA_MIScriptingToolkit.FloatFunctionalGriddedDataType). - -* **Return type:** - [`FloatFunctionalGriddedDataType`](#module-GRANTA_MIScriptingToolkit.FloatFunctionalGriddedDataType) - - - -#### *property* floatFunctionalSeriesDataType - -Property floatFunctionalSeriesDataType is of type [`FloatFunctionalSeriesDataType`](#module-GRANTA_MIScriptingToolkit.FloatFunctionalSeriesDataType). - -* **Return type:** - [`FloatFunctionalSeriesDataType`](#module-GRANTA_MIScriptingToolkit.FloatFunctionalSeriesDataType) - - - -#### *property* hyperlinkDataValue - -Property hyperlinkDataValue is of type [`HyperlinkDataType`](#module-GRANTA_MIScriptingToolkit.HyperlinkDataType). - -* **Return type:** - [`HyperlinkDataType`](#module-GRANTA_MIScriptingToolkit.HyperlinkDataType) - - - -#### *property* integerDataValue - -Property integerDataValue is of type [`IntegerDataType`](#module-GRANTA_MIScriptingToolkit.IntegerDataType). - -* **Return type:** - [`IntegerDataType`](#module-GRANTA_MIScriptingToolkit.IntegerDataType) - - - -#### *property* logicalDataValue - -Property logicalDataValue is of type [`LogicalDataType`](#module-GRANTA_MIScriptingToolkit.LogicalDataType). - -* **Return type:** - [`LogicalDataType`](#module-GRANTA_MIScriptingToolkit.LogicalDataType) - - - -#### *property* longTextDataType - -Property longTextDataType is of type [`LongTextDataType`](#module-GRANTA_MIScriptingToolkit.LongTextDataType). - -* **Return type:** - [`LongTextDataType`](#module-GRANTA_MIScriptingToolkit.LongTextDataType) - - - -#### *property* pictureDataType - -Property pictureDataType is of type [`PictureDataType`](#module-GRANTA_MIScriptingToolkit.PictureDataType). - -* **Return type:** - [`PictureDataType`](#module-GRANTA_MIScriptingToolkit.PictureDataType) - - - -#### *property* pointDataType - -Property pointDataType is of type [`PointDataType`](#module-GRANTA_MIScriptingToolkit.PointDataType). - -* **Return type:** - [`PointDataType`](#module-GRANTA_MIScriptingToolkit.PointDataType) - - - -#### *property* rangeDataType - -Property rangeDataType is of type [`RangeDataType`](#module-GRANTA_MIScriptingToolkit.RangeDataType). - -* **Return type:** - [`RangeDataType`](#module-GRANTA_MIScriptingToolkit.RangeDataType) - - - -#### *property* shortTextDataType - -Property shortTextDataType is of type [`ShortTextDataType`](#module-GRANTA_MIScriptingToolkit.ShortTextDataType). - -* **Return type:** - [`ShortTextDataType`](#module-GRANTA_MIScriptingToolkit.ShortTextDataType) - - - -#### *property* subsetsDataType - -Property subsetsDataType is of type [`SubsetsDataType`](#module-GRANTA_MIScriptingToolkit.SubsetsDataType). - -* **Return type:** - [`SubsetsDataType`](#module-GRANTA_MIScriptingToolkit.SubsetsDataType) - - - -#### *property* tabularDataType - -Property tabularDataType is of type [`TabularDataType`](#module-GRANTA_MIScriptingToolkit.TabularDataType). - -* **Return type:** - [`TabularDataType`](#module-GRANTA_MIScriptingToolkit.TabularDataType) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### BetweenDateTimesSearchValue - - - -### *class* BetweenDateTimesSearchValue(highEnd=None, lowEnd=None, tabularColumn=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Search criterion to search for data between two times. -This criterion type is specific to DateTime Attributes. Both a LowEnd and a HighEnd value are -required. The date format is in XSD’s dateTime data type (YYYY-MM-DDThh:mm:ss). - -* **Parameters:** - * **highEnd** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **lowEnd** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **tabularColumn** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* highEnd - -Property highEnd is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* lowEnd - -Property lowEnd is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* tabularColumn - -Property tabularColumn is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### BetweenSearchValue - - - -### *class* BetweenSearchValue(highEnd=None, lowEnd=None, tabularColumn=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Search criterion to search for data between two values. -Only Point, Range, and Integer attributes are supported by this search criteria. Both a LowEnd and a -HighEnd value are required. - -* **Parameters:** - * **highEnd** ([`HighEndSearchValue`](#module-GRANTA_MIScriptingToolkit.HighEndSearchValue)) - * **lowEnd** ([`LowEndSearchValue`](#module-GRANTA_MIScriptingToolkit.LowEndSearchValue)) - * **tabularColumn** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* highEnd - -Property highEnd is of type [`HighEndSearchValue`](#module-GRANTA_MIScriptingToolkit.HighEndSearchValue). - -* **Return type:** - [`HighEndSearchValue`](#module-GRANTA_MIScriptingToolkit.HighEndSearchValue) - - - -#### *property* lowEnd - -Property lowEnd is of type [`LowEndSearchValue`](#module-GRANTA_MIScriptingToolkit.LowEndSearchValue). - -* **Return type:** - [`LowEndSearchValue`](#module-GRANTA_MIScriptingToolkit.LowEndSearchValue) - - - -#### *property* tabularColumn - -Property tabularColumn is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### BinaryDataSettings - - - -### *class* BinaryDataSettings(binaryDataRepresentation=None, maxImageSize=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Settings for exporting file and picture data. - -* **Parameters:** - * **binaryDataRepresentation** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **maxImageSize** ([`RasterSize`](#module-GRANTA_MIScriptingToolkit.RasterSize)) - - - -#### *property* binaryDataRepresentation - -Property binaryDataRepresentation is of type int. See [`GRANTA_Constants`](#module-GRANTA_MIScriptingToolkit.GRANTA_Constants) for supported values. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* maxImageSize - -Property maxImageSize is of type [`RasterSize`](#module-GRANTA_MIScriptingToolkit.RasterSize). - -* **Return type:** - [`RasterSize`](#module-GRANTA_MIScriptingToolkit.RasterSize) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - -### BrowseService - - - - - -### *class* BrowseService(mi_session, retries=0) - -Bases: [`Service`](#GRANTA_MIScriptingToolkit.Service.Service) - -The Browse service provides read-only operation for a Granta MI Server. - - - -#### GetDatabases() - -List the databases available on the Granta MI Server. - -* **Return type:** - [`GetDatabasesResponse`](#module-GRANTA_MIScriptingToolkit.GetDatabasesResponse) object - - - -#### GetTables(\_req) - -List the tables contained in a particular Granta MI Database. - -* **Parameters:** - **\_req** ([`GetTables`](#module-GRANTA_MIScriptingToolkit.GetTables) object) -* **Return type:** - [`GetTablesResponse`](#module-GRANTA_MIScriptingToolkit.GetTablesResponse) object - - - -#### GetRootNode(\_req) - -Returns information about the root node of a particular Table in a Granta MI Database. This can be passed to GetChildNodes operation to find the contents of the rest of the node-tree of the Table. - -* **Parameters:** - **\_req** ([`GetRootNode`](#module-GRANTA_MIScriptingToolkit.GetRootNode) object) -* **Return type:** - [`GetRootNodeResponse`](#module-GRANTA_MIScriptingToolkit.GetRootNodeResponse) object - - - -#### GetChildNodes(\_req) - -Returns information about the child nodes of the given node in the node-tree of a Granta MI Table. - -* **Parameters:** - **\_req** ([`GetChildNodes`](#module-GRANTA_MIScriptingToolkit.GetChildNodes) object) -* **Return type:** - [`GetChildNodesResponse`](#module-GRANTA_MIScriptingToolkit.GetChildNodesResponse) object - - - -#### GetSubsets(\_req) - -List the Subsets for a Granta MI Database or for one Table in a Database. - -* **Parameters:** - **\_req** ([`GetSubsetsRequest`](#module-GRANTA_MIScriptingToolkit.GetSubsetsRequest) object) -* **Return type:** - [`GetSubsetsResponse`](#module-GRANTA_MIScriptingToolkit.GetSubsetsResponse) object - - - -#### GetAssociatedRecords(\_req) - -Returns all the Records, in a single target Table, that are associated with each of a given set of source Records, via Tabular Data links. These links can be in the forward or reverse direction. Note that, if there is more than one Tabular Attribute linking the source and target Tables, the Associated Records are the union of all those linked by each of the Tabular Attributes. - -* **Parameters:** - **\_req** ([`GetAssociatedRecordsRequest`](#module-GRANTA_MIScriptingToolkit.GetAssociatedRecordsRequest) object) -* **Return type:** - [`GetAssociatedRecordsResponse`](#module-GRANTA_MIScriptingToolkit.GetAssociatedRecordsResponse) object - - - -#### GetAttributeDetails(\_req) - -Returns detailed meta-information about given Attribute(s) in a Granta MI Database. Does not retrieve values of the Data; for that, use the DataExport service. - -* **Parameters:** - **\_req** ([`GetAttributeDetailsRequest`](#module-GRANTA_MIScriptingToolkit.GetAttributeDetailsRequest) object) -* **Return type:** - [`GetAttributeDetailsResponse`](#module-GRANTA_MIScriptingToolkit.GetAttributeDetailsResponse) object - - - -#### GetTreeRecords(\_req) - -Returns name, record type, and some tree information for the given record(s). Does not retrieve the tree children; for that, use the GetChildRecords operation. - -* **Parameters:** - **\_req** ([`GetTreeRecordsRequest`](#module-GRANTA_MIScriptingToolkit.GetTreeRecordsRequest) object) -* **Return type:** - [`GetTreeRecordsResponse`](#module-GRANTA_MIScriptingToolkit.GetTreeRecordsResponse) object - - - -#### GetRecordAttributes(\_req) - -Returns information about which Attributes have Data, for given Record(s). Includes information about when Data was created and retired, in a Version-Controlled Table. Does not retrieve values of the Data; for that, use the DataExport or EngineeringData services. - -* **Parameters:** - **\_req** ([`GetRecordAttributesRequest`](#module-GRANTA_MIScriptingToolkit.GetRecordAttributesRequest) object) -* **Return type:** - [`GetRecordAttributesResponse`](#module-GRANTA_MIScriptingToolkit.GetRecordAttributesResponse) object - - - -#### GetUnitSystems(\_req) - -Returns information about the unit systems known to a Granta MI Database - -* **Parameters:** - **\_req** ([`GetUnitSystems`](#module-GRANTA_MIScriptingToolkit.GetUnitSystems) object) -* **Return type:** - [`GetUnitSystemsResponse`](#module-GRANTA_MIScriptingToolkit.GetUnitSystemsResponse) object - - - -#### GetRecordVersions(\_req) - -Returns version information about the records specified in the request object. - -* **Parameters:** - **\_req** ([`GetRecordVersionsRequest`](#module-GRANTA_MIScriptingToolkit.GetRecordVersionsRequest) object) -* **Return type:** - [`GetRecordVersionsResponse`](#module-GRANTA_MIScriptingToolkit.GetRecordVersionsResponse) object - - - -#### GetRecordLinkGroups(\_req) - -Gets details of Record Link Groups in a Granta MI Database. - -* **Parameters:** - **\_req** ([`GetRecordLinkGroups`](#module-GRANTA_MIScriptingToolkit.GetRecordLinkGroups) object) -* **Return type:** - [`GetRecordLinkGroupsResponse`](#module-GRANTA_MIScriptingToolkit.GetRecordLinkGroupsResponse) object - - - -#### GetLinkedRecords(\_req) - -Returns the linked records for specified records, for one or more record link groups. - -* **Parameters:** - **\_req** ([`GetLinkedRecordsRequest`](#module-GRANTA_MIScriptingToolkit.GetLinkedRecordsRequest) object) -* **Return type:** - [`GetLinkedRecordsResponse`](#module-GRANTA_MIScriptingToolkit.GetLinkedRecordsResponse) object - - - -#### GetAttributeParameters(\_req) - -Gets detailed information about the Parameters that are declared to be usable with given Attribute(s) in a Granta MI Database. Can only be used with Functional Attributes or Multi-Valued Attributes. - -* **Parameters:** - **\_req** ([`GetAttributeParametersRequest`](#module-GRANTA_MIScriptingToolkit.GetAttributeParametersRequest) object) -* **Return type:** - [`GetAttributeParametersResponse`](#module-GRANTA_MIScriptingToolkit.GetAttributeParametersResponse) object - - - -#### GetParameterDetails(\_req) - -Returns detailed information about the given Parameter(s) in a Granta MI Database. - -* **Parameters:** - **\_req** ([`GetParameterDetailsRequest`](#module-GRANTA_MIScriptingToolkit.GetParameterDetailsRequest) object) -* **Return type:** - [`GetParameterDetailsResponse`](#module-GRANTA_MIScriptingToolkit.GetParameterDetailsResponse) object - - - -#### GetMetaAttributes(\_req) - -Returns the Meta-Attributes of one or more parent Attributes in a Table of a Granta MI Database. - -* **Parameters:** - **\_req** ([`GetMetaAttributesRequest`](#module-GRANTA_MIScriptingToolkit.GetMetaAttributesRequest) object) -* **Return type:** - [`GetMetaAttributesResponse`](#module-GRANTA_MIScriptingToolkit.GetMetaAttributesResponse) object - - - -#### GetDatabaseParameters(\_req) - -List the parameter(s) in a Granta MI Database. - -* **Parameters:** - **\_req** ([`GetDatabaseParameters`](#module-GRANTA_MIScriptingToolkit.GetDatabaseParameters) object) -* **Return type:** - [`GetDatabaseParametersResponse`](#module-GRANTA_MIScriptingToolkit.GetDatabaseParametersResponse) object - - - -#### GetIntegrationProfiles(\_req) - -List the profiles available on a Granta MI Database. - -* **Parameters:** - **\_req** ([`GetIntegrationProfiles`](#module-GRANTA_MIScriptingToolkit.GetIntegrationProfiles) object) -* **Return type:** - [`GetIntegrationProfilesResponse`](#module-GRANTA_MIScriptingToolkit.GetIntegrationProfilesResponse) object - - - -#### GetLayouts(\_req) - -List the Layouts for an MI Database or for one Table in a Database. - -* **Parameters:** - **\_req** ([`GetLayouts`](#module-GRANTA_MIScriptingToolkit.GetLayouts) object) -* **Return type:** - [`GetLayoutsResponse`](#module-GRANTA_MIScriptingToolkit.GetLayoutsResponse) object - - - -#### ResolveReferences(\_req) - -Checks whether the specified Granta MI entities exist in the database and, if so, whether the current user has read permissions or write permissions for it. - -* **Parameters:** - **\_req** ([`ResolveReferencesRequest`](#module-GRANTA_MIScriptingToolkit.ResolveReferencesRequest) object) -* **Return type:** - [`ResolveReferencesResponse`](#module-GRANTA_MIScriptingToolkit.ResolveReferencesResponse) object - - - -#### GetUnitConversions(\_req) - -Gets all the unit conversions available for a specified unit or unit system. - -* **Parameters:** - **\_req** ([`GetUnitConversionsRequest`](#module-GRANTA_MIScriptingToolkit.GetUnitConversionsRequest) object) -* **Return type:** - [`GetUnitConversionsResponse`](#module-GRANTA_MIScriptingToolkit.GetUnitConversionsResponse) object - - - -#### GetDatasheetPath(\_req) - -For each record reference gets the relative portion of an HTTP URL to a Granta MI datasheet, served by MI Viewer. - -* **Parameters:** - **\_req** ([`GetDatasheetPath`](#module-GRANTA_MIScriptingToolkit.GetDatasheetPath) object) -* **Return type:** - [`GetDatasheetPathResponse`](#module-GRANTA_MIScriptingToolkit.GetDatasheetPathResponse) object - - - -#### GetDatasheetPathParameterized(\_req) - -Gets information that may be used to construct an HTTP URL to a Granta MI datasheet, served by MI Viewer. - -* **Parameters:** - **\_req** ([`GetDatasheetPathParameterized`](#module-GRANTA_MIScriptingToolkit.GetDatasheetPathParameterized) object) -* **Return type:** - [`GetDatasheetPathParameterizedResponse`](#module-GRANTA_MIScriptingToolkit.GetDatasheetPathParameterizedResponse) object - - - -#### GetCurrencies() - -Returns the currencies available in the Granta MI Server. - -* **Return type:** - [`GetCurrenciesResponse`](#module-GRANTA_MIScriptingToolkit.GetCurrenciesResponse) object - - - -#### GetUnits(\_req) - -Returns information about the units known to one or more Granta MI Databases - -* **Parameters:** - **\_req** ([`GetUnits`](#module-GRANTA_MIScriptingToolkit.GetUnits) object) -* **Return type:** - [`GetUnitsResponse`](#module-GRANTA_MIScriptingToolkit.GetUnitsResponse) object - - - - - -### CategoryAttributeDetail - - - -### *class* CategoryAttributeDetail(about=None, attribute=None, axisName=None, chartable=None, databaseUnit=None, defaultThreshold=None, discreteValues=None, helpInfo=None, identity=None, isMeta=None, isMultiValued=None, isReadOnly=None, isRequired=None, isSearchable=None, name=None, order=None, revisionInfo=None, type=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Gives the attribute details with a client read only and is required flag. - -* **Parameters:** - * **about** ([`NamedAttribute`](#module-GRANTA_MIScriptingToolkit.NamedAttribute)) - * **attribute** ([`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference)) - * **axisName** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **chartable** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **databaseUnit** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **defaultThreshold** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **discreteValues** ([*list*](https://docs.python.org/3/library/stdtypes.html#list) *of* [*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **helpInfo** ([`HelpInfo`](#module-GRANTA_MIScriptingToolkit.HelpInfo)) - * **identity** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **isMeta** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **isMultiValued** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **isReadOnly** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **isRequired** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **isSearchable** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **order** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **revisionInfo** ([`RevisionInfo`](#module-GRANTA_MIScriptingToolkit.RevisionInfo)) - * **type** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* about - -Property about is of type [`NamedAttribute`](#module-GRANTA_MIScriptingToolkit.NamedAttribute). - -* **Return type:** - [`NamedAttribute`](#module-GRANTA_MIScriptingToolkit.NamedAttribute) - - - -#### *property* attribute - -Property attribute is of type [`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference). - -* **Return type:** - [`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference) - - - -#### *property* axisName - -Property axisName is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* chartable - -Property chartable is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* databaseUnit - -Property databaseUnit is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* defaultThreshold - -Property defaultThreshold is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* discreteValues - -Property discreteValues is a list of str objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - [list](https://docs.python.org/3/library/stdtypes.html#list) of [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* helpInfo - -Property helpInfo is of type [`HelpInfo`](#module-GRANTA_MIScriptingToolkit.HelpInfo). - -* **Return type:** - [`HelpInfo`](#module-GRANTA_MIScriptingToolkit.HelpInfo) - - - -#### *property* identity - -Property identity is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* isMeta - -Property isMeta is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* isMultiValued - -Property isMultiValued is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* isReadOnly - -Property isReadOnly is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* isRequired - -Property isRequired is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* isSearchable - -Property isSearchable is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* name - -Property name is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* order - -Property order is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* revisionInfo - -Property revisionInfo is of type [`RevisionInfo`](#module-GRANTA_MIScriptingToolkit.RevisionInfo). - -* **Return type:** - [`RevisionInfo`](#module-GRANTA_MIScriptingToolkit.RevisionInfo) - - - -#### *property* type - -Property type is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### Constraint - - - -### *class* Constraint(label=None, parameter=None, parameterValue=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -A constraint on functional data. -For requests, both parameter and parameter value are required. - -* **Parameters:** - * **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **parameter** ([`ParameterReference`](#module-GRANTA_MIScriptingToolkit.ParameterReference)) - * **parameterValue** ([`ParameterValue`](#module-GRANTA_MIScriptingToolkit.ParameterValue)) - - - -#### *property* label - -Property label is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* parameter - -Property parameter is of type [`ParameterReference`](#module-GRANTA_MIScriptingToolkit.ParameterReference). - -* **Return type:** - [`ParameterReference`](#module-GRANTA_MIScriptingToolkit.ParameterReference) - - - -#### *property* parameterValue - -Property parameterValue is of type [`ParameterValue`](#module-GRANTA_MIScriptingToolkit.ParameterValue). - -* **Return type:** - [`ParameterValue`](#module-GRANTA_MIScriptingToolkit.ParameterValue) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### Constraints - - - -### *class* Constraints(constraints=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -A container of constraints. - -* **Parameters:** - **constraints** (list of [`Constraint`](#module-GRANTA_MIScriptingToolkit.Constraint)) - - - -#### *property* constraints - -Property constraints is a list of [`Constraint`](#module-GRANTA_MIScriptingToolkit.Constraint) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`Constraint`](#module-GRANTA_MIScriptingToolkit.Constraint) - - - -#### AddConstraint(\_constraint) - -Appends \_constraint to constraints property on Constraints C-object. - -* **Parameters:** - **\_constraint** ([`Constraint`](#module-GRANTA_MIScriptingToolkit.Constraint)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### ContainsAllSearchValue - - - -### *class* ContainsAllSearchValue(tabularColumn=None, values=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Search criterion to search for discrete data types that contain all of the specified search values. -If the discrete values of the data include further values, it still passes. This criterion type is -specific to discrete attributes. - -* **Parameters:** - * **tabularColumn** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **values** ([*list*](https://docs.python.org/3/library/stdtypes.html#list) *of* [*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* values - -Property values is a list of str objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - [list](https://docs.python.org/3/library/stdtypes.html#list) of [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* tabularColumn - -Property tabularColumn is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### AddValue(value) - -Appends value to values property on ContainsAllSearchValue C-object. - -* **Parameters:** - **value** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### ContainsAnySearchValue - - - -### *class* ContainsAnySearchValue(tabularColumn=None, values=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Search criterion to search for discrete data types that contain any of the specified search values. -This criterion type is specific to discrete attributes. - -* **Parameters:** - * **tabularColumn** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **values** ([*list*](https://docs.python.org/3/library/stdtypes.html#list) *of* [*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* values - -Property values is a list of str objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - [list](https://docs.python.org/3/library/stdtypes.html#list) of [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* tabularColumn - -Property tabularColumn is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### AddValue(value) - -Appends value to values property on ContainsAnySearchValue C-object. - -* **Parameters:** - **value** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### ContainsSearchValue - - - -### *class* ContainsSearchValue(tabularColumn=None, value=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Search criterion to search for data that contains the specified search text value. -Search criterion applies to text, logical, and discrete attributes. For logicals, specify ‘true’ or -‘false’ as the text. - -* **Parameters:** - * **tabularColumn** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **value** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* tabularColumn - -Property tabularColumn is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* value - -Property value is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### CriteriaSearch - - - -### *class* CriteriaSearch(DBKey=None, parameterValues=None, populateGUIDs=None, recordFilter=None, searchCriteria=None, searchFilter=None, searchMode=None, significantFigures=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -The input for the CriteriaSearch operation. -Both the DBKey and searchCriteria parameters are required. If no subsets are specified, only the -default subset will be searched. - -* **Parameters:** - * **DBKey** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **parameterValues** (list of [`UnittedParameterValue`](#module-GRANTA_MIScriptingToolkit.UnittedParameterValue)) - * **populateGUIDs** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **recordFilter** ([`RecordFilter`](#module-GRANTA_MIScriptingToolkit.RecordFilter)) - * **searchCriteria** (list of [`RecordSearchCriterion`](#module-GRANTA_MIScriptingToolkit.RecordSearchCriterion)) - * **searchFilter** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **searchMode** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **significantFigures** ([*int*](https://docs.python.org/3/library/functions.html#int)) - - - -#### *property* parameterValues - -Property parameterValues is a list of [`UnittedParameterValue`](#module-GRANTA_MIScriptingToolkit.UnittedParameterValue) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`UnittedParameterValue`](#module-GRANTA_MIScriptingToolkit.UnittedParameterValue) - - - -#### *property* searchCriteria - -Property searchCriteria is a list of [`RecordSearchCriterion`](#module-GRANTA_MIScriptingToolkit.RecordSearchCriterion) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`RecordSearchCriterion`](#module-GRANTA_MIScriptingToolkit.RecordSearchCriterion) - - - -#### *property* DBKey - -Property DBKey is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* populateGUIDs - -Property populateGUIDs is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* recordFilter - -Property recordFilter is of type [`RecordFilter`](#module-GRANTA_MIScriptingToolkit.RecordFilter). - -* **Return type:** - [`RecordFilter`](#module-GRANTA_MIScriptingToolkit.RecordFilter) - - - -#### *property* searchFilter - -Property searchFilter is of type int. See [`GRANTA_Constants`](#module-GRANTA_MIScriptingToolkit.GRANTA_Constants) for supported values. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* searchMode - -Property searchMode is of type int. See [`GRANTA_Constants`](#module-GRANTA_MIScriptingToolkit.GRANTA_Constants) for supported values. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* significantFigures - -Property significantFigures is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### AddParameterValue(\_unittedParameterValue) - -Appends \_unittedParameterValue to parameterValues property on CriteriaSearch C-object. - -* **Parameters:** - **\_unittedParameterValue** ([`UnittedParameterValue`](#module-GRANTA_MIScriptingToolkit.UnittedParameterValue)) - - - -#### AddSearchCriteria(\_recordSearchCriterion) - -Appends \_recordSearchCriterion to searchCriteria property on CriteriaSearch C-object. - -* **Parameters:** - **\_recordSearchCriterion** ([`RecordSearchCriterion`](#module-GRANTA_MIScriptingToolkit.RecordSearchCriterion)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### CurrencyDetail - - - -### *class* CurrencyDetail(code=None, factor=None, name=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Provides the currency code and name. -Currencies are uniquely identified by their ISO 4217 code, the currency name is also provided. - -* **Parameters:** - * **code** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **factor** ([*float*](https://docs.python.org/3/library/functions.html#float)) - * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* code - -Property code is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* factor - -Property factor is of type float. - -* **Return type:** - [float](https://docs.python.org/3/library/functions.html#float) - - - -#### *property* name - -Property name is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - -### DataExportService - - - - - -### *class* DataExportService(mi_session, retries=0) - -Bases: [`Service`](#GRANTA_MIScriptingToolkit.Service.Service) - -The DataExport service retrieves and returns data from attributes of records in Granta MI Databases. - - - -#### GetRecordAttributesByRef(\_req) - -Retrieves the data values for the given attribute(s) and record(s) in a Granta MI Database. - -* **Parameters:** - **\_req** ([`GetRecordAttributesByRefRequest`](#module-GRANTA_MIScriptingToolkit.GetRecordAttributesByRefRequest) object) -* **Return type:** - [`GetRecordAttributesByRefResponse`](#module-GRANTA_MIScriptingToolkit.GetRecordAttributesByRefResponse) object - - - -### DataImportService - - - - - -### *class* DataImportService(mi_session, retries=0) - -Bases: [`Service`](#GRANTA_MIScriptingToolkit.Service.Service) - -The DataImport service writes data to attributes of records in Granta MI Databases. - - - -#### SetRecordAttributes(\_req) - -Sets the data values for the given attribute(s) and record(s) in a Granta MI Database. This method will create any records or folders which do not already exist in the database (however, new folders should be created with ‘EnsureRecordFolderPaths’ instead). Note: This operation can accept an arbitrary number of attributes and records to be imported, but in practice there is a fairly low limit to the amount of data that can be imported in a single operation. Client code should perform large imports in small chunks. - -* **Parameters:** - **\_req** ([`SetRecordAttributesRequest`](#module-GRANTA_MIScriptingToolkit.SetRecordAttributesRequest) object) -* **Return type:** - [`SetRecordAttributesResponse`](#module-GRANTA_MIScriptingToolkit.SetRecordAttributesResponse) object - - - -#### ModifyRecordLinks(\_req) - -Adds or removes static Links between record(s) in a Granta MI Database. - -* **Parameters:** - **\_req** ([`ModifyRecordLinksRequest`](#module-GRANTA_MIScriptingToolkit.ModifyRecordLinksRequest) object) -* **Return type:** - [`ModifyRecordLinksResponse`](#module-GRANTA_MIScriptingToolkit.ModifyRecordLinksResponse) object - - - -#### GetUploadAddresses(\_req) - -Returns an address to which a datum can be uploaded, for each combination of given sets of records and attributes in a Granta MI database. Each address will be an HTTP or HTTPS URL. The upload service only supports a subset of all available Granta MI attribute types, but this operation will give an address for an attribute of any type. - -* **Parameters:** - **\_req** ([`GetUploadAddressesRequest`](#module-GRANTA_MIScriptingToolkit.GetUploadAddressesRequest) object) -* **Return type:** - [`GetUploadAddressesResponse`](#module-GRANTA_MIScriptingToolkit.GetUploadAddressesResponse) object - - - -#### EnsureRecordFolderPaths(\_req) - -Checks whether given hierarchies of folders exist, creating them if not. Each hierarchy is specified as a sequence of tree names; where the folder needs to be created, this name is also used as the full name of the created folder. New folders will be assigned to their parents’ subsets; existing folders are not assigned or removed from any subsets. If a colour is specified, new folders will be of that colour; existing folders’ colours are never changed. Note: this operation can accept an arbitrary number of Record Folder paths to be ensured, but in practice there is a limit to the amount of changes that can be done in a single operation. - -* **Parameters:** - **\_req** ([`EnsureRecordFolderPathsRequest`](#module-GRANTA_MIScriptingToolkit.EnsureRecordFolderPathsRequest) object) -* **Return type:** - [`EnsureRecordFolderPathsResponse`](#module-GRANTA_MIScriptingToolkit.EnsureRecordFolderPathsResponse) object - - - -#### DeleteOrWithdrawIfLatestRecordVersion(\_req) - -Deletes or withdraws the latest version of the specified record(s). In a version-controlled table, the latest version of a record can be seen by Write users in Edit mode of MI Viewer. This operation will revert (or delete) unreleased record versions, withdraw released versions, and skip withdrawn versions. In a non-version-controlled table, records will only have one version. This operation will delete specified records of this type. Note: this operation will only act on the latest record version. In the case where the specified record corresponds to a record version that is an earlier version, the operation will return a fault. - -* **Parameters:** - **\_req** ([`DeleteOrWithdrawIfLatestRecordVersionRequest`](#module-GRANTA_MIScriptingToolkit.DeleteOrWithdrawIfLatestRecordVersionRequest) object) -* **Return type:** - [`DeleteOrWithdrawIfLatestRecordVersionResponse`](#module-GRANTA_MIScriptingToolkit.DeleteOrWithdrawIfLatestRecordVersionResponse) object - - - - - -### DatabaseDetail - - - -### *class* DatabaseDetail(DBKey=None, author=None, company=None, volumeName=None, DBGUID=None, DBVersionGUID=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Detailed meta-information about a Granta MI database. - -* **Parameters:** - * **DBKey** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **author** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **company** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **volumeName** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **DBGUID** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **DBVersionGUID** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* author - -Property author is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* company - -Property company is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* DBGUID - -Property DBGUID is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* DBKey - -Property DBKey is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* DBVersionGUID - -Property DBVersionGUID is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* volumeName - -Property volumeName is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### DatabaseRevision - - - -### *class* DatabaseRevision(revisionDate=None, revisionNote=None, username=None, hasRevisionNote=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Information about a specific database revision. Includes the author, the date and time, and the -transaction note (if present). - -* **Parameters:** - * **revisionDate** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **revisionNote** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **username** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **hasRevisionNote** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - - - -#### *property* hasRevisionNote - -Property hasRevisionNote is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* revisionDate - -Property revisionDate is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* revisionNote - -Property revisionNote is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* username - -Property username is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### DatabaseUnitSet - - - -### *class* DatabaseUnitSet(DBKey=None, unitSymbols=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -An array of UnitSymbols for a specific database. - -* **Parameters:** - * **DBKey** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **unitSymbols** (list of [`UnitSymbol`](#module-GRANTA_MIScriptingToolkit.UnitSymbol)) - - - -#### *property* DBKey - -Property DBKey is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* unitSymbols - -Property unitSymbols is a list of [`UnitSymbol`](#module-GRANTA_MIScriptingToolkit.UnitSymbol) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`UnitSymbol`](#module-GRANTA_MIScriptingToolkit.UnitSymbol) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### DatasheetPath - - - -### *class* DatasheetPath(URL=None, recordReference=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Link to a record in a Granta MI database. -Includes a [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) and a URL for the record datasheet. - -* **Parameters:** - * **URL** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **recordReference** ([`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference)) - - - -#### *property* recordReference - -Property recordReference is of type [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference). - -* **Return type:** - [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) - - - -#### *property* URL - -Property URL is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### DateDataType - - - -### *class* DateDataType(isApplicable=None, value=None, \_isOwner=True) - -Bases: [`IDataValue`](#GRANTA_MIScriptingToolkit.IDataValue.IDataValue) - -Container of date data. The format is YYYY-MM-DD. - -* **Parameters:** - * **isApplicable** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **value** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* isApplicable - -Property isApplicable is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* value - -Property value is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### DateTimeDataType - - - -### *class* DateTimeDataType(isApplicable=None, value=None, \_isOwner=True) - -Bases: [`IDataValue`](#GRANTA_MIScriptingToolkit.IDataValue.IDataValue) - -Container of datetime data. The format is YYYY-MM-DDThh:mm:ss and is compatible with ISO 8601. - -* **Parameters:** - * **isApplicable** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **value** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* isApplicable - -Property isApplicable is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* value - -Property value is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### DefaultParameterValue - - - -### *class* DefaultParameterValue(discreteValue=None, numericValue=None, type=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Type representing the default value of a parameter, may be overridden at the datum level, or -inherited from the attribute or the database default. - -* **Parameters:** - * **discreteValue** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **numericValue** ([*float*](https://docs.python.org/3/library/functions.html#float)) - * **type** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* discreteValue - -Property discreteValue is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* numericValue - -Property numericValue is of type float. - -* **Return type:** - [float](https://docs.python.org/3/library/functions.html#float) - - - -#### *property* type - -Property type is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### DeleteOrWithdrawIfLatestRecordVersionRequest - - - -### *class* DeleteOrWithdrawIfLatestRecordVersionRequest(deleteOrWithdrawRecords=None, notes=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -DeleteOrWithdrawIfLatestRecordVersionRequest. Input for the DeleteOrWithdrawIfLatestRecordVersion -operation, containing the [`DeleteOrWithdrawRecord`](#module-GRANTA_MIScriptingToolkit.DeleteOrWithdrawRecord) objects. - -* **Parameters:** - * **deleteOrWithdrawRecords** (list of [`DeleteOrWithdrawRecord`](#module-GRANTA_MIScriptingToolkit.DeleteOrWithdrawRecord)) - * **notes** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* deleteOrWithdrawRecords - -Property deleteOrWithdrawRecords is a list of [`DeleteOrWithdrawRecord`](#module-GRANTA_MIScriptingToolkit.DeleteOrWithdrawRecord) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`DeleteOrWithdrawRecord`](#module-GRANTA_MIScriptingToolkit.DeleteOrWithdrawRecord) - - - -#### *property* notes - -Property notes is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### AddDeleteOrWithdrawRecord(\_deleteOrWithdrawRecord) - -Appends \_deleteOrWithdrawRecord to deleteOrWithdrawRecords property on DeleteOrWithdrawIfLatestRecordVersionRequest C-object. - -* **Parameters:** - **\_deleteOrWithdrawRecord** ([`DeleteOrWithdrawRecord`](#module-GRANTA_MIScriptingToolkit.DeleteOrWithdrawRecord)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### DeleteOrWithdrawIfLatestRecordVersionResponse - - - -### *class* DeleteOrWithdrawIfLatestRecordVersionResponse(c_obj) - -Bases: [`Response`](#GRANTA_MIScriptingToolkit.Response.Response) - -DeleteOrWithdrawIfLatestRecordVersionResponse. Output of the DeleteOrWithdrawIfLatestRecordVersion -operation. - -* **Parameters:** - **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a DeleteOrWithdrawIfLatestRecordVersionResponse object. - - - - - -### DeleteOrWithdrawRecord - - - -### *class* DeleteOrWithdrawRecord(recordReference=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Record to be deleted or withdrawn. Contains a [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference). - -* **Parameters:** - **recordReference** ([`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference)) - - - -#### *property* recordReference - -Property recordReference is of type [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference). - -* **Return type:** - [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### DiscreteDataType - - - -### *class* DiscreteDataType(discreteValues=None, isApplicable=None, \_isOwner=True) - -Bases: [`IDataValue`](#GRANTA_MIScriptingToolkit.IDataValue.IDataValue) - -Container of discrete data. - -* **Parameters:** - * **discreteValues** (list of [`DiscreteValue`](#module-GRANTA_MIScriptingToolkit.DiscreteValue)) - * **isApplicable** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - - - -#### *property* discreteValues - -Property discreteValues is a list of [`DiscreteValue`](#module-GRANTA_MIScriptingToolkit.DiscreteValue) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`DiscreteValue`](#module-GRANTA_MIScriptingToolkit.DiscreteValue) - - - -#### *property* isApplicable - -Property isApplicable is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### AddDiscreteValue(\_discreteValue) - -Appends \_discreteValue to discreteValues property on DiscreteDataType C-object. - -* **Parameters:** - **\_discreteValue** ([`DiscreteValue`](#module-GRANTA_MIScriptingToolkit.DiscreteValue)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### DiscreteFunctionalGriddedDataType - - - -### *class* DiscreteFunctionalGriddedDataType(defaultXAxisParameter=None, functionalDataParameterSettings=None, isApplicable=None, values=None, \_isOwner=True) - -Bases: [`IDataValue`](#GRANTA_MIScriptingToolkit.IDataValue.IDataValue) - -A type to contain the values of discrete-valued functional gridded data. -This type is only valid for export. - -* **Parameters:** - * **defaultXAxisParameter** ([`ParameterInformation`](#module-GRANTA_MIScriptingToolkit.ParameterInformation)) - * **functionalDataParameterSettings** (list of [`FunctionalDataParameterSettings`](#module-GRANTA_MIScriptingToolkit.FunctionalDataParameterSettings)) - * **isApplicable** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **values** ([`DiscreteFunctionalValues`](#module-GRANTA_MIScriptingToolkit.DiscreteFunctionalValues)) - - - -#### *property* functionalDataParameterSettings - -Property functionalDataParameterSettings is a list of [`FunctionalDataParameterSettings`](#module-GRANTA_MIScriptingToolkit.FunctionalDataParameterSettings) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`FunctionalDataParameterSettings`](#module-GRANTA_MIScriptingToolkit.FunctionalDataParameterSettings) - - - -#### *property* defaultXAxisParameter - -Property defaultXAxisParameter is of type [`ParameterInformation`](#module-GRANTA_MIScriptingToolkit.ParameterInformation). - -* **Return type:** - [`ParameterInformation`](#module-GRANTA_MIScriptingToolkit.ParameterInformation) - - - -#### *property* isApplicable - -Property isApplicable is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* values - -Property values is of type [`DiscreteFunctionalValues`](#module-GRANTA_MIScriptingToolkit.DiscreteFunctionalValues). - -* **Return type:** - [`DiscreteFunctionalValues`](#module-GRANTA_MIScriptingToolkit.DiscreteFunctionalValues) - - - -#### AddFunctionalDataParameterSettings(\_functionalDataParameterSettings) - -Appends \_functionalDataParameterSettings to functionalDataParameterSettings property on DiscreteFunctionalGriddedDataType C-object. - -* **Parameters:** - **\_functionalDataParameterSettings** ([`FunctionalDataParameterSettings`](#module-GRANTA_MIScriptingToolkit.FunctionalDataParameterSettings)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### DiscreteFunctionalSeriesDataType - - - -### *class* DiscreteFunctionalSeriesDataType(functionalDataParameterSettings=None, graph=None, isApplicable=None, \_isOwner=True) - -Bases: [`IDataValue`](#GRANTA_MIScriptingToolkit.IDataValue.IDataValue) - -A type to contain the values of discrete-valued functional series data. -This type is only valid for export. - -* **Parameters:** - * **functionalDataParameterSettings** (list of [`FunctionalDataParameterSettings`](#module-GRANTA_MIScriptingToolkit.FunctionalDataParameterSettings)) - * **graph** ([`DiscreteFunctionalSeriesGraph`](#module-GRANTA_MIScriptingToolkit.DiscreteFunctionalSeriesGraph)) - * **isApplicable** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - - - -#### *property* functionalDataParameterSettings - -Property functionalDataParameterSettings is a list of [`FunctionalDataParameterSettings`](#module-GRANTA_MIScriptingToolkit.FunctionalDataParameterSettings) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`FunctionalDataParameterSettings`](#module-GRANTA_MIScriptingToolkit.FunctionalDataParameterSettings) - - - -#### *property* graph - -Property graph is of type [`DiscreteFunctionalSeriesGraph`](#module-GRANTA_MIScriptingToolkit.DiscreteFunctionalSeriesGraph). - -* **Return type:** - [`DiscreteFunctionalSeriesGraph`](#module-GRANTA_MIScriptingToolkit.DiscreteFunctionalSeriesGraph) - - - -#### *property* isApplicable - -Property isApplicable is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### AddFunctionalDataParameterSettings(\_functionalDataParameterSettings) - -Appends \_functionalDataParameterSettings to functionalDataParameterSettings property on DiscreteFunctionalSeriesDataType C-object. - -* **Parameters:** - **\_functionalDataParameterSettings** ([`FunctionalDataParameterSettings`](#module-GRANTA_MIScriptingToolkit.FunctionalDataParameterSettings)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### DiscreteFunctionalSeriesGraph - - - -### *class* DiscreteFunctionalSeriesGraph(XAxisParameter=None, hideGraph=None, series=None, \_isOwner=True) - -A type to contain a collection of [`DiscreteSeries`](#module-GRANTA_MIScriptingToolkit.DiscreteSeries) objects that -contain the functional data. - -* **Parameters:** - * **XAxisParameter** ([`ParameterInformation`](#module-GRANTA_MIScriptingToolkit.ParameterInformation)) - * **hideGraph** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **series** (list of [`DiscreteSeries`](#module-GRANTA_MIScriptingToolkit.DiscreteSeries)) - - - -#### *property* series - -Property series is a list of [`DiscreteSeries`](#module-GRANTA_MIScriptingToolkit.DiscreteSeries) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`DiscreteSeries`](#module-GRANTA_MIScriptingToolkit.DiscreteSeries) - - - -#### *property* hideGraph - -Property hideGraph is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* XAxisParameter - -Property XAxisParameter is of type [`ParameterInformation`](#module-GRANTA_MIScriptingToolkit.ParameterInformation). - -* **Return type:** - [`ParameterInformation`](#module-GRANTA_MIScriptingToolkit.ParameterInformation) - - - -#### AddSeries(\_discreteSeries) - -Appends \_discreteSeries to series property on DiscreteFunctionalSeriesGraph C-object. - -* **Parameters:** - **\_discreteSeries** ([`DiscreteSeries`](#module-GRANTA_MIScriptingToolkit.DiscreteSeries)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### DiscreteFunctionalValue - - - -### *class* DiscreteFunctionalValue(constraints=None, value=None, isEstimated=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -A single grid point in Gridded Discrete-Valued Functional Data, where the Y-axis value is a discrete -value. - -* **Parameters:** - * **constraints** ([`Constraints`](#module-GRANTA_MIScriptingToolkit.Constraints)) - * **value** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **isEstimated** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - - - -#### *property* constraints - -Property constraints is of type [`Constraints`](#module-GRANTA_MIScriptingToolkit.Constraints). - -* **Return type:** - [`Constraints`](#module-GRANTA_MIScriptingToolkit.Constraints) - - - -#### *property* isEstimated - -Property isEstimated is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* value - -Property value is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### DiscreteFunctionalValues - - - -### *class* DiscreteFunctionalValues(values=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -A collection of [`DiscreteFunctionalValue`](#module-GRANTA_MIScriptingToolkit.DiscreteFunctionalValue) objects. - -* **Parameters:** - **values** (list of [`DiscreteFunctionalValue`](#module-GRANTA_MIScriptingToolkit.DiscreteFunctionalValue)) - - - -#### *property* values - -Property values is a list of [`DiscreteFunctionalValue`](#module-GRANTA_MIScriptingToolkit.DiscreteFunctionalValue) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`DiscreteFunctionalValue`](#module-GRANTA_MIScriptingToolkit.DiscreteFunctionalValue) - - - -#### AddValue(\_discreteFunctionalValue) - -Appends \_discreteFunctionalValue to values property on DiscreteFunctionalValues C-object. - -* **Parameters:** - **\_discreteFunctionalValue** ([`DiscreteFunctionalValue`](#module-GRANTA_MIScriptingToolkit.DiscreteFunctionalValue)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### DiscreteSeries - - - -### *class* DiscreteSeries(XYPoints=None, constraints=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Type for functional data which includes X-Y discrete data and any constraints. - -* **Parameters:** - * **XYPoints** ([`XYDiscreteData`](#module-GRANTA_MIScriptingToolkit.XYDiscreteData)) - * **constraints** ([`Constraints`](#module-GRANTA_MIScriptingToolkit.Constraints)) - - - -#### *property* constraints - -Property constraints is of type [`Constraints`](#module-GRANTA_MIScriptingToolkit.Constraints). - -* **Return type:** - [`Constraints`](#module-GRANTA_MIScriptingToolkit.Constraints) - - - -#### *property* XYPoints - -Property XYPoints is of type [`XYDiscreteData`](#module-GRANTA_MIScriptingToolkit.XYDiscreteData). - -* **Return type:** - [`XYDiscreteData`](#module-GRANTA_MIScriptingToolkit.XYDiscreteData) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### DiscreteValue - - - -### *class* DiscreteValue(order=None, value=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -The value of a discrete data type. -Contains an order and a value. - -* **Parameters:** - * **order** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **value** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* order - -Property order is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* value - -Property value is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### DisplayName - - - -### *class* DisplayName(language=None, translation=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -A language identifier and localized string for the display name of an object. - -* **Parameters:** - * **language** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **translation** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* language - -Property language is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* translation - -Property translation is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### DoesNotContainSearchValue - - - -### *class* DoesNotContainSearchValue(tabularColumn=None, value=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Search criterion to search for discrete data types that contain none of the specified search values. -This criterion type is specific to discrete attributes. - -* **Parameters:** - * **tabularColumn** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **value** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* tabularColumn - -Property tabularColumn is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* value - -Property value is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### DoesNotExistSearchValue - - - -### *class* DoesNotExistSearchValue(tabularColumn=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Search criterion to search for attributes with no data. -All attribute types supported. - -* **Parameters:** - **tabularColumn** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* tabularColumn - -Property tabularColumn is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### EmptyDataType - - - -### *class* EmptyDataType(\_isOwner=True) - -Bases: [`IDataValue`](#GRANTA_MIScriptingToolkit.IDataValue.IDataValue) - -A type that indicates that the [`TabularDataCell`](#module-GRANTA_MIScriptingToolkit.TabularDataCell) is empty. -This type is specific to Tabular attributes, and can be used in update operations to clear the -contents of a [`TabularDataCell`](#module-GRANTA_MIScriptingToolkit.TabularDataCell). - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### EmptyRestResponse - - - -### *class* EmptyRestResponse(c_obj) - -Bases: [`Response`](#GRANTA_MIScriptingToolkit.Response.Response) - -A response from a REST service that contains no data. -This type contains only a [`ServiceLayerResponse`](#module-GRANTA_MIScriptingToolkit.ServiceLayerResponse) object. - -* **Parameters:** - **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a EmptyRestResponse object. - - - -### EngineeringDataService - - - - - -### *class* EngineeringDataService(mi_session, retries=0) - -Bases: [`Service`](#GRANTA_MIScriptingToolkit.Service.Service) - -The EngineeringData service provides custom data export operations for a Granta MI Server. - - - -#### GetAvailableExporters(\_req) - -Returns the FEA Exporter configurations known to the MI Server, optionally filtering for their applicability to particular situations. - -* **Parameters:** - **\_req** ([`GetAvailableExportersRequest`](#module-GRANTA_MIScriptingToolkit.GetAvailableExportersRequest) object) -* **Return type:** - [`GetAvailableExportersResponse`](#module-GRANTA_MIScriptingToolkit.GetAvailableExportersResponse) object - - - -#### ExportRecordData(\_req) - -Performs an FEA Export and returns the result as the response. - -* **Parameters:** - **\_req** ([`ExportRecordDataRequest`](#module-GRANTA_MIScriptingToolkit.ExportRecordDataRequest) object) -* **Return type:** - [`ExportRecordDataResponse`](#module-GRANTA_MIScriptingToolkit.ExportRecordDataResponse) object - - - -#### GetExporterParameters(\_req) - -Returns information about the MI Parameter Values that will need to be chosen, to run the specified Exporter on the specified Record(s). - -* **Parameters:** - **\_req** ([`GetExporterParametersRequest`](#module-GRANTA_MIScriptingToolkit.GetExporterParametersRequest) object) -* **Return type:** - [`GetExporterParametersResponse`](#module-GRANTA_MIScriptingToolkit.GetExporterParametersResponse) object - - - -#### ExportersForRecords(\_req) - -Returns the FEA Exporter configurations, known to the MI Server, filtering for their applicability to given Record(s) and optionally to particular situations. - -* **Parameters:** - **\_req** ([`ExportersForRecordsRequest`](#module-GRANTA_MIScriptingToolkit.ExportersForRecordsRequest) object) -* **Return type:** - [`ExportersForRecordsResponse`](#module-GRANTA_MIScriptingToolkit.ExportersForRecordsResponse) object - - - - - -### EnsureRecordFolderPathsRequest - - - -### *class* EnsureRecordFolderPathsRequest(folderPaths=None, importErrorMode=None, notes=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Input for the EnsureRecordFolderPaths operation, containing the folder paths to check and the import -error mode. - -* **Parameters:** - * **folderPaths** (list of [`RecordFolderPath`](#module-GRANTA_MIScriptingToolkit.RecordFolderPath)) - * **importErrorMode** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **notes** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* folderPaths - -Property folderPaths is a list of [`RecordFolderPath`](#module-GRANTA_MIScriptingToolkit.RecordFolderPath) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`RecordFolderPath`](#module-GRANTA_MIScriptingToolkit.RecordFolderPath) - - - -#### *property* importErrorMode - -Property importErrorMode is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* notes - -Property notes is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### AddFolderPath(\_recordFolderPath) - -Appends \_recordFolderPath to folderPaths property on EnsureRecordFolderPathsRequest C-object. - -* **Parameters:** - **\_recordFolderPath** ([`RecordFolderPath`](#module-GRANTA_MIScriptingToolkit.RecordFolderPath)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### EnsureRecordFolderPathsResponse - - - -### *class* EnsureRecordFolderPathsResponse(c_obj) - -Bases: [`Response`](#GRANTA_MIScriptingToolkit.Response.Response) - -Output of the EnsureRecordFolderPaths operation. - -* **Parameters:** - **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a EnsureRecordFolderPathsResponse object. - - - -#### *property* pathLeaves - -Property pathLeaves is a list of [`PathLeaf`](#module-GRANTA_MIScriptingToolkit.PathLeaf) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`PathLeaf`](#module-GRANTA_MIScriptingToolkit.PathLeaf) - - - - - -### EqualToSearchValue - - - -### *class* EqualToSearchValue(tabularColumn=None, value=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Search criterion to search for short text values that exactly match the specified search value. -Applies to short text attributes only. - -* **Parameters:** - * **tabularColumn** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **value** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* tabularColumn - -Property tabularColumn is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* value - -Property value is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### ExactlySearchValue - - - -### *class* ExactlySearchValue(tabularColumn=None, value=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Search criterion to search for integer values that exactly match the specified search value. -Applies to integer attributes only. - -* **Parameters:** - * **tabularColumn** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **value** ([*int*](https://docs.python.org/3/library/functions.html#int)) - - - -#### *property* tabularColumn - -Property tabularColumn is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* value - -Property value is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### ExistsSearchValue - - - -### *class* ExistsSearchValue(tabularColumn=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Search criterion to search for attributes that contain data. -All attribute types supported. - -* **Parameters:** - **tabularColumn** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* tabularColumn - -Property tabularColumn is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### ExportRecordDataRequest - - - -### *class* ExportRecordDataRequest(attributeReferences=None, exporterKey=None, filter=None, parameterValues=None, records=None, sigFigs=None, stopBeforeId=None, stopBeforeIndex=None, unitConversionContext=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Input for the ExportRecordData operation. For this request to be valid, you must set the references -and the exporter key. StopBeforeIndex is 0-indexed. - -* **Parameters:** - * **attributeReferences** (list of [`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference)) - * **exporterKey** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **filter** ([`RecordFilter`](#module-GRANTA_MIScriptingToolkit.RecordFilter)) - * **parameterValues** (list of [`UnittedParameterValue`](#module-GRANTA_MIScriptingToolkit.UnittedParameterValue)) - * **records** (list of [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference)) - * **sigFigs** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **stopBeforeId** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **stopBeforeIndex** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **unitConversionContext** ([`UnitConversionContext`](#module-GRANTA_MIScriptingToolkit.UnitConversionContext)) - - - -#### *property* attributeReferences - -Property attributeReferences is a list of [`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference) objects. If this property is not specified, the attributes from the exporter configuration are used. If this element is included and non-empty, the attributes specified are used. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference) - - - -#### *property* parameterValues - -Property parameterValues is a list of [`UnittedParameterValue`](#module-GRANTA_MIScriptingToolkit.UnittedParameterValue) objects. Parameter values to use for any parameterised Data in the export. Each Parameter can only have one value for all parameterised Attributes in an export. Note that the true Parameter names (or Standard Names) in the MI Database must be used; aliases defined in the exporter configuration will not be understood. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`UnittedParameterValue`](#module-GRANTA_MIScriptingToolkit.UnittedParameterValue) - - - -#### *property* records - -Property records is a list of [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) - - - -#### *property* exporterKey - -Property exporterKey is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* filter - -Property filter is of type [`RecordFilter`](#module-GRANTA_MIScriptingToolkit.RecordFilter). If specified, this filters the records that can be included when traversing record links within Tabular Data. This filter is NOT applied to the explicit list of records passed to this operation. - -* **Return type:** - [`RecordFilter`](#module-GRANTA_MIScriptingToolkit.RecordFilter) - - - -#### *property* sigFigs - -Property sigFigs is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* stopBeforeId - -Property stopBeforeId is of type str. Stops the export process before the step specified by the identifier (for example, after the initial XML is generated but before conversion into the specified CAE format). Contact your MI Administrator if you require this feature. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* stopBeforeIndex - -Property stopBeforeIndex is of type int. Stops the export process before the step specified by the index (for example, after the initial XML is generated but before conversion into the specified CAE format). Contact your MI Administrator if you require this feature. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* unitConversionContext - -Property unitConversionContext is of type [`UnitConversionContext`](#module-GRANTA_MIScriptingToolkit.UnitConversionContext). - -* **Return type:** - [`UnitConversionContext`](#module-GRANTA_MIScriptingToolkit.UnitConversionContext) - - - -#### AddAttributeReference(\_attributeReference) - -Appends \_attributeReference to attributeReferences property on ExportRecordDataRequest C-object. - -* **Parameters:** - **\_attributeReference** ([`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference)) - - - -#### AddParameterValues(\_unittedParameterValue) - -Appends \_unittedParameterValue to parameterValues property on ExportRecordDataRequest C-object. - -* **Parameters:** - **\_unittedParameterValue** ([`UnittedParameterValue`](#module-GRANTA_MIScriptingToolkit.UnittedParameterValue)) - - - -#### AddRecord(\_recordReference) - -Appends \_recordReference to records property on ExportRecordDataRequest C-object. - -* **Parameters:** - **\_recordReference** ([`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### ExportRecordDataResponse - - - -### *class* ExportRecordDataResponse(c_obj) - -Bases: [`Response`](#GRANTA_MIScriptingToolkit.Response.Response) - -Output for the ExportRecordData operation. - -* **Parameters:** - **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a ExportRecordDataResponse object. - - - -#### *property* text - -Property text is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - - - -### ExportedAttribute - - - -### *class* ExportedAttribute(DBKey=None, attributeID=None, isStandardName=None, name=None, partialTableReference=None, preferredXAxisParameter=None, pseudoAttribute=None, specificUnitConversionContext=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -A type that allows identification of a particular attribute in a Granta MI, and also specifies how -that Attribute should be exported. - -* **Parameters:** - * **DBKey** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **attributeID** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **isStandardName** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **partialTableReference** ([`PartialTableReference`](#module-GRANTA_MIScriptingToolkit.PartialTableReference)) - * **preferredXAxisParameter** ([`ParameterReference`](#module-GRANTA_MIScriptingToolkit.ParameterReference)) - * **pseudoAttribute** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **specificUnitConversionContext** ([`SpecificUnitConversionContext`](#module-GRANTA_MIScriptingToolkit.SpecificUnitConversionContext)) - - - -#### *property* attributeID - -Property attributeID is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* DBKey - -Property DBKey is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* isStandardName - -Property isStandardName is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* name - -Property name is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* partialTableReference - -Property partialTableReference is of type [`PartialTableReference`](#module-GRANTA_MIScriptingToolkit.PartialTableReference). - -* **Return type:** - [`PartialTableReference`](#module-GRANTA_MIScriptingToolkit.PartialTableReference) - - - -#### *property* preferredXAxisParameter - -Property preferredXAxisParameter is of type [`ParameterReference`](#module-GRANTA_MIScriptingToolkit.ParameterReference). - -* **Return type:** - [`ParameterReference`](#module-GRANTA_MIScriptingToolkit.ParameterReference) - - - -#### *property* specificUnitConversionContext - -Property specificUnitConversionContext is of type [`SpecificUnitConversionContext`](#module-GRANTA_MIScriptingToolkit.SpecificUnitConversionContext). - -* **Return type:** - [`SpecificUnitConversionContext`](#module-GRANTA_MIScriptingToolkit.SpecificUnitConversionContext) - - - -#### *property* pseudoAttribute - -Property pseudoAttribute is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### Exporter - - - -### *class* Exporter(absoluteUnitsOptional=None, description=None, key=None, model=None, name=None, outputFile=None, package=None, transforms=None, unitSystems=None, useAbsoluteUnits=None, validatedOk=None, version=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Details of a particular FEA Exporter configuration, typically obtained from an Exporter -Configuration File (EXP file) on the MI Server. - -* **Parameters:** - * **absoluteUnitsOptional** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **description** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **key** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **model** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **outputFile** ([`ExporterOutputFile`](#module-GRANTA_MIScriptingToolkit.ExporterOutputFile)) - * **package** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **transforms** (list of [`ExporterTransform`](#module-GRANTA_MIScriptingToolkit.ExporterTransform)) - * **unitSystems** ([*list*](https://docs.python.org/3/library/stdtypes.html#list) *of* [*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **useAbsoluteUnits** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **validatedOk** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **version** ([*int*](https://docs.python.org/3/library/functions.html#int)) - - - -#### *property* absoluteUnitsOptional - -Property absoluteUnitsOptional is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* description - -Property description is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* key - -Property key is of type str. The key that uniquely identifies this Exporter. This value is generated by the MI Server at runtime and may change between runs. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* model - -Property model is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* name - -Property name is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* transforms - -Property transforms is a list of [`ExporterTransform`](#module-GRANTA_MIScriptingToolkit.ExporterTransform) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`ExporterTransform`](#module-GRANTA_MIScriptingToolkit.ExporterTransform) - - - -#### *property* unitSystems - -Property unitSystems is a list of str objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - [list](https://docs.python.org/3/library/stdtypes.html#list) of [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* outputFile - -Property outputFile is of type [`ExporterOutputFile`](#module-GRANTA_MIScriptingToolkit.ExporterOutputFile). - -* **Return type:** - [`ExporterOutputFile`](#module-GRANTA_MIScriptingToolkit.ExporterOutputFile) - - - -#### *property* package - -Property package is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* useAbsoluteUnits - -Property useAbsoluteUnits is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* validatedOk - -Property validatedOk is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* version - -Property version is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### ExporterOutputFile - - - -### *class* ExporterOutputFile(convention=None, customFileName=None, encoding=None, extension=None, folder=None, includeBOM=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Specifies how an output file should be named. All values have the same meaning as in the -[`Exporter`](#module-GRANTA_MIScriptingToolkit.Exporter) configuration schema. It is up to the client to adhere -(or not) to this. - -* **Parameters:** - * **convention** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **customFileName** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **encoding** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **extension** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **folder** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **includeBOM** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - - - -#### *class* ExporterFileNameConvention - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - - - -#### Default *= 0* - - - -#### TreeName *= 1* - - - -#### TableName *= 2* - - - -#### RecordName *= 3* - - - -#### Custom *= 4* - - - -#### *property* convention - -Property convention is of type int. See [`ExporterOutputFile.ExporterFileNameConvention`](#GRANTA_MIScriptingToolkit.ExporterOutputFile.ExporterOutputFile.ExporterFileNameConvention) for supported values. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* customFileName - -Property customFileName is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* encoding - -Property encoding is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* extension - -Property extension is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* folder - -Property folder is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* includeBOM - -Property includeBOM is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### ExporterParameter - - - -### *class* ExporterParameter(Id=None, name=None, parameterReference=None, unit=None, usage=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Information about a Parameter of Functional Data. - -* **Parameters:** - * **Id** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **parameterReference** ([`ParameterReference`](#module-GRANTA_MIScriptingToolkit.ParameterReference)) - * **unit** ([`UnitInformation`](#module-GRANTA_MIScriptingToolkit.UnitInformation)) - * **usage** ([*int*](https://docs.python.org/3/library/functions.html#int)) - - - -#### *class* Usage - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - - - -#### Unknown *= 0* - - - -#### free *= 1* - - - -#### fixed *= 2* - - - -#### unused *= 3* - - - -#### *property* Id - -Property Id is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* name - -Property name is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* parameterReference - -Property parameterReference is of type [`ParameterReference`](#module-GRANTA_MIScriptingToolkit.ParameterReference). - -* **Return type:** - [`ParameterReference`](#module-GRANTA_MIScriptingToolkit.ParameterReference) - - - -#### *property* unit - -Property unit is of type [`UnitInformation`](#module-GRANTA_MIScriptingToolkit.UnitInformation). - -* **Return type:** - [`UnitInformation`](#module-GRANTA_MIScriptingToolkit.UnitInformation) - - - -#### *property* usage - -Property usage is of type int. See [`ExporterParameter.Usage`](#GRANTA_MIScriptingToolkit.ExporterParameter.ExporterParameter.Usage) for supported values. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### ExporterPopulation - - - -### *class* ExporterPopulation(description=None, key=None, model=None, name=None, package=None, populationState=None, transforms=None, validatedOk=None, version=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Details of a particular FEA [`Exporter`](#module-GRANTA_MIScriptingToolkit.Exporter) configuration, typically -obtained from an [`Exporter`](#module-GRANTA_MIScriptingToolkit.Exporter) Configuration File (EXP file) on the -MI Server. - -* **Parameters:** - * **description** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **key** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **model** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **package** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **populationState** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **transforms** (list of [`ExporterTransform`](#module-GRANTA_MIScriptingToolkit.ExporterTransform)) - * **validatedOk** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **version** ([*int*](https://docs.python.org/3/library/functions.html#int)) - - - -#### *class* PopulationState - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - - - -#### Unknown *= 0* - - - -#### FullyPopulated *= 1* - - - -#### PartiallyPopulated *= 2* - - - -#### *property* description - -Property description is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* key - -Property key is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* model - -Property model is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* name - -Property name is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* transforms - -Property transforms is a list of [`ExporterTransform`](#module-GRANTA_MIScriptingToolkit.ExporterTransform) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`ExporterTransform`](#module-GRANTA_MIScriptingToolkit.ExporterTransform) - - - -#### *property* package - -Property package is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* populationState - -Property populationState is of type int. See [`ExporterPopulation.PopulationState`](#GRANTA_MIScriptingToolkit.ExporterPopulation.ExporterPopulation.PopulationState) for supported values. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* validatedOk - -Property validatedOk is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* version - -Property version is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### ExporterTransform - - - -### *class* ExporterTransform(Id=None, type=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Contains a type and an ID for an [`Exporter`](#module-GRANTA_MIScriptingToolkit.Exporter) Transform. - -* **Parameters:** - * **Id** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **type** ([*int*](https://docs.python.org/3/library/functions.html#int)) - - - -#### *class* Type - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - - - -#### Unknown *= 0* - - - -#### XSLT *= 1* - - - -#### *property* Id - -Property Id is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* type - -Property type is of type int. See [`ExporterTransform.Type`](#GRANTA_MIScriptingToolkit.ExporterTransform.ExporterTransform.Type) for supported values. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### ExportersForRecord - - - -### *class* ExportersForRecord(exporters=None, record=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -A type to contain a record and its associated exporters. - -* **Parameters:** - * **exporters** (list of [`ExporterPopulation`](#module-GRANTA_MIScriptingToolkit.ExporterPopulation)) - * **record** ([`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference)) - - - -#### *property* exporters - -Property exporters is a list of [`ExporterPopulation`](#module-GRANTA_MIScriptingToolkit.ExporterPopulation) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`ExporterPopulation`](#module-GRANTA_MIScriptingToolkit.ExporterPopulation) - - - -#### *property* record - -Property record is of type [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference). - -* **Return type:** - [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### ExportersForRecordsRequest - - - -### *class* ExportersForRecordsRequest(applicabilityTag=None, model=None, package=None, packageAndModelRequired=None, records=None, specificAttributeExportersOnly=None, versionPolicy=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Input for the ExportersForRecords operation. - -* **Parameters:** - * **applicabilityTag** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **model** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **package** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **packageAndModelRequired** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **records** (list of [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference)) - * **specificAttributeExportersOnly** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **versionPolicy** ([*int*](https://docs.python.org/3/library/functions.html#int)) - - - -#### *property* records - -Property records is a list of [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) - - - -#### *property* applicabilityTag - -Property applicabilityTag is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* model - -Property model is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* package - -Property package is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* packageAndModelRequired - -Property packageAndModelRequired is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* specificAttributeExportersOnly - -Property specificAttributeExportersOnly is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* versionPolicy - -Property versionPolicy is of type int. See [`GRANTA_Constants`](#module-GRANTA_MIScriptingToolkit.GRANTA_Constants) for supported values. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### AddRecord(\_recordReference) - -Appends \_recordReference to records property on ExportersForRecordsRequest C-object. - -* **Parameters:** - **\_recordReference** ([`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### ExportersForRecordsResponse - - - -### *class* ExportersForRecordsResponse(c_obj) - -Bases: [`Response`](#GRANTA_MIScriptingToolkit.Response.Response) - -Output from the ExportersForRecords operation. Contains a list of records and supported exporters. - -* **Parameters:** - **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a ExportersForRecordsResponse object. - - - -#### *property* records - -Property records is a list of [`ExportersForRecord`](#module-GRANTA_MIScriptingToolkit.ExportersForRecord) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`ExportersForRecord`](#module-GRANTA_MIScriptingToolkit.ExportersForRecord) - - - - - -### FileDataType - - - -### *class* FileDataType(URL=None, contentType=None, data=None, description=None, fileName=None, isApplicable=None, \_isOwner=True) - -Bases: [`IDataValue`](#GRANTA_MIScriptingToolkit.IDataValue.IDataValue) - -A type representing a piece of File data in a Granta MI database. -The URL can be used to data export a file from a Granta MI database. For importing a file into a -Granta MI database, the values of ‘fileName’, file ‘contentType’ and file ‘data’ must be specified, -where ‘fileName’ is the name you want the file to appear as in Granta MI, the ‘contentType’ data is -the MIME content type of the binary data, and ‘data’ is the contents of the file you wish to import -to Granta MI. - -* **Parameters:** - * **URL** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **contentType** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **data** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **description** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **fileName** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **isApplicable** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - - - -#### ModifyBinaryData(binaryData) - -Modify the byte string data of the file. - -* **Parameters:** - **binaryData** ([*bytes*](https://docs.python.org/3/library/stdtypes.html#bytes)) - - - -#### ReadBinaryData() - -Return a byte string representation of this file. - -* **Return type:** - [bytes](https://docs.python.org/3/library/stdtypes.html#bytes) - - - -#### *property* contentType - -Property contentType is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* data - -Property data is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* description - -Property description is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* fileName - -Property fileName is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* isApplicable - -Property isApplicable is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* URL - -Property URL is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### FloatFunctionalGraph - - - -### *class* FloatFunctionalGraph(hideGraph=None, logarithmicYAxis=None, series=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -A type to contain a collection of [`Series`](#module-GRANTA_MIScriptingToolkit.Series) objects that contain -the functional data. - -* **Parameters:** - * **hideGraph** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **logarithmicYAxis** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **series** (list of [`Series`](#module-GRANTA_MIScriptingToolkit.Series)) - - - -#### *property* series - -Property series is a list of [`Series`](#module-GRANTA_MIScriptingToolkit.Series) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`Series`](#module-GRANTA_MIScriptingToolkit.Series) - - - -#### *property* hideGraph - -Property hideGraph is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* logarithmicYAxis - -Property logarithmicYAxis is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### AddSeries(\_series) - -Appends \_series to series property on FloatFunctionalGraph C-object. - -* **Parameters:** - **\_series** ([`Series`](#module-GRANTA_MIScriptingToolkit.Series)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### FloatFunctionalGriddedDataType - - - -### *class* FloatFunctionalGriddedDataType(decoration=None, defaultXAxisParameter=None, isApplicable=None, unitInformation=None, values=None, functionalDataParameterSettings=None, \_isOwner=True) - -Bases: [`IDataValue`](#GRANTA_MIScriptingToolkit.IDataValue.IDataValue) - -A type to contain the values of float-valued functional gridded data. -For requests, Values and [`Parameters`](#module-GRANTA_MIScriptingToolkit.Parameters) are required. - -* **Parameters:** - * **decoration** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **defaultXAxisParameter** ([`ParameterInformation`](#module-GRANTA_MIScriptingToolkit.ParameterInformation)) - * **isApplicable** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **unitInformation** ([`UnitInformation`](#module-GRANTA_MIScriptingToolkit.UnitInformation)) - * **values** ([`FloatFunctionalValues`](#module-GRANTA_MIScriptingToolkit.FloatFunctionalValues)) - * **functionalDataParameterSettings** (list of [`FunctionalDataParameterSettings`](#module-GRANTA_MIScriptingToolkit.FunctionalDataParameterSettings)) - - - -#### *property* functionalDataParameterSettings - -Property functionalDataParameterSettings is a list of [`FunctionalDataParameterSettings`](#module-GRANTA_MIScriptingToolkit.FunctionalDataParameterSettings) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`FunctionalDataParameterSettings`](#module-GRANTA_MIScriptingToolkit.FunctionalDataParameterSettings) - - - -#### *property* decoration - -Property decoration is of type int. See [`GRANTA_Constants`](#module-GRANTA_MIScriptingToolkit.GRANTA_Constants) for supported values. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* defaultXAxisParameter - -Property defaultXAxisParameter is of type [`ParameterInformation`](#module-GRANTA_MIScriptingToolkit.ParameterInformation). - -* **Return type:** - [`ParameterInformation`](#module-GRANTA_MIScriptingToolkit.ParameterInformation) - - - -#### *property* isApplicable - -Property isApplicable is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* unitInformation - -Property unitInformation is of type [`UnitInformation`](#module-GRANTA_MIScriptingToolkit.UnitInformation). - -* **Return type:** - [`UnitInformation`](#module-GRANTA_MIScriptingToolkit.UnitInformation) - - - -#### *property* values - -Property values is of type [`FloatFunctionalValues`](#module-GRANTA_MIScriptingToolkit.FloatFunctionalValues). - -* **Return type:** - [`FloatFunctionalValues`](#module-GRANTA_MIScriptingToolkit.FloatFunctionalValues) - - - -#### AddFunctionalDataParameterSettings(\_functionalDataParameterSettings) - -Appends \_functionalDataParameterSettings to functionalDataParameterSettings property on FloatFunctionalGriddedDataType C-object. - -* **Parameters:** - **\_functionalDataParameterSettings** ([`FunctionalDataParameterSettings`](#module-GRANTA_MIScriptingToolkit.FunctionalDataParameterSettings)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### FloatFunctionalPointValue - - - -### *class* FloatFunctionalPointValue(constraints=None, value=None, isEstimated=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -A single grid point in Gridded Float-Valued Functional Data, where the Y-axis value is a point. - -* **Parameters:** - * **constraints** ([`Constraints`](#module-GRANTA_MIScriptingToolkit.Constraints)) - * **value** ([*float*](https://docs.python.org/3/library/functions.html#float)) - * **isEstimated** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - - - -#### *property* constraints - -Property constraints is of type [`Constraints`](#module-GRANTA_MIScriptingToolkit.Constraints). - -* **Return type:** - [`Constraints`](#module-GRANTA_MIScriptingToolkit.Constraints) - - - -#### *property* isEstimated - -Property isEstimated is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* value - -Property value is of type float. - -* **Return type:** - [float](https://docs.python.org/3/library/functions.html#float) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### FloatFunctionalRangeValue - - - -### *class* FloatFunctionalRangeValue(constraints=None, highValue=None, lowValue=None, isEstimated=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -A single grid point in Gridded Float-Valued Functional Data, where the Y-axis value is a range. - -* **Parameters:** - * **constraints** ([`Constraints`](#module-GRANTA_MIScriptingToolkit.Constraints)) - * **highValue** ([*float*](https://docs.python.org/3/library/functions.html#float)) - * **lowValue** ([*float*](https://docs.python.org/3/library/functions.html#float)) - * **isEstimated** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - - - -#### *property* constraints - -Property constraints is of type [`Constraints`](#module-GRANTA_MIScriptingToolkit.Constraints). - -* **Return type:** - [`Constraints`](#module-GRANTA_MIScriptingToolkit.Constraints) - - - -#### *property* highValue - -Property highValue is of type float. - -* **Return type:** - [float](https://docs.python.org/3/library/functions.html#float) - - - -#### *property* isEstimated - -Property isEstimated is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* lowValue - -Property lowValue is of type float. - -* **Return type:** - [float](https://docs.python.org/3/library/functions.html#float) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### FloatFunctionalSeriesDataType - - - -### *class* FloatFunctionalSeriesDataType(graph=None, isApplicable=None, unitInformation=None, functionalDataParameterSettings=None, \_isOwner=True) - -Bases: [`IDataValue`](#GRANTA_MIScriptingToolkit.IDataValue.IDataValue) - -A type to contain the values of float-valued functional series data. -For requests Graph, and [`Parameters`](#module-GRANTA_MIScriptingToolkit.Parameters) are required. - -* **Parameters:** - * **graph** ([`FloatFunctionalSeriesGraph`](#module-GRANTA_MIScriptingToolkit.FloatFunctionalSeriesGraph)) - * **isApplicable** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **unitInformation** ([`UnitInformation`](#module-GRANTA_MIScriptingToolkit.UnitInformation)) - * **functionalDataParameterSettings** (list of [`FunctionalDataParameterSettings`](#module-GRANTA_MIScriptingToolkit.FunctionalDataParameterSettings)) - - - -#### *property* functionalDataParameterSettings - -Property functionalDataParameterSettings is a list of [`FunctionalDataParameterSettings`](#module-GRANTA_MIScriptingToolkit.FunctionalDataParameterSettings) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`FunctionalDataParameterSettings`](#module-GRANTA_MIScriptingToolkit.FunctionalDataParameterSettings) - - - -#### *property* graph - -Property graph is of type [`FloatFunctionalSeriesGraph`](#module-GRANTA_MIScriptingToolkit.FloatFunctionalSeriesGraph). - -* **Return type:** - [`FloatFunctionalSeriesGraph`](#module-GRANTA_MIScriptingToolkit.FloatFunctionalSeriesGraph) - - - -#### *property* isApplicable - -Property isApplicable is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* unitInformation - -Property unitInformation is of type [`UnitInformation`](#module-GRANTA_MIScriptingToolkit.UnitInformation). - -* **Return type:** - [`UnitInformation`](#module-GRANTA_MIScriptingToolkit.UnitInformation) - - - -#### AddFunctionalDataParameterSettings(\_functionalDataParameterSettings) - -Appends \_functionalDataParameterSettings to functionalDataParameterSettings property on FloatFunctionalSeriesDataType C-object. - -* **Parameters:** - **\_functionalDataParameterSettings** ([`FunctionalDataParameterSettings`](#module-GRANTA_MIScriptingToolkit.FunctionalDataParameterSettings)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### FloatFunctionalSeriesGraph - - - -### *class* FloatFunctionalSeriesGraph(XAxisParameter=None, hideGraph=None, logarithmicYAxis=None, series=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -A type a collection of [`Series`](#module-GRANTA_MIScriptingToolkit.Series) objects that contain the data -functional data and parameter information for the graph x-axis. -For requests an XAxisParameter is required. - -* **Parameters:** - * **XAxisParameter** ([`ParameterInformation`](#module-GRANTA_MIScriptingToolkit.ParameterInformation)) - * **hideGraph** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **logarithmicYAxis** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **series** (list of [`Series`](#module-GRANTA_MIScriptingToolkit.Series)) - - - -#### *property* series - -Property series is a list of [`Series`](#module-GRANTA_MIScriptingToolkit.Series) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`Series`](#module-GRANTA_MIScriptingToolkit.Series) - - - -#### *property* hideGraph - -Property hideGraph is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* logarithmicYAxis - -Property logarithmicYAxis is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* XAxisParameter - -Property XAxisParameter is of type [`ParameterInformation`](#module-GRANTA_MIScriptingToolkit.ParameterInformation). - -* **Return type:** - [`ParameterInformation`](#module-GRANTA_MIScriptingToolkit.ParameterInformation) - - - -#### AddSeries(\_series) - -Appends \_series to series property on FloatFunctionalSeriesGraph C-object. - -* **Parameters:** - **\_series** ([`Series`](#module-GRANTA_MIScriptingToolkit.Series)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### FloatFunctionalValues - - - -### *class* FloatFunctionalValues(pointValues=None, rangeValues=None, valueType=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -A collection of [`FloatFunctionalPointValue`](#module-GRANTA_MIScriptingToolkit.FloatFunctionalPointValue) and -[`FloatFunctionalRangeValue`](#module-GRANTA_MIScriptingToolkit.FloatFunctionalRangeValue) objects. - -* **Parameters:** - * **pointValues** (list of [`FloatFunctionalPointValue`](#module-GRANTA_MIScriptingToolkit.FloatFunctionalPointValue)) - * **rangeValues** (list of [`FloatFunctionalRangeValue`](#module-GRANTA_MIScriptingToolkit.FloatFunctionalRangeValue)) - * **valueType** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* pointValues - -Property pointValues is a list of [`FloatFunctionalPointValue`](#module-GRANTA_MIScriptingToolkit.FloatFunctionalPointValue) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`FloatFunctionalPointValue`](#module-GRANTA_MIScriptingToolkit.FloatFunctionalPointValue) - - - -#### *property* rangeValues - -Property rangeValues is a list of [`FloatFunctionalRangeValue`](#module-GRANTA_MIScriptingToolkit.FloatFunctionalRangeValue) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`FloatFunctionalRangeValue`](#module-GRANTA_MIScriptingToolkit.FloatFunctionalRangeValue) - - - -#### *property* valueType - -Property valueType is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### AddPointValue(\_floatFunctionalPointValue) - -Appends \_floatFunctionalPointValue to pointValues property on FloatFunctionalValues C-object. - -* **Parameters:** - **\_floatFunctionalPointValue** ([`FloatFunctionalPointValue`](#module-GRANTA_MIScriptingToolkit.FloatFunctionalPointValue)) - - - -#### AddRangeValue(\_floatFunctionalRangeValue) - -Appends \_floatFunctionalRangeValue to rangeValues property on FloatFunctionalValues C-object. - -* **Parameters:** - **\_floatFunctionalRangeValue** ([`FloatFunctionalRangeValue`](#module-GRANTA_MIScriptingToolkit.FloatFunctionalRangeValue)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### FunctionalDataParameterSettings - - - -### *class* FunctionalDataParameterSettings(datumDefaultValue=None, datumInterpolationMethod=None, datumScaleType=None, effectiveDefaultValue=None, effectiveDefaultValueDefinedAt=None, effectiveInterpolationMethod=None, effectiveInterpolationMethodDefinedAt=None, effectiveScaleType=None, effectiveScaleTypeDefinedAt=None, hasDatumDefaultValue=None, hasDatumInterpolationMethod=None, hasDatumScaleType=None, hasEffectiveDefaultValue=None, parameter=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Information about the use of a parameter for a given Functional Data Attribute. - -* **Parameters:** - * **datumDefaultValue** ([`DefaultParameterValue`](#module-GRANTA_MIScriptingToolkit.DefaultParameterValue)) - * **datumInterpolationMethod** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **datumScaleType** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **effectiveDefaultValue** ([`DefaultParameterValue`](#module-GRANTA_MIScriptingToolkit.DefaultParameterValue)) - * **effectiveDefaultValueDefinedAt** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **effectiveInterpolationMethod** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **effectiveInterpolationMethodDefinedAt** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **effectiveScaleType** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **effectiveScaleTypeDefinedAt** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **hasDatumDefaultValue** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **hasDatumInterpolationMethod** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **hasDatumScaleType** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **hasEffectiveDefaultValue** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **parameter** ([`ParameterInformation`](#module-GRANTA_MIScriptingToolkit.ParameterInformation)) - - - -#### *property* datumDefaultValue - -Property datumDefaultValue is of type [`DefaultParameterValue`](#module-GRANTA_MIScriptingToolkit.DefaultParameterValue). - -* **Return type:** - [`DefaultParameterValue`](#module-GRANTA_MIScriptingToolkit.DefaultParameterValue) - - - -#### *property* datumInterpolationMethod - -Property datumInterpolationMethod is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* datumScaleType - -Property datumScaleType is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* effectiveDefaultValue - -Property effectiveDefaultValue is of type [`DefaultParameterValue`](#module-GRANTA_MIScriptingToolkit.DefaultParameterValue). - -* **Return type:** - [`DefaultParameterValue`](#module-GRANTA_MIScriptingToolkit.DefaultParameterValue) - - - -#### *property* effectiveDefaultValueDefinedAt - -Property effectiveDefaultValueDefinedAt is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* effectiveInterpolationMethod - -Property effectiveInterpolationMethod is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* effectiveInterpolationMethodDefinedAt - -Property effectiveInterpolationMethodDefinedAt is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* effectiveScaleType - -Property effectiveScaleType is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* effectiveScaleTypeDefinedAt - -Property effectiveScaleTypeDefinedAt is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* hasDatumDefaultValue - -Property hasDatumDefaultValue is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* hasDatumInterpolationMethod - -Property hasDatumInterpolationMethod is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* hasDatumScaleType - -Property hasDatumScaleType is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* hasEffectiveDefaultValue - -Property hasEffectiveDefaultValue is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* parameter - -Property parameter is of type [`ParameterInformation`](#module-GRANTA_MIScriptingToolkit.ParameterInformation). - -* **Return type:** - [`ParameterInformation`](#module-GRANTA_MIScriptingToolkit.ParameterInformation) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### FunctionalDataSettings - - - -### *class* FunctionalDataSettings(convertGridToSeries=None, maxSeries=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Settings affecting the export of Functional Data. -If convertGridToSeries is true, gridded Functional Data will be converted to series data, allowing -you to avoid the need to deal with the gridded data format. - -* **Parameters:** - * **convertGridToSeries** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **maxSeries** ([*int*](https://docs.python.org/3/library/functions.html#int)) - - - -#### *property* convertGridToSeries - -Property convertGridToSeries is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* maxSeries - -Property maxSeries is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### GRANTA_Constants - - - -### *class* \_BinaryDataRepresentation - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - - - -#### Inline *= 0* - - - -#### URL *= 1* - - - -### *class* \_VersionPolicy - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - - - -#### NoPolicy *= 0* - - - -#### IncludeAll *= 1* - - - -#### LatestVersionPerName *= 2* - - - -### *class* \_GraphDecoration - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - - - -#### Lines *= 0* - - - -#### Markers *= 1* - - - -#### LinesAndMarkers *= 2* - - - -### *class* \_ImportTypes - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - - - -#### Create *= 'Create'* - - - -#### Update *= 'Update'* - - - -#### Copy *= 'Copy'* - - - -### *class* \_UpdateSubsetsMode - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - - - -#### Append *= 1* - - - -#### Replace *= 2* - - - -### *class* \_SearchMode - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - - - -#### Normal *= 0* - - - -#### ReadOnly *= 1* - - - -#### Unspecified *= 2* - - - -### *class* \_TablesFilter - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - - - -#### NoFilter *= 0* - - - -#### MaterialsTablesOnly *= 1* - - - -#### ProcessesTablesOnly *= 2* - - - -#### SubstancesTablesOnly *= 3* - - - -#### LegislationsTablesOnly *= 4* - - - -#### TransportTypesTablesOnly *= 5* - - - -#### RegionsTablesOnly *= 6* - - - -#### EndOfLifeOptionsTablesOnly *= 7* - - - -#### EnergyConversionOptionsTablesOnly *= 8* - - - -#### CoatingsTablesOnly *= 9* - - - -#### PartsTablesOnly *= 10* - - - -#### InHouseTablesOnly *= 11* - - - -#### SequenceSpecificationsTablesOnly *= 12* - - - -#### ElementsTablesOnly *= 13* - - - -#### UniverseTablesOnly *= 14* - - - -#### ProducersTablesOnly *= 15* - - - -#### ShapeTablesOnly *= 16* - - - -#### ReferenceTablesOnly *= 17* - - - -#### MobileUseTypesTablesOnly *= 18* - - - -### *class* \_ParameterTypes - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - - - -#### Numeric *= 'Numeric'* - - - -#### Discrete *= 'Discrete'* - - - -### *class* \_ImportErrorMode - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - - - -#### Fault *= 'FaultAndRollbackOnAnyError'* - - - -#### Continue *= 'LogAndContinueWherePossible'* - - - -### *class* \_RecordLinkGroupTypes - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - - - -#### Static *= 'static'* - - - -#### Dynamic *= 'dynamic'* - - - -#### CrossDatabase *= 'crossDatabase'* - - - -### *class* \_RecordLinkCheckMode - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - - - -#### Forward *= 'CheckOnlyForwardLinks'* - - - -#### ForwardAndReverse *= 'CheckForwardAndReverseLinks'* - - - -### *class* \_MinMaxType - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - - - -#### MMNone *= 0* - - - -#### MMApproximate *= 1* - - - -#### MMTrue *= 2* - - - -### *class* GRANTA_Constants - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - - - -#### POINT_TYPE_STRING *= 'POIN'* - - - -#### RANGE_TYPE_STRING *= 'RNGE'* - - - -#### FLOAT_FUNCTIONAL_TYPE_STRING *= 'FUNC'* - - - -#### INTEGER_TYPE_STRING *= 'INPT'* - - - -#### LOGICAL_TYPE_STRING *= 'LOGI'* - - - -#### DISCRETE_TYPE_STRING *= 'DISC'* - - - -#### SHORT_TEXT_TYPE_STRING *= 'STXT'* - - - -#### LONG_TEXT_TYPE_STRING *= 'LTXT'* - - - -#### HYPERLINK_TYPE_STRING *= 'HLNK'* - - - -#### FLOAT_FUNCTIONAL_SERIES_TYPE_STRING *= 'FLOAT_FUNCTIONAL_SERIES'* - - - -#### FLOAT_FUNCTIONAL_GRIDDED_TYPE_STRING *= 'FLOAT_FUNCTIONAL_GRIDDED'* - - - -#### POINT_XYDATA_TYPE_STRING *= 'XYPoint'* - - - -#### RANGE_XYDATA_TYPE_STRING *= 'XYRange'* - - - -#### BinaryDataRepresentation - -alias of [`_BinaryDataRepresentation`](#GRANTA_MIScriptingToolkit.GRANTA_Constants._BinaryDataRepresentation) - - - -#### VersionPolicy - -alias of [`_VersionPolicy`](#GRANTA_MIScriptingToolkit.GRANTA_Constants._VersionPolicy) - - - -#### GraphDecoration - -alias of [`_GraphDecoration`](#GRANTA_MIScriptingToolkit.GRANTA_Constants._GraphDecoration) - - - -#### ImportTypes - -alias of [`_ImportTypes`](#GRANTA_MIScriptingToolkit.GRANTA_Constants._ImportTypes) - - - -#### UpdateSubsetsMode - -alias of [`_UpdateSubsetsMode`](#GRANTA_MIScriptingToolkit.GRANTA_Constants._UpdateSubsetsMode) - - - -#### SearchMode - -alias of [`_SearchMode`](#GRANTA_MIScriptingToolkit.GRANTA_Constants._SearchMode) - - - -#### TablesFilter - -alias of [`_TablesFilter`](#GRANTA_MIScriptingToolkit.GRANTA_Constants._TablesFilter) - - - -#### ParameterTypes - -alias of [`_ParameterTypes`](#GRANTA_MIScriptingToolkit.GRANTA_Constants._ParameterTypes) - - - -#### ImportErrorMode - -alias of [`_ImportErrorMode`](#GRANTA_MIScriptingToolkit.GRANTA_Constants._ImportErrorMode) - - - -#### RecordLinkGroupTypes - -alias of [`_RecordLinkGroupTypes`](#GRANTA_MIScriptingToolkit.GRANTA_Constants._RecordLinkGroupTypes) - - - -#### RecordLinkCheckMode - -alias of [`_RecordLinkCheckMode`](#GRANTA_MIScriptingToolkit.GRANTA_Constants._RecordLinkCheckMode) - - - -#### MinMaxType - -alias of [`_MinMaxType`](#GRANTA_MIScriptingToolkit.GRANTA_Constants._MinMaxType) - - - - - -### GRANTA_Exceptions - - - -### *exception* GRANTA_Exception(expr, msg) - -Bases: [`Exception`](https://docs.python.org/3/library/exceptions.html#Exception) - -Exception raised when there are errors in input. - -* **Parameters:** - * **expr** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – Input expression in which the error occurred - * **msg** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – Explanation of the error - - - -### *exception* GRANTA_ServiceLayerError(slResponse, operation) - -Bases: [`Exception`](https://docs.python.org/3/library/exceptions.html#Exception) - -Exception raised when the Granta MI Service Layer returns an error. - -* **Parameters:** - * **slResponse** ([`ServiceLayerResponse`](#GRANTA_MIScriptingToolkit.ServiceLayerResponse.ServiceLayerResponse)) – Request data causing this error - * **operation** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – Name of the operation from which this exception originated - - - -#### *property* responseXML - -Content of the XML response for this Service Layer message. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* requestXML - -Content of the XML request for this Service Layer message. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* responseCode - -HTTP Status code received from the Service Layer. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* message - -Error message received from the Service Layer if an error occurred while processing the request, or the HTTP -status message corresponding to the status code received. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* operation - -The Operation invoked by this Service Layer message. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* data - -The raw ServiceLayerResponse object. - -* **Return type:** - [`ServiceLayerResponse`](#GRANTA_MIScriptingToolkit.ServiceLayerResponse.ServiceLayerResponse) - - - - - -### GRANTA_Logging - - - -### *class* GRANTA_Logging - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Implements some basic logging functionality. Tracked events are printed to the console. -: For comprehensive logging capabilities, use the Python ‘logging’ module. - - - -#### propagate *= True* - - - -#### *property* core_logger - - - -#### *property* http_logger - - - -#### info(message) - - - -#### debug(message) - - - -#### warning(message) - - - -#### error(message) - - - - - -### GRANTA_MISession - - - -### *class* GRANTA_MISession(url, username=None, password=None, domain=None, verbosity='ERROR', autoLogon=False, receiveTimeout=300000, authorization=None, retries=0) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -The base object for the GRANTA_MIScripting toolkit. This creates a connection to a -Granta MI Server via a Granta MI Service Layer. - -Parameters username, password, domain, and autoLogon are optional - use either SetCredentials or -UseAutoLogon to specify the desired authentication method if these are omitted. - -* **Parameters:** - * **url** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – URL of your Granta MI Service Layer installation - * **username** ([`str`](https://docs.python.org/3/library/stdtypes.html#str), optional) – Your Granta MI username (for Basic authentication) - * **password** ([`str`](https://docs.python.org/3/library/stdtypes.html#str), optional) – Your Granta MI password (for Basic authentication) - * **domain** ([`str`](https://docs.python.org/3/library/stdtypes.html#str), optional) – Your Granta MI user domain (for Basic authentication) - * **verbosity** ([`str`](https://docs.python.org/3/library/stdtypes.html#str), {‘ERROR’, ‘WARNING’, ‘DEBUG’}) – Logging verbosity - * **autoLogon** ([`bool`](https://docs.python.org/3/library/functions.html#bool), default: False) – If set to True, this object will authenticate as the current Windows user - * **receiveTimeout** ([*int*](https://docs.python.org/3/library/functions.html#int)) – Time in milliseconds to wait for a response before timing out - * **authorization** ([`OIDC`](#GRANTA_MIScriptingToolkit.OIDC.OIDC) object) – Authorization plugin (for OpenID Connect authentication) - * **retries** ([`int`](https://docs.python.org/3/library/functions.html#int), default: 0) – The number of times to retry failing requests - -#### 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. - - - -#### TestConnection() - -Raises a GRANTA_Exception if connection cannot be made - -For example if bad credentials are provided, or Granta MI Service Layer is unreachable - - - -#### *property* browseService - -Service providing schema browse operations. - -* **Return type:** - [`BrowseService`](#GRANTA_MIScriptingToolkit.BrowseService.BrowseService) - - - -#### *property* searchService - -Service providing record search operations. - -* **Return type:** - [`SearchService`](#GRANTA_MIScriptingToolkit.SearchService.SearchService) - - - -#### *property* dataExportService - -Service providing data export operations. - -* **Return type:** - [`DataExportService`](#GRANTA_MIScriptingToolkit.DataExportService.DataExportService) - - - -#### *property* dataImportService - -Service providing data import operations. - -* **Return type:** - [`DataImportService`](#GRANTA_MIScriptingToolkit.DataImportService.DataImportService) - - - -#### *property* engineeringDataService - -Service providing export operations for Finite Element Analysis material cards. - -* **Return type:** - [`EngineeringDataService`](#GRANTA_MIScriptingToolkit.EngineeringDataService.EngineeringDataService) - - - -#### *property* recordManipulatorService - -Service providing additional operations for record manipulation. - -* **Return type:** - [`RecordManipulatorService`](#GRANTA_MIScriptingToolkit.RecordManipulatorService.RecordManipulatorService) - - - - - -### GetAssociatedRecordsRequest - - - -### *class* GetAssociatedRecordsRequest(attributeReferences=None, linkDirection=None, populateGUIDs=None, recordFilter=None, recordReferences=None, tableReference=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Input for the GetAssociatedRecords operation. - -* **Parameters:** - * **attributeReferences** (list of [`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference)) - * **linkDirection** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **populateGUIDs** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **recordFilter** ([`RecordFilter`](#module-GRANTA_MIScriptingToolkit.RecordFilter)) - * **recordReferences** (list of [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference)) - * **tableReference** ([`TableReference`](#module-GRANTA_MIScriptingToolkit.TableReference)) - - - -#### *class* AssociationLinkDirection - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - - - -#### NONE *= 0* - - - -#### Both *= 1* - - - -#### Forward *= 2* - - - -#### Reverse *= 3* - - - -#### *property* attributeReferences - -Property attributeReferences is a list of [`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference) - - - -#### *property* recordReferences - -Property recordReferences is a list of [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) - - - -#### *property* linkDirection - -Property linkDirection is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* populateGUIDs - -Property populateGUIDs is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* recordFilter - -Property recordFilter is of type [`RecordFilter`](#module-GRANTA_MIScriptingToolkit.RecordFilter). - -* **Return type:** - [`RecordFilter`](#module-GRANTA_MIScriptingToolkit.RecordFilter) - - - -#### *property* tableReference - -Property tableReference is of type [`TableReference`](#module-GRANTA_MIScriptingToolkit.TableReference). - -* **Return type:** - [`TableReference`](#module-GRANTA_MIScriptingToolkit.TableReference) - - - -#### AddAttributeReference(\_attributeReference) - -Appends \_attributeReference to attributeReferences property on GetAssociatedRecordsRequest C-object. - -* **Parameters:** - **\_attributeReference** ([`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference)) - - - -#### AddRecordReference(\_recordReference) - -Appends \_recordReference to recordReferences property on GetAssociatedRecordsRequest C-object. - -* **Parameters:** - **\_recordReference** ([`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### GetAssociatedRecordsResponse - - - -### *class* GetAssociatedRecordsResponse(c_obj) - -Bases: [`Response`](#GRANTA_MIScriptingToolkit.Response.Response) - -Output from the GetAssociatedRecords operation. -An array of [`AssociatedRecords`](#module-GRANTA_MIScriptingToolkit.AssociatedRecords) objects. - -* **Parameters:** - **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a GetAssociatedRecordsResponse object. - - - -#### *property* associatedRecords - -Property associatedRecords is a list of [`AssociatedRecords`](#module-GRANTA_MIScriptingToolkit.AssociatedRecords) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`AssociatedRecords`](#module-GRANTA_MIScriptingToolkit.AssociatedRecords) - - - -#### AddAssociatedRecords(\_associatedRecords) - -Appends \_associatedRecords to associatedRecords property on GetAssociatedRecordsResponse C-object. - -* **Parameters:** - **\_associatedRecords** ([`AssociatedRecords`](#module-GRANTA_MIScriptingToolkit.AssociatedRecords)) - - - - - -### GetAttributeDetailsRequest - - - -### *class* GetAttributeDetailsRequest(attributeReferences=None, minMaxCalculation=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Input for the GetAttributeDetails operation. -For requests at least one [`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference) is required. - -* **Parameters:** - * **attributeReferences** (list of [`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference)) - * **minMaxCalculation** ([*int*](https://docs.python.org/3/library/functions.html#int)) - - - -#### *property* attributeReferences - -Property attributeReferences is a list of [`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference) - - - -#### *property* minMaxCalculation - -Property minMaxCalculation is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### AddAttributeReference(\_attributeReference) - -Appends \_attributeReference to attributeReferences property on GetAttributeDetailsRequest C-object. - -* **Parameters:** - **\_attributeReference** ([`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### GetAttributeDetailsResponse - - - -### *class* GetAttributeDetailsResponse(c_obj) - -Bases: [`Response`](#GRANTA_MIScriptingToolkit.Response.Response) - -Output from the GetAttributeDetails operation. -Includes an array of [`AttributeDetail`](#module-GRANTA_MIScriptingToolkit.AttributeDetail) objects and a -[`ServiceLayerResponse`](#module-GRANTA_MIScriptingToolkit.ServiceLayerResponse) object. - -* **Parameters:** - **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a GetAttributeDetailsResponse object. - - - -#### *property* attributeDetails - -Property attributeDetails is a list of [`AttributeDetail`](#module-GRANTA_MIScriptingToolkit.AttributeDetail) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`AttributeDetail`](#module-GRANTA_MIScriptingToolkit.AttributeDetail) - - - -#### AddAttributeDetails(\_attributeDetail) - -Appends \_attributeDetail to attributeDetails property on GetAttributeDetailsResponse C-object. - -* **Parameters:** - **\_attributeDetail** ([`AttributeDetail`](#module-GRANTA_MIScriptingToolkit.AttributeDetail)) - - - - - -### GetAttributeParametersRequest - - - -### *class* GetAttributeParametersRequest(attributeReferences=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Input for the GetAttributeParameters operation. -For requests, at least one [`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference) is required. - -* **Parameters:** - **attributeReferences** (list of [`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference)) - - - -#### *property* attributeReferences - -Property attributeReferences is a list of [`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference) - - - -#### AddAttributeReference(\_attributeReference) - -Appends \_attributeReference to attributeReferences property on GetAttributeParametersRequest C-object. - -* **Parameters:** - **\_attributeReference** ([`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### GetAttributeParametersResponse - - - -### *class* GetAttributeParametersResponse(c_obj) - -Bases: [`Response`](#GRANTA_MIScriptingToolkit.Response.Response) - -Output from the GetAttributeParameters operation. -Includes an array of [`ParameterDetail`](#module-GRANTA_MIScriptingToolkit.ParameterDetail) objects and a -[`ServiceLayerResponse`](#module-GRANTA_MIScriptingToolkit.ServiceLayerResponse) object. - -* **Parameters:** - **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a GetAttributeParametersResponse object. - - - -#### *property* attributeParameters - -Property attributeParameters is a list of [`ParameterDetail`](#module-GRANTA_MIScriptingToolkit.ParameterDetail) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`ParameterDetail`](#module-GRANTA_MIScriptingToolkit.ParameterDetail) - - - - - -### GetAvailableExportersRequest - - - -### *class* GetAvailableExportersRequest(DBKey=None, applicabilityTag=None, matchDB=None, model=None, package=None, partialTableReference=None, versionPolicy=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Input for the GetAvailableExporters operation. - -* **Parameters:** - * **DBKey** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **applicabilityTag** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **matchDB** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **model** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **package** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **partialTableReference** ([`PartialTableReference`](#module-GRANTA_MIScriptingToolkit.PartialTableReference)) - * **versionPolicy** ([*int*](https://docs.python.org/3/library/functions.html#int)) - - - -#### *property* applicabilityTag - -Property applicabilityTag is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* DBKey - -Property DBKey is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* matchDB - -Property matchDB is of type bool. If true, we check that the exporter config Table element is in a Database element for the right dbKey. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* model - -Property model is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* package - -Property package is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* partialTableReference - -Property partialTableReference is of type [`PartialTableReference`](#module-GRANTA_MIScriptingToolkit.PartialTableReference). - -* **Return type:** - [`PartialTableReference`](#module-GRANTA_MIScriptingToolkit.PartialTableReference) - - - -#### *property* versionPolicy - -Property versionPolicy is of type int. See [`GRANTA_Constants`](#module-GRANTA_MIScriptingToolkit.GRANTA_Constants) for supported values. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### GetAvailableExportersResponse - - - -### *class* GetAvailableExportersResponse(c_obj) - -Bases: [`Response`](#GRANTA_MIScriptingToolkit.Response.Response) - -Output from the GetAvailableExporters operation. Contains a list of exporters. - -* **Parameters:** - **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a GetAvailableExportersResponse object. - - - -#### *property* exporters - -Property exporters is a list of [`Exporter`](#module-GRANTA_MIScriptingToolkit.Exporter) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`Exporter`](#module-GRANTA_MIScriptingToolkit.Exporter) - - - - - -### GetChildNodes - - - -### *class* GetChildNodes(excludeWithdrawn=None, parent=None, populateGUIDs=None, recordFilter=None, recurse=None, recurseMaxDepth=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Input for the GetChildNodes operation. -A [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) for the record you wish to find the children -of is required. - -* **Parameters:** - * **excludeWithdrawn** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **parent** ([`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference)) - * **populateGUIDs** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **recordFilter** ([`RecordFilter`](#module-GRANTA_MIScriptingToolkit.RecordFilter)) - * **recurse** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **recurseMaxDepth** ([*int*](https://docs.python.org/3/library/functions.html#int)) - - - -#### *property* excludeWithdrawn - -Property excludeWithdrawn is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* parent - -Property parent is of type [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference). - -* **Return type:** - [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) - - - -#### *property* populateGUIDs - -Property populateGUIDs is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* recordFilter - -Property recordFilter is of type [`RecordFilter`](#module-GRANTA_MIScriptingToolkit.RecordFilter). - -* **Return type:** - [`RecordFilter`](#module-GRANTA_MIScriptingToolkit.RecordFilter) - - - -#### *property* recurse - -Property recurse is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* recurseMaxDepth - -Property recurseMaxDepth is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### GetChildNodesResponse - - - -### *class* GetChildNodesResponse(c_obj) - -Bases: [`Response`](#GRANTA_MIScriptingToolkit.Response.Response) - -Response for the [`GetChildNodes`](#module-GRANTA_MIScriptingToolkit.GetChildNodes) operation. -Includes an array of [`TreeRecord`](#module-GRANTA_MIScriptingToolkit.TreeRecord) objects and a -[`ServiceLayerResponse`](#module-GRANTA_MIScriptingToolkit.ServiceLayerResponse) object. - -* **Parameters:** - **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a GetChildNodesResponse object. - - - -#### *property* treeRecords - -Property treeRecords is a list of [`TreeRecord`](#module-GRANTA_MIScriptingToolkit.TreeRecord) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`TreeRecord`](#module-GRANTA_MIScriptingToolkit.TreeRecord) - - - -#### AddTreeRecord(\_treeRecord) - -Appends \_treeRecord to treeRecords property on GetChildNodesResponse C-object. - -* **Parameters:** - **\_treeRecord** ([`TreeRecord`](#module-GRANTA_MIScriptingToolkit.TreeRecord)) - - - - - -### GetCurrenciesResponse - - - -### *class* GetCurrenciesResponse(c_obj) - -Bases: [`Response`](#GRANTA_MIScriptingToolkit.Response.Response) - -Response for the GetCurrencies operation. -Includes an array of [`CurrencyDetail`](#module-GRANTA_MIScriptingToolkit.CurrencyDetail) objects and a -[`ServiceLayerResponse`](#module-GRANTA_MIScriptingToolkit.ServiceLayerResponse) object. - -* **Parameters:** - **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a GetCurrenciesResponse object. - - - -#### *property* currencies - -Property currencies is a list of [`CurrencyDetail`](#module-GRANTA_MIScriptingToolkit.CurrencyDetail) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`CurrencyDetail`](#module-GRANTA_MIScriptingToolkit.CurrencyDetail) - - - - - -### GetDatabaseParameters - - - -### *class* GetDatabaseParameters(DBKey=None, requireStandardNames=None, useStandardNamesWherePossible=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Input for the GetDatabaseParameters operation. -Requires a DBKey to be set. The parameters requireStandardNames and useStandardNamesWherePossible -both default to false. - -* **Parameters:** - * **DBKey** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **requireStandardNames** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **useStandardNamesWherePossible** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - - - -#### *property* DBKey - -Property DBKey is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* requireStandardNames - -Property requireStandardNames is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* useStandardNamesWherePossible - -Property useStandardNamesWherePossible is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### GetDatabaseParametersResponse - - - -### *class* GetDatabaseParametersResponse(c_obj) - -Bases: [`Response`](#GRANTA_MIScriptingToolkit.Response.Response) - -Output from the GetDatabaseParametersResponse operation. -Includes an array of [`ParameterDetail`](#module-GRANTA_MIScriptingToolkit.ParameterDetail) objects and a -[`ServiceLayerResponse`](#module-GRANTA_MIScriptingToolkit.ServiceLayerResponse) object. - -* **Parameters:** - **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a GetDatabaseParametersResponse object. - - - -#### *property* parameterDetails - -Property parameterDetails is a list of [`ParameterDetail`](#module-GRANTA_MIScriptingToolkit.ParameterDetail) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`ParameterDetail`](#module-GRANTA_MIScriptingToolkit.ParameterDetail) - - - -#### AddParameterDetail(\_parameterDetail) - -Appends \_parameterDetail to parameterDetails property on GetDatabaseParametersResponse C-object. - -* **Parameters:** - **\_parameterDetail** ([`ParameterDetail`](#module-GRANTA_MIScriptingToolkit.ParameterDetail)) - - - - - -### GetDatabasesResponse - - - -### *class* GetDatabasesResponse(c_obj) - -Bases: [`Response`](#GRANTA_MIScriptingToolkit.Response.Response) - -Output from the GetDatabases operation. -Includes an array of [`DatabaseDetail`](#module-GRANTA_MIScriptingToolkit.DatabaseDetail) objects and a -[`ServiceLayerResponse`](#module-GRANTA_MIScriptingToolkit.ServiceLayerResponse) object. - -* **Parameters:** - **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a GetDatabasesResponse object. - - - -#### *property* databases - -Property databases is a list of [`DatabaseDetail`](#module-GRANTA_MIScriptingToolkit.DatabaseDetail) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`DatabaseDetail`](#module-GRANTA_MIScriptingToolkit.DatabaseDetail) - - - -#### AddDatabase(\_databaseDetail) - -Appends \_databaseDetail to databases property on GetDatabasesResponse C-object. - -* **Parameters:** - **\_databaseDetail** ([`DatabaseDetail`](#module-GRANTA_MIScriptingToolkit.DatabaseDetail)) - - - - - -### GetDatasheetPath - - - -### *class* GetDatasheetPath(datasheetType=None, recordReferences=None, unitConversionContext=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Input for the GetDatasheetPath operation. -Requires at least one [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) to be provided. The -parameters unitConversionContext and datasheetType are optional. datasheetType defaults to -‘Datasheet’. - -* **Parameters:** - * **datasheetType** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **recordReferences** (list of [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference)) - * **unitConversionContext** ([`UnitConversionContext`](#module-GRANTA_MIScriptingToolkit.UnitConversionContext)) - - - -#### *property* recordReferences - -Property recordReferences is a list of [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) - - - -#### *property* datasheetType - -Property datasheetType is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* unitConversionContext - -Property unitConversionContext is of type [`UnitConversionContext`](#module-GRANTA_MIScriptingToolkit.UnitConversionContext). - -* **Return type:** - [`UnitConversionContext`](#module-GRANTA_MIScriptingToolkit.UnitConversionContext) - - - -#### AddRecordReference(\_recordReference) - -Appends \_recordReference to recordReferences property on GetDatasheetPath C-object. - -* **Parameters:** - **\_recordReference** ([`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### GetDatasheetPathParameterized - - - -### *class* GetDatasheetPathParameterized(DBKey=None, datasheetType=None, unitConversionContext=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Input for the GetDatasheetPathParameterized operation. -Requires a DBKey to be set. The parameters unitConversionContext and datasheetType are optional. -datasheetType defaults to ‘Datasheet’. - -* **Parameters:** - * **DBKey** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **datasheetType** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **unitConversionContext** ([`UnitConversionContext`](#module-GRANTA_MIScriptingToolkit.UnitConversionContext)) - - - -#### *property* DBKey - -Property DBKey is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* datasheetType - -Property datasheetType is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* unitConversionContext - -Property unitConversionContext is of type [`UnitConversionContext`](#module-GRANTA_MIScriptingToolkit.UnitConversionContext). - -* **Return type:** - [`UnitConversionContext`](#module-GRANTA_MIScriptingToolkit.UnitConversionContext) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### GetDatasheetPathParameterizedResponse - - - -### *class* GetDatasheetPathParameterizedResponse(c_obj) - -Bases: [`Response`](#GRANTA_MIScriptingToolkit.Response.Response) - -Output from the [`GetDatasheetPathParameterized`](#module-GRANTA_MIScriptingToolkit.GetDatasheetPathParameterized) operation. -Includes an array of DatasheetPathParameterized objects and a -[`ServiceLayerResponse`](#module-GRANTA_MIScriptingToolkit.ServiceLayerResponse) object. - -* **Parameters:** - **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a GetDatasheetPathParameterizedResponse object. - - - -#### *property* currencyQuery - -Property currencyQuery is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* DBKeyQuery - -Property DBKeyQuery is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* recordHistoryIdentityQueryName - -Property recordHistoryIdentityQueryName is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* URL - -Property URL is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* unitSystemQuery - -Property unitSystemQuery is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - - - -### GetDatasheetPathResponse - - - -### *class* GetDatasheetPathResponse(c_obj) - -Bases: [`Response`](#GRANTA_MIScriptingToolkit.Response.Response) - -Output from the [`GetDatasheetPath`](#module-GRANTA_MIScriptingToolkit.GetDatasheetPath) operation. -Includes an array of [`DatasheetPath`](#module-GRANTA_MIScriptingToolkit.DatasheetPath) objects and a -[`ServiceLayerResponse`](#module-GRANTA_MIScriptingToolkit.ServiceLayerResponse) object. - -* **Parameters:** - **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a GetDatasheetPathResponse object. - - - -#### *property* datasheetPaths - -Property datasheetPaths is a list of [`DatasheetPath`](#module-GRANTA_MIScriptingToolkit.DatasheetPath) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`DatasheetPath`](#module-GRANTA_MIScriptingToolkit.DatasheetPath) - - - - - -### GetExporterParametersRequest - - - -### *class* GetExporterParametersRequest(exporterKey=None, populateGUIDs=None, records=None, unitConversionContext=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Input for the GetExporterParameters operation. - -* **Parameters:** - * **exporterKey** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **populateGUIDs** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **records** (list of [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference)) - * **unitConversionContext** ([`UnitConversionContext`](#module-GRANTA_MIScriptingToolkit.UnitConversionContext)) - - - -#### *property* records - -Property records is a list of [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) - - - -#### *property* exporterKey - -Property exporterKey is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* populateGUIDs - -Property populateGUIDs is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* unitConversionContext - -Property unitConversionContext is of type [`UnitConversionContext`](#module-GRANTA_MIScriptingToolkit.UnitConversionContext). - -* **Return type:** - [`UnitConversionContext`](#module-GRANTA_MIScriptingToolkit.UnitConversionContext) - - - -#### AddRecord(\_recordReference) - -Appends \_recordReference to records property on GetExporterParametersRequest C-object. - -* **Parameters:** - **\_recordReference** ([`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### GetExporterParametersResponse - - - -### *class* GetExporterParametersResponse(c_obj) - -Bases: [`Response`](#GRANTA_MIScriptingToolkit.Response.Response) - -Output from the GetExporterParameters operation. Contains a list of records and details for -exporting their attributes. - -* **Parameters:** - **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a GetExporterParametersResponse object. - - - -#### *property* records - -Property records is a list of [`RecordExporterParameters`](#module-GRANTA_MIScriptingToolkit.RecordExporterParameters) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`RecordExporterParameters`](#module-GRANTA_MIScriptingToolkit.RecordExporterParameters) - - - - - -### GetIntegrationProfiles - - - -### *class* GetIntegrationProfiles(databases=None, depth=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Input for the GetIntegrationProfiles operation. - -* **Parameters:** - * **databases** ([*list*](https://docs.python.org/3/library/stdtypes.html#list) *of* [*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **depth** ([*int*](https://docs.python.org/3/library/functions.html#int)) - - - -#### *class* Depth - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - - - -#### Profiles *= 0* - - - -#### Databases *= 1* - - - -#### Tables *= 2* - - - -#### *property* databases - -Property databases is a list of str objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - [list](https://docs.python.org/3/library/stdtypes.html#list) of [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* depth - -Property depth is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### AddDatabase(value) - -Appends value to databases property on GetIntegrationProfiles C-object. - -* **Parameters:** - **value** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### GetIntegrationProfilesResponse - - - -### *class* GetIntegrationProfilesResponse(c_obj) - -Bases: [`Response`](#GRANTA_MIScriptingToolkit.Response.Response) - -Output from [`GetIntegrationProfiles`](#module-GRANTA_MIScriptingToolkit.GetIntegrationProfiles) operation. -Includes an array of [`IntegrationProfileDetail`](#module-GRANTA_MIScriptingToolkit.IntegrationProfileDetail) objects and a -[`ServiceLayerResponse`](#module-GRANTA_MIScriptingToolkit.ServiceLayerResponse). - -* **Parameters:** - **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a GetIntegrationProfilesResponse object. - - - -#### *property* profileDetails - -Property profileDetails is a list of [`IntegrationProfileDetail`](#module-GRANTA_MIScriptingToolkit.IntegrationProfileDetail) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`IntegrationProfileDetail`](#module-GRANTA_MIScriptingToolkit.IntegrationProfileDetail) - - - - - -### GetLayouts - - - -### *class* GetLayouts(applicabilityTag=None, layouts=None, minMaxCalculation=None, table=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Input for the GetLayouts operation. -Includes a table reference or list of layouts to retrieve. - -* **Parameters:** - * **applicabilityTag** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **layouts** (list of [`LayoutReference`](#module-GRANTA_MIScriptingToolkit.LayoutReference)) - * **minMaxCalculation** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **table** ([`TableReference`](#module-GRANTA_MIScriptingToolkit.TableReference)) - - - -#### *property* layouts - -Property layouts is a list of [`LayoutReference`](#module-GRANTA_MIScriptingToolkit.LayoutReference) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`LayoutReference`](#module-GRANTA_MIScriptingToolkit.LayoutReference) - - - -#### *property* table - -Property table is of type [`TableReference`](#module-GRANTA_MIScriptingToolkit.TableReference). - -* **Return type:** - [`TableReference`](#module-GRANTA_MIScriptingToolkit.TableReference) - - - -#### *property* applicabilityTag - -Property applicabilityTag is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* minMaxCalculation - -Property minMaxCalculation is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### AddLayout(\_layoutReference) - -Appends \_layoutReference to layouts property on GetLayouts C-object. - -* **Parameters:** - **\_layoutReference** ([`LayoutReference`](#module-GRANTA_MIScriptingToolkit.LayoutReference)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### GetLayoutsResponse - - - -### *class* GetLayoutsResponse(c_obj) - -Bases: [`Response`](#GRANTA_MIScriptingToolkit.Response.Response) - -Output from the [`GetLayouts`](#module-GRANTA_MIScriptingToolkit.GetLayouts) operation. -Includes a list of layouts retrieved. - -* **Parameters:** - **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a GetLayoutsResponse object. - - - -#### *property* layoutDetails - -Property layoutDetails is a list of [`LayoutDetail`](#module-GRANTA_MIScriptingToolkit.LayoutDetail) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`LayoutDetail`](#module-GRANTA_MIScriptingToolkit.LayoutDetail) - - - -#### AddLayoutDetail(\_layoutDetail) - -Appends \_layoutDetail to layoutDetails property on GetLayoutsResponse C-object. - -* **Parameters:** - **\_layoutDetail** ([`LayoutDetail`](#module-GRANTA_MIScriptingToolkit.LayoutDetail)) - - - - - -### GetLinkedRecordsRequest - - - -### *class* GetLinkedRecordsRequest(directLinksOnly=None, populateGUIDs=None, recordFilter=None, recordLinkGroups=None, recordReferences=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Input for the GetLinkedRecords operation. - -* **Parameters:** - * **directLinksOnly** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **populateGUIDs** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **recordFilter** ([`RecordFilter`](#module-GRANTA_MIScriptingToolkit.RecordFilter)) - * **recordLinkGroups** (list of [`RecordLinkGroupReference`](#module-GRANTA_MIScriptingToolkit.RecordLinkGroupReference)) - * **recordReferences** (list of [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference)) - - - -#### *property* recordLinkGroups - -Property recordLinkGroups is a list of [`RecordLinkGroupReference`](#module-GRANTA_MIScriptingToolkit.RecordLinkGroupReference) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`RecordLinkGroupReference`](#module-GRANTA_MIScriptingToolkit.RecordLinkGroupReference) - - - -#### *property* recordReferences - -Property recordReferences is a list of [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) - - - -#### *property* directLinksOnly - -Property directLinksOnly is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* populateGUIDs - -Property populateGUIDs is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* recordFilter - -Property recordFilter is of type [`RecordFilter`](#module-GRANTA_MIScriptingToolkit.RecordFilter). - -* **Return type:** - [`RecordFilter`](#module-GRANTA_MIScriptingToolkit.RecordFilter) - - - -#### AddRecordLinkGroup(\_recordLinkGroupReference) - -Appends \_recordLinkGroupReference to recordLinkGroups property on GetLinkedRecordsRequest C-object. - -* **Parameters:** - **\_recordLinkGroupReference** ([`RecordLinkGroupReference`](#module-GRANTA_MIScriptingToolkit.RecordLinkGroupReference)) - - - -#### AddRecordReference(\_recordReference) - -Appends \_recordReference to recordReferences property on GetLinkedRecordsRequest C-object. - -* **Parameters:** - **\_recordReference** ([`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### GetLinkedRecordsResponse - - - -### *class* GetLinkedRecordsResponse(c_obj) - -Bases: [`Response`](#GRANTA_MIScriptingToolkit.Response.Response) - -Output from the GetLinkedRecords operation. -Includes an array of [`SourceRecord`](#module-GRANTA_MIScriptingToolkit.SourceRecord) objects and a -[`ServiceLayerResponse`](#module-GRANTA_MIScriptingToolkit.ServiceLayerResponse) object. - -* **Parameters:** - **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a GetLinkedRecordsResponse object. - - - -#### *property* sourceRecords - -Property sourceRecords is a list of [`SourceRecord`](#module-GRANTA_MIScriptingToolkit.SourceRecord) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`SourceRecord`](#module-GRANTA_MIScriptingToolkit.SourceRecord) - - - - - -### GetMetaAttributesRequest - - - -### *class* GetMetaAttributesRequest(attributeReferences=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Input for the GetMetaAttributesRequest operation. - -* **Parameters:** - **attributeReferences** (list of [`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference)) - - - -#### *property* attributeReferences - -Property attributeReferences is a list of [`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference) - - - -#### AddAttributeReference(\_attributeReference) - -Appends \_attributeReference to attributeReferences property on GetMetaAttributesRequest C-object. - -* **Parameters:** - **\_attributeReference** ([`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### GetMetaAttributesResponse - - - -### *class* GetMetaAttributesResponse(c_obj) - -Bases: [`Response`](#GRANTA_MIScriptingToolkit.Response.Response) - -Output from the GetMetaAttributes operation. Includes an array of -[`AttributeMetaAttributes`](#module-GRANTA_MIScriptingToolkit.AttributeMetaAttributes) objects and a -[`ServiceLayerResponse`](#module-GRANTA_MIScriptingToolkit.ServiceLayerResponse) object. - -* **Parameters:** - **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a GetMetaAttributesResponse object. - - - -#### *property* attributes - -Property attributes is a list of [`AttributeMetaAttributes`](#module-GRANTA_MIScriptingToolkit.AttributeMetaAttributes) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`AttributeMetaAttributes`](#module-GRANTA_MIScriptingToolkit.AttributeMetaAttributes) - - - - - -### GetParameterDetailsRequest - - - -### *class* GetParameterDetailsRequest(attribute=None, parameterReferences=None, recordReference=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Input for the GetParameterDetails operation. - -* **Parameters:** - * **attribute** ([`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference)) - * **parameterReferences** (list of [`ParameterReference`](#module-GRANTA_MIScriptingToolkit.ParameterReference)) - * **recordReference** ([`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference)) - - - -#### *property* parameterReferences - -Property parameterReferences is a list of [`ParameterReference`](#module-GRANTA_MIScriptingToolkit.ParameterReference) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`ParameterReference`](#module-GRANTA_MIScriptingToolkit.ParameterReference) - - - -#### *property* attribute - -Property attribute is of type [`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference). - -* **Return type:** - [`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference) - - - -#### *property* recordReference - -Property recordReference is of type [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference). - -* **Return type:** - [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) - - - -#### AddParameterReference(\_parameterReference) - -Appends \_parameterReference to parameterReferences property on GetParameterDetailsRequest C-object. - -* **Parameters:** - **\_parameterReference** ([`ParameterReference`](#module-GRANTA_MIScriptingToolkit.ParameterReference)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### GetParameterDetailsResponse - - - -### *class* GetParameterDetailsResponse(c_obj) - -Bases: [`Response`](#GRANTA_MIScriptingToolkit.Response.Response) - -Output from the GetParameterDetails operation. -Includes an array of [`ParameterDetail`](#module-GRANTA_MIScriptingToolkit.ParameterDetail) objects and a -[`ServiceLayerResponse`](#module-GRANTA_MIScriptingToolkit.ServiceLayerResponse) object. - -* **Parameters:** - **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a GetParameterDetailsResponse object. - - - -#### *property* attributeParameters - -Property attributeParameters is a list of [`ParameterDetail`](#module-GRANTA_MIScriptingToolkit.ParameterDetail) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`ParameterDetail`](#module-GRANTA_MIScriptingToolkit.ParameterDetail) - - - - - -### GetRecordAttributesByRefRequest - - - -### *class* GetRecordAttributesByRefRequest(attributeReferences=None, binaryData=None, directLinksOnly=None, exportedAttributes=None, functionalDataSettings=None, populateGUIDs=None, recordFilter=None, recordReferences=None, unitConversionContext=None, useFallback=None, tabularDataSettings=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Input for the GetRecordAttributesByRef operation. -For requests, at least one [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) and at least one -[`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference) is required. - -* **Parameters:** - * **attributeReferences** (list of [`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference)) - * **binaryData** ([`BinaryDataSettings`](#module-GRANTA_MIScriptingToolkit.BinaryDataSettings)) - * **directLinksOnly** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **exportedAttributes** (list of [`ExportedAttribute`](#module-GRANTA_MIScriptingToolkit.ExportedAttribute)) - * **functionalDataSettings** ([`FunctionalDataSettings`](#module-GRANTA_MIScriptingToolkit.FunctionalDataSettings)) - * **populateGUIDs** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **recordFilter** ([`RecordFilter`](#module-GRANTA_MIScriptingToolkit.RecordFilter)) - * **recordReferences** (list of [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference)) - * **unitConversionContext** ([`UnitConversionContext`](#module-GRANTA_MIScriptingToolkit.UnitConversionContext)) - * **useFallback** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **tabularDataSettings** ([`TabularDataSettings`](#module-GRANTA_MIScriptingToolkit.TabularDataSettings)) - - - -#### *property* attributeReferences - -Property attributeReferences is a list of [`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference) - - - -#### *property* exportedAttributes - -Property exportedAttributes is a list of [`ExportedAttribute`](#module-GRANTA_MIScriptingToolkit.ExportedAttribute) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`ExportedAttribute`](#module-GRANTA_MIScriptingToolkit.ExportedAttribute) - - - -#### *property* recordReferences - -Property recordReferences is a list of [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) - - - -#### *property* directLinksOnly - -Property directLinksOnly is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* functionalDataSettings - -Property functionalDataSettings is of type [`FunctionalDataSettings`](#module-GRANTA_MIScriptingToolkit.FunctionalDataSettings). - -* **Return type:** - [`FunctionalDataSettings`](#module-GRANTA_MIScriptingToolkit.FunctionalDataSettings) - - - -#### *property* populateGUIDs - -Property populateGUIDs is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* recordFilter - -Property recordFilter is of type [`RecordFilter`](#module-GRANTA_MIScriptingToolkit.RecordFilter). - -* **Return type:** - [`RecordFilter`](#module-GRANTA_MIScriptingToolkit.RecordFilter) - - - -#### *property* tabularDataSettings - -Property tabularDataSettings is of type [`TabularDataSettings`](#module-GRANTA_MIScriptingToolkit.TabularDataSettings). - -* **Return type:** - [`TabularDataSettings`](#module-GRANTA_MIScriptingToolkit.TabularDataSettings) - - - -#### *property* unitConversionContext - -Property unitConversionContext is of type [`UnitConversionContext`](#module-GRANTA_MIScriptingToolkit.UnitConversionContext). - -* **Return type:** - [`UnitConversionContext`](#module-GRANTA_MIScriptingToolkit.UnitConversionContext) - - - -#### *property* useFallback - -Property useFallback is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* binaryData - -Property binaryData is of type [`BinaryDataSettings`](#module-GRANTA_MIScriptingToolkit.BinaryDataSettings). - -* **Return type:** - [`BinaryDataSettings`](#module-GRANTA_MIScriptingToolkit.BinaryDataSettings) - - - -#### AddAttributeReference(\_attributeReference) - -Appends \_attributeReference to attributeReferences property on GetRecordAttributesByRefRequest C-object. - -* **Parameters:** - **\_attributeReference** ([`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference)) - - - -#### AddExportedAttribute(\_exportedAttribute) - -Appends \_exportedAttribute to exportedAttributes property on GetRecordAttributesByRefRequest C-object. - -* **Parameters:** - **\_exportedAttribute** ([`ExportedAttribute`](#module-GRANTA_MIScriptingToolkit.ExportedAttribute)) - - - -#### AddRecordReference(\_recordReference) - -Appends \_recordReference to recordReferences property on GetRecordAttributesByRefRequest C-object. - -* **Parameters:** - **\_recordReference** ([`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### GetRecordAttributesByRefResponse - - - -### *class* GetRecordAttributesByRefResponse(c_obj) - -Bases: [`Response`](#GRANTA_MIScriptingToolkit.Response.Response) - -Output from the GetRecordAttributesByRef operation. -Includes an array of [`RecordData`](#module-GRANTA_MIScriptingToolkit.RecordData) objects and a -[`ServiceLayerResponse`](#module-GRANTA_MIScriptingToolkit.ServiceLayerResponse) object. - -* **Parameters:** - **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a GetRecordAttributesByRefResponse object. - - - -#### *property* recordData - -Property recordData is a list of [`RecordData`](#module-GRANTA_MIScriptingToolkit.RecordData) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`RecordData`](#module-GRANTA_MIScriptingToolkit.RecordData) - - - -#### AddRecordData(\_recordData) - -Appends \_recordData to recordData property on GetRecordAttributesByRefResponse C-object. - -* **Parameters:** - **\_recordData** ([`RecordData`](#module-GRANTA_MIScriptingToolkit.RecordData)) - - - - - -### GetRecordAttributesRequest - - - -### *class* GetRecordAttributesRequest(includeEmpty=None, includeMeta=None, includeParamDetails=None, minMaxCalculation=None, recordReferences=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Input for the GetRecordAttribute operation. - -* **Parameters:** - * **includeEmpty** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **includeMeta** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **includeParamDetails** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **minMaxCalculation** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **recordReferences** (list of [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference)) - - - -#### *property* recordReferences - -Property recordReferences is a list of [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) - - - -#### *property* includeEmpty - -Property includeEmpty is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* includeMeta - -Property includeMeta is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* includeParamDetails - -Property includeParamDetails is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* minMaxCalculation - -Property minMaxCalculation is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### AddRecordReference(\_recordReference) - -Appends \_recordReference to recordReferences property on GetRecordAttributesRequest C-object. - -* **Parameters:** - **\_recordReference** ([`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### GetRecordAttributesResponse - - - -### *class* GetRecordAttributesResponse(c_obj) - -Bases: [`Response`](#GRANTA_MIScriptingToolkit.Response.Response) - -Output from the GetRecordAttributes operation. -Includes an array of [`RecordAttribute`](#module-GRANTA_MIScriptingToolkit.RecordAttribute) objects and a -[`ServiceLayerResponse`](#module-GRANTA_MIScriptingToolkit.ServiceLayerResponse) object. - -* **Parameters:** - **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a GetRecordAttributesResponse object. - - - -#### *property* recordAttributes - -Property recordAttributes is a list of [`RecordAttribute`](#module-GRANTA_MIScriptingToolkit.RecordAttribute) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`RecordAttribute`](#module-GRANTA_MIScriptingToolkit.RecordAttribute) - - - -#### AddRecordAttribute(\_recordAttribute) - -Appends \_recordAttribute to recordAttributes property on GetRecordAttributesResponse C-object. - -* **Parameters:** - **\_recordAttribute** ([`RecordAttribute`](#module-GRANTA_MIScriptingToolkit.RecordAttribute)) - - - - - -### GetRecordLinkGroups - - - -### *class* GetRecordLinkGroups(DBKey=None, recordLinkGroups=None, standardNamesOnly=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Returns details of Record Link Groups in a Granta MI Database. - -* **Parameters:** - * **DBKey** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **recordLinkGroups** (list of [`RecordLinkGroupReference`](#module-GRANTA_MIScriptingToolkit.RecordLinkGroupReference)) - * **standardNamesOnly** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - - - -#### *property* recordLinkGroups - -Property recordLinkGroups is a list of [`RecordLinkGroupReference`](#module-GRANTA_MIScriptingToolkit.RecordLinkGroupReference) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`RecordLinkGroupReference`](#module-GRANTA_MIScriptingToolkit.RecordLinkGroupReference) - - - -#### *property* DBKey - -Property DBKey is of type str. When this is provided, details of all Record Link Groups in the specified Granta MI Database will be returned. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* standardNamesOnly - -Property standardNamesOnly is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### AddRecordLinkGroup(\_recordLinkGroupReference) - -Appends \_recordLinkGroupReference to recordLinkGroups property on GetRecordLinkGroups C-object. - -* **Parameters:** - **\_recordLinkGroupReference** ([`RecordLinkGroupReference`](#module-GRANTA_MIScriptingToolkit.RecordLinkGroupReference)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### GetRecordLinkGroupsResponse - - - -### *class* GetRecordLinkGroupsResponse(c_obj) - -Bases: [`Response`](#GRANTA_MIScriptingToolkit.Response.Response) - -Output from the [`GetRecordLinkGroups`](#module-GRANTA_MIScriptingToolkit.GetRecordLinkGroups) operation. - -* **Parameters:** - **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a GetRecordLinkGroupsResponse object. - - - -#### *property* recordLinkGroups - -Property recordLinkGroups is a list of [`RecordLinkGroupDetail`](#module-GRANTA_MIScriptingToolkit.RecordLinkGroupDetail) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`RecordLinkGroupDetail`](#module-GRANTA_MIScriptingToolkit.RecordLinkGroupDetail) - - - - - -### GetRecordVersionsRequest - - - -### *class* GetRecordVersionsRequest(records=None, versions=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Input for the GetRecordVersions operation. - -* **Parameters:** - * **records** (list of [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference)) - * **versions** ([*int*](https://docs.python.org/3/library/functions.html#int)) - - - -#### *class* VersionSelector - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - - - -#### LatestRead *= 0* - - - -#### Latest *= 1* - - - -#### AllReleased *= 2* - - - -#### All *= 3* - - - -#### *property* records - -Property records is a list of [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) - - - -#### *property* versions - -Property versions is of type int. See [`GetRecordVersionsRequest.VersionSelector`](#GRANTA_MIScriptingToolkit.GetRecordVersionsRequest.GetRecordVersionsRequest.VersionSelector) for supported values. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### AddRecord(\_recordReference) - -Appends \_recordReference to records property on GetRecordVersionsRequest C-object. - -* **Parameters:** - **\_recordReference** ([`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### GetRecordVersionsResponse - - - -### *class* GetRecordVersionsResponse(c_obj) - -Bases: [`Response`](#GRANTA_MIScriptingToolkit.Response.Response) - -Output from the GetRecordVersions operation. Contains a list of version states. - -* **Parameters:** - **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a GetRecordVersionsResponse object. - - - -#### *property* recordStates - -Property recordStates is a list of [`RecordVersionState`](#module-GRANTA_MIScriptingToolkit.RecordVersionState) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`RecordVersionState`](#module-GRANTA_MIScriptingToolkit.RecordVersionState) - - - - - -### GetRootNode - - - -### *class* GetRootNode(table=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Input to the GetRootNode operation. -Requires a [`TableReference`](#module-GRANTA_MIScriptingToolkit.TableReference) . - -* **Parameters:** - **table** ([`TableReference`](#module-GRANTA_MIScriptingToolkit.TableReference)) - - - -#### *property* table - -Property table is of type [`TableReference`](#module-GRANTA_MIScriptingToolkit.TableReference). - -* **Return type:** - [`TableReference`](#module-GRANTA_MIScriptingToolkit.TableReference) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### GetRootNodeResponse - - - -### *class* GetRootNodeResponse(c_obj) - -Bases: [`Response`](#GRANTA_MIScriptingToolkit.Response.Response) - -Output from the [`GetRootNode`](#module-GRANTA_MIScriptingToolkit.GetRootNode) operation. -Includes a [`TreeRecord`](#module-GRANTA_MIScriptingToolkit.TreeRecord) object and a -[`ServiceLayerResponse`](#module-GRANTA_MIScriptingToolkit.ServiceLayerResponse) object. - -* **Parameters:** - **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a GetRootNodeResponse object. - - - -#### *property* rootNode - -Property rootNode is of type [`TreeRecord`](#module-GRANTA_MIScriptingToolkit.TreeRecord). - -* **Return type:** - [`TreeRecord`](#module-GRANTA_MIScriptingToolkit.TreeRecord) - - - - - -### GetSubsetsRequest - - - -### *class* GetSubsetsRequest(subsetReferences=None, table=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Input to the GetSubsets operation. -Requires a [`TableReference`](#module-GRANTA_MIScriptingToolkit.TableReference) . - -* **Parameters:** - * **subsetReferences** (list of [`SubsetReference`](#module-GRANTA_MIScriptingToolkit.SubsetReference)) - * **table** ([`TableReference`](#module-GRANTA_MIScriptingToolkit.TableReference)) - - - -#### *property* subsetReferences - -Property subsetReferences is of type list of [`SubsetReference`](#module-GRANTA_MIScriptingToolkit.SubsetReference). - -* **Return type:** - list of [`SubsetReference`](#module-GRANTA_MIScriptingToolkit.SubsetReference) - - - -#### *property* table - -Property table is of type [`TableReference`](#module-GRANTA_MIScriptingToolkit.TableReference). - -* **Return type:** - [`TableReference`](#module-GRANTA_MIScriptingToolkit.TableReference) - - - -#### AddSubsetReference(\_subsetReference) - -Appends \_subsetReference to subsetReferences property on GetSubsetsRequest C-object. - -* **Parameters:** - **\_subsetReference** ([`SubsetReference`](#module-GRANTA_MIScriptingToolkit.SubsetReference)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### GetSubsetsResponse - - - -### *class* GetSubsetsResponse(c_obj) - -Bases: [`Response`](#GRANTA_MIScriptingToolkit.Response.Response) - -Output from the GetSubsets operation. -Includes an array of SubsetDetails objects and a -[`ServiceLayerResponse`](#module-GRANTA_MIScriptingToolkit.ServiceLayerResponse) object. - -* **Parameters:** - **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a GetSubsetsResponse object. - - - -#### *property* subsetDetails - -Property subsetDetails is a list of [`SubsetDetail`](#module-GRANTA_MIScriptingToolkit.SubsetDetail) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`SubsetDetail`](#module-GRANTA_MIScriptingToolkit.SubsetDetail) - - - - - -### GetTables - - - -### *class* GetTables(DBKey=None, attributeSelectors=None, tableFilter=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Input to the GetTables operation. -Requires a DBKey to be set. - -* **Parameters:** - * **DBKey** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **attributeSelectors** ([*list*](https://docs.python.org/3/library/stdtypes.html#list) *of* [*int*](https://docs.python.org/3/library/functions.html#int)) - * **tableFilter** ([*int*](https://docs.python.org/3/library/functions.html#int)) - - - -#### *class* AttributeSelector - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - - - -#### NONE *= 0* - - - -#### NonMetaAttributes *= 1* - - - -#### MetaAttributes *= 2* - - - -#### StandardAttributes *= 3* - - - -#### *property* attributeSelectors - -Property attributeSelectors is a list of int objects. See [`GetTables.AttributeSelector`](#GRANTA_MIScriptingToolkit.GetTables.GetTables.AttributeSelector) for supported values. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - [list](https://docs.python.org/3/library/stdtypes.html#list) of [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* DBKey - -Property DBKey is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* tableFilter - -Property tableFilter is of type int. See [`GRANTA_Constants`](#module-GRANTA_MIScriptingToolkit.GRANTA_Constants) for supported values. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### AddAttributeSelector(value) - -Appends value to attributeSelectors property on GetTables C-object. - -* **Parameters:** - **value** ([*int*](https://docs.python.org/3/library/functions.html#int)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### GetTablesResponse - - - -### *class* GetTablesResponse(c_obj) - -Bases: [`Response`](#GRANTA_MIScriptingToolkit.Response.Response) - -Output from the [`GetTables`](#module-GRANTA_MIScriptingToolkit.GetTables) operation. -Includes an array of [`TableDetail`](#module-GRANTA_MIScriptingToolkit.TableDetail) objects and a -[`ServiceLayerResponse`](#module-GRANTA_MIScriptingToolkit.ServiceLayerResponse) object. - -* **Parameters:** - **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a GetTablesResponse object. - - - -#### *property* tableDetails - -Property tableDetails is a list of [`TableDetail`](#module-GRANTA_MIScriptingToolkit.TableDetail) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`TableDetail`](#module-GRANTA_MIScriptingToolkit.TableDetail) - - - -#### AddTableDetail(\_tableDetail) - -Appends \_tableDetail to tableDetails property on GetTablesResponse C-object. - -* **Parameters:** - **\_tableDetail** ([`TableDetail`](#module-GRANTA_MIScriptingToolkit.TableDetail)) - - - - - -### GetTreeRecordsRequest - - - -### *class* GetTreeRecordsRequest(records=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Input to the GetTreeRecords operation. -Requires at least one [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference). - -* **Parameters:** - **records** (list of [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference)) - - - -#### *property* records - -Property records is a list of [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) - - - -#### AddRecord(\_recordReference) - -Appends \_recordReference to records property on GetTreeRecordsRequest C-object. - -* **Parameters:** - **\_recordReference** ([`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### GetTreeRecordsResponse - - - -### *class* GetTreeRecordsResponse(c_obj) - -Bases: [`Response`](#GRANTA_MIScriptingToolkit.Response.Response) - -Output to the GetTreeRecords operation. -Includes an array of [`TreeRecord`](#module-GRANTA_MIScriptingToolkit.TreeRecord) objects and a -[`ServiceLayerResponse`](#module-GRANTA_MIScriptingToolkit.ServiceLayerResponse) object. - -* **Parameters:** - **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a GetTreeRecordsResponse object. - - - -#### *property* treeRecords - -Property treeRecords is a list of [`TreeRecord`](#module-GRANTA_MIScriptingToolkit.TreeRecord) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`TreeRecord`](#module-GRANTA_MIScriptingToolkit.TreeRecord) - - - -#### AddTreeRecord(\_treeRecord) - -Appends \_treeRecord to treeRecords property on GetTreeRecordsResponse C-object. - -* **Parameters:** - **\_treeRecord** ([`TreeRecord`](#module-GRANTA_MIScriptingToolkit.TreeRecord)) - - - - - -### GetUnitConversionsRequest - - - -### *class* GetUnitConversionsRequest(DBKey=None, sourceCurrency=None, targetCurrency=None, unitConversionContexts=None, unitSymbols=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Input for the GetUnitConversions operation. - -* **Parameters:** - * **DBKey** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **sourceCurrency** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **targetCurrency** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **unitConversionContexts** (list of [`UnitConversionContext`](#module-GRANTA_MIScriptingToolkit.UnitConversionContext)) - * **unitSymbols** ([*list*](https://docs.python.org/3/library/stdtypes.html#list) *of* [*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* unitConversionContexts - -Property unitConversionContexts is a list of [`UnitConversionContext`](#module-GRANTA_MIScriptingToolkit.UnitConversionContext) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`UnitConversionContext`](#module-GRANTA_MIScriptingToolkit.UnitConversionContext) - - - -#### *property* unitSymbols - -Property unitSymbols is a list of str objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - [list](https://docs.python.org/3/library/stdtypes.html#list) of [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* DBKey - -Property DBKey is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* sourceCurrency - -Property sourceCurrency is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* targetCurrency - -Property targetCurrency is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### AddUnitConversionContext(\_unitConversionContext) - -Appends \_unitConversionContext to unitConversionContexts property on GetUnitConversionsRequest C-object. - -* **Parameters:** - **\_unitConversionContext** ([`UnitConversionContext`](#module-GRANTA_MIScriptingToolkit.UnitConversionContext)) - - - -#### AddUnitSymbol(value) - -Appends value to unitSymbols property on GetUnitConversionsRequest C-object. - -* **Parameters:** - **value** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### GetUnitConversionsResponse - - - -### *class* GetUnitConversionsResponse(c_obj) - -Bases: [`Response`](#GRANTA_MIScriptingToolkit.Response.Response) - -Output from the GetUnitConversions operation. - -* **Parameters:** - **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a GetUnitConversionsResponse object. - - - -#### *property* DBKey - -Property DBKey is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* sourceUnits - -Property sourceUnits is a list of [`SourceUnitConversionSet`](#module-GRANTA_MIScriptingToolkit.SourceUnitConversionSet) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`SourceUnitConversionSet`](#module-GRANTA_MIScriptingToolkit.SourceUnitConversionSet) - - - -#### *property* unitConversionContexts - -Property unitConversionContexts is a list of [`UnitConversionContextConversionSet`](#module-GRANTA_MIScriptingToolkit.UnitConversionContextConversionSet) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`UnitConversionContextConversionSet`](#module-GRANTA_MIScriptingToolkit.UnitConversionContextConversionSet) - - - - - -### GetUnits - - - -### *class* GetUnits(DBKey=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -A type for requesting the units known to specific Granta MI databases. -A DBKey must be specified. - -* **Parameters:** - **DBKey** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* DBKey - -Property DBKey is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### GetUnitsResponse - - - -### *class* GetUnitsResponse(c_obj) - -Bases: [`Response`](#GRANTA_MIScriptingToolkit.Response.Response) - -The output of a [`GetUnits`](#module-GRANTA_MIScriptingToolkit.GetUnits) request. -Contains an array of DatabaseUnitSets for the specified databases. - -* **Parameters:** - **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a GetUnitsResponse object. - - - -#### *property* databaseUnitSets - -Property databaseUnitSets is a list of [`DatabaseUnitSet`](#module-GRANTA_MIScriptingToolkit.DatabaseUnitSet) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`DatabaseUnitSet`](#module-GRANTA_MIScriptingToolkit.DatabaseUnitSet) - - - - - -### GetUnitSystems - - - -### *class* GetUnitSystems(DBKey=None, excludeCurrencies=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -A type for requesting the unit systems on a particular Granta MI database. -A DBKey must be specified. - -* **Parameters:** - * **DBKey** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **excludeCurrencies** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - - - -#### *property* DBKey - -Property DBKey is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* excludeCurrencies - -Property excludeCurrencies is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### GetUnitSystemsResponse - - - -### *class* GetUnitSystemsResponse(c_obj) - -Bases: [`Response`](#GRANTA_MIScriptingToolkit.Response.Response) - -The output of a [`GetUnitSystems`](#module-GRANTA_MIScriptingToolkit.GetUnitSystems) requests. -Contains an array of unit systems for the specified database. - -* **Parameters:** - **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a GetUnitSystemsResponse object. - - - -#### *property* DBKey - -Property DBKey is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* unitSystems - -Property unitSystems is a list of str objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - [list](https://docs.python.org/3/library/stdtypes.html#list) of [str](https://docs.python.org/3/library/stdtypes.html#str) - - - - - -### GetUploadAddressesRequest - - - -### *class* GetUploadAddressesRequest(attributeReferences=None, recordReferences=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Input to the GetUploadAddresses operation. -Contains a list of records and attributes to get the upload URL addresses of. - -* **Parameters:** - * **attributeReferences** (list of [`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference)) - * **recordReferences** (list of [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference)) - - - -#### *property* attributeReferences - -Property attributeReferences is a list of [`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference) - - - -#### *property* recordReferences - -Property recordReferences is a list of [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) - - - -#### AddAttributeReference(\_attributeReference) - -Appends \_attributeReference to attributeReferences property on GetUploadAddressesRequest C-object. - -* **Parameters:** - **\_attributeReference** ([`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference)) - - - -#### AddRecordReference(\_recordReference) - -Appends \_recordReference to recordReferences property on GetUploadAddressesRequest C-object. - -* **Parameters:** - **\_recordReference** ([`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### GetUploadAddressesResponse - - - -### *class* GetUploadAddressesResponse(c_obj) - -Bases: [`Response`](#GRANTA_MIScriptingToolkit.Response.Response) - -Output from the GetUploadAddresses operation. -Contains a list of [`RecordWithAttributeAddresses`](#module-GRANTA_MIScriptingToolkit.RecordWithAttributeAddresses) objects for each -record in the [`GetUploadAddressesRequest`](#module-GRANTA_MIScriptingToolkit.GetUploadAddressesRequest). - -* **Parameters:** - **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a GetUploadAddressesResponse object. - - - -#### *property* recordsWithAttributeAddresses - -Property recordsWithAttributeAddresses is a list of [`RecordWithAttributeAddresses`](#module-GRANTA_MIScriptingToolkit.RecordWithAttributeAddresses) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`RecordWithAttributeAddresses`](#module-GRANTA_MIScriptingToolkit.RecordWithAttributeAddresses) - - - - - -### GraphDomain - - - -### *class* GraphDomain(parameterDomains=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -A type to contain choices of fixed parameter values. -A value must be chosen for each parameter, within the given constraints. - -* **Parameters:** - **parameterDomains** (list of [`ParameterDomain`](#module-GRANTA_MIScriptingToolkit.ParameterDomain)) - - - -#### *property* parameterDomains - -Property parameterDomains is a list of [`ParameterDomain`](#module-GRANTA_MIScriptingToolkit.ParameterDomain) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`ParameterDomain`](#module-GRANTA_MIScriptingToolkit.ParameterDomain) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### GreaterThanSearchValue - - - -### *class* GreaterThanSearchValue(tabularColumn=None, unit=None, value=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Search criterion to search for data greater than a specified value. -Criterion passes if data value is above a given value. Point, range, and integer attributes are -supported. - -* **Parameters:** - * **tabularColumn** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **unit** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **value** ([*float*](https://docs.python.org/3/library/functions.html#float)) - - - -#### *property* tabularColumn - -Property tabularColumn is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* unit - -Property unit is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* value - -Property value is of type float. - -* **Return type:** - [float](https://docs.python.org/3/library/functions.html#float) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### HelpInfo - - - -### *class* HelpInfo(databaseHelp=None, helpURI=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Type describing how to obtain detailed Help information for an entity in a Granta MI database. - -* **Parameters:** - * **databaseHelp** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **helpURI** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* databaseHelp - -Property databaseHelp is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* helpURI - -Property helpURI is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### HighEndSearchValue - - - -### *class* HighEndSearchValue(unit=None, value=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Upper limit for the [`BetweenSearchValue`](#module-GRANTA_MIScriptingToolkit.BetweenSearchValue) search criterion. -Requires a double value and an optional unit. - -* **Parameters:** - * **unit** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **value** ([*float*](https://docs.python.org/3/library/functions.html#float)) - - - -#### *property* unit - -Property unit is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* value - -Property value is of type float. - -* **Return type:** - [float](https://docs.python.org/3/library/functions.html#float) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### HyperlinkDataType - - - -### *class* HyperlinkDataType(description=None, hyperlinkDisplay=None, isApplicable=None, value=None, \_isOwner=True) - -Bases: [`IDataValue`](#GRANTA_MIScriptingToolkit.IDataValue.IDataValue) - -A type to contain a HyperLink string value. - -* **Parameters:** - * **description** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **hyperlinkDisplay** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **isApplicable** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **value** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *class* HyperlinkDisplay - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - - - -#### New *= 0* - - - -#### Top *= 1* - - - -#### Content *= 2* - - - -#### *property* description - -Property description is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* hyperlinkDisplay - -Property hyperlinkDisplay is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* isApplicable - -Property isApplicable is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* value - -Property value is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### IDataValue - - - -### *class* IDataValue - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Base class for data values in Granta MI. - -You should not interact directly with this class. - - - - - -### ImportAttributeValue - - - -### *class* ImportAttributeValue(attributeReference=None, dateDataValue=None, discreteDataValue=None, fileDataValue=None, floatFunctionalGriddedDataType=None, floatFunctionalSeriesDataType=None, hyperlinkDataValue=None, integerDataValue=None, logicalDataValue=None, longTextDataValue=None, pictureDataValue=None, pointDataValue=None, rangeDataValue=None, shortTextDataValue=None, tabularDataValue=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -An [`AttributeValue`](#module-GRANTA_MIScriptingToolkit.AttributeValue) to import to a Granta MI database. -Requires a [`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference) and an attribute value for the -data type you wish to upload. Supports: PointDataType, RangeDataType, -FloatFunctionalSeriesDataType, FloatFunctionalGriddedDataType, ShortTextDataType, -LongTextDataType, DiscreteDataType, IntegerDataType, LogicalDataType, HyperlinkDataType, and -[`FileDataType`](#module-GRANTA_MIScriptingToolkit.FileDataType). - -* **Parameters:** - * **attributeReference** ([`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference)) - * **dateDataValue** ([`DateDataType`](#module-GRANTA_MIScriptingToolkit.DateDataType)) - * **discreteDataValue** ([`DiscreteDataType`](#module-GRANTA_MIScriptingToolkit.DiscreteDataType)) - * **fileDataValue** ([`FileDataType`](#module-GRANTA_MIScriptingToolkit.FileDataType)) - * **floatFunctionalGriddedDataType** ([`FloatFunctionalGriddedDataType`](#module-GRANTA_MIScriptingToolkit.FloatFunctionalGriddedDataType)) - * **floatFunctionalSeriesDataType** ([`FloatFunctionalSeriesDataType`](#module-GRANTA_MIScriptingToolkit.FloatFunctionalSeriesDataType)) - * **hyperlinkDataValue** ([`HyperlinkDataType`](#module-GRANTA_MIScriptingToolkit.HyperlinkDataType)) - * **integerDataValue** ([`IntegerDataType`](#module-GRANTA_MIScriptingToolkit.IntegerDataType)) - * **logicalDataValue** ([`LogicalDataType`](#module-GRANTA_MIScriptingToolkit.LogicalDataType)) - * **longTextDataValue** ([`LongTextDataType`](#module-GRANTA_MIScriptingToolkit.LongTextDataType)) - * **pictureDataValue** ([`PictureDataType`](#module-GRANTA_MIScriptingToolkit.PictureDataType)) - * **pointDataValue** ([`PointDataType`](#module-GRANTA_MIScriptingToolkit.PointDataType)) - * **rangeDataValue** ([`RangeDataType`](#module-GRANTA_MIScriptingToolkit.RangeDataType)) - * **shortTextDataValue** ([`ShortTextDataType`](#module-GRANTA_MIScriptingToolkit.ShortTextDataType)) - * **tabularDataValue** ([`TabularDataType`](#module-GRANTA_MIScriptingToolkit.TabularDataType)) - - - -#### *property* attributeReference - -Property attributeReference is of type [`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference). - -* **Return type:** - [`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference) - - - -#### *property* dateDataValue - -Property dateDataValue is of type [`DateDataType`](#module-GRANTA_MIScriptingToolkit.DateDataType). - -* **Return type:** - [`DateDataType`](#module-GRANTA_MIScriptingToolkit.DateDataType) - - - -#### *property* discreteDataValue - -Property discreteDataValue is of type [`DiscreteDataType`](#module-GRANTA_MIScriptingToolkit.DiscreteDataType). - -* **Return type:** - [`DiscreteDataType`](#module-GRANTA_MIScriptingToolkit.DiscreteDataType) - - - -#### *property* fileDataValue - -Property fileDataValue is of type [`FileDataType`](#module-GRANTA_MIScriptingToolkit.FileDataType). - -* **Return type:** - [`FileDataType`](#module-GRANTA_MIScriptingToolkit.FileDataType) - - - -#### *property* floatFunctionalGriddedDataType - -Property floatFunctionalGriddedDataType is of type [`FloatFunctionalGriddedDataType`](#module-GRANTA_MIScriptingToolkit.FloatFunctionalGriddedDataType). - -* **Return type:** - [`FloatFunctionalGriddedDataType`](#module-GRANTA_MIScriptingToolkit.FloatFunctionalGriddedDataType) - - - -#### *property* floatFunctionalSeriesDataType - -Property floatFunctionalSeriesDataType is of type [`FloatFunctionalSeriesDataType`](#module-GRANTA_MIScriptingToolkit.FloatFunctionalSeriesDataType). - -* **Return type:** - [`FloatFunctionalSeriesDataType`](#module-GRANTA_MIScriptingToolkit.FloatFunctionalSeriesDataType) - - - -#### *property* hyperlinkDataValue - -Property hyperlinkDataValue is of type [`HyperlinkDataType`](#module-GRANTA_MIScriptingToolkit.HyperlinkDataType). - -* **Return type:** - [`HyperlinkDataType`](#module-GRANTA_MIScriptingToolkit.HyperlinkDataType) - - - -#### *property* integerDataValue - -Property integerDataValue is of type [`IntegerDataType`](#module-GRANTA_MIScriptingToolkit.IntegerDataType). - -* **Return type:** - [`IntegerDataType`](#module-GRANTA_MIScriptingToolkit.IntegerDataType) - - - -#### *property* logicalDataValue - -Property logicalDataValue is of type [`LogicalDataType`](#module-GRANTA_MIScriptingToolkit.LogicalDataType). - -* **Return type:** - [`LogicalDataType`](#module-GRANTA_MIScriptingToolkit.LogicalDataType) - - - -#### *property* longTextDataValue - -Property longTextDataValue is of type [`LongTextDataType`](#module-GRANTA_MIScriptingToolkit.LongTextDataType). - -* **Return type:** - [`LongTextDataType`](#module-GRANTA_MIScriptingToolkit.LongTextDataType) - - - -#### *property* pictureDataValue - -Property pictureDataValue is of type [`PictureDataType`](#module-GRANTA_MIScriptingToolkit.PictureDataType). - -* **Return type:** - [`PictureDataType`](#module-GRANTA_MIScriptingToolkit.PictureDataType) - - - -#### *property* pointDataValue - -Property pointDataValue is of type [`PointDataType`](#module-GRANTA_MIScriptingToolkit.PointDataType). - -* **Return type:** - [`PointDataType`](#module-GRANTA_MIScriptingToolkit.PointDataType) - - - -#### *property* rangeDataValue - -Property rangeDataValue is of type [`RangeDataType`](#module-GRANTA_MIScriptingToolkit.RangeDataType). - -* **Return type:** - [`RangeDataType`](#module-GRANTA_MIScriptingToolkit.RangeDataType) - - - -#### *property* shortTextDataValue - -Property shortTextDataValue is of type [`ShortTextDataType`](#module-GRANTA_MIScriptingToolkit.ShortTextDataType). - -* **Return type:** - [`ShortTextDataType`](#module-GRANTA_MIScriptingToolkit.ShortTextDataType) - - - -#### *property* tabularDataValue - -Property tabularDataValue is of type [`TabularDataType`](#module-GRANTA_MIScriptingToolkit.TabularDataType). - -* **Return type:** - [`TabularDataType`](#module-GRANTA_MIScriptingToolkit.TabularDataType) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### ImportRecord - - - -### *class* ImportRecord(copyDestinationParent=None, existingRecord=None, importAttributeValues=None, importRecordMode=None, isFolder=None, recordName=None, releaseRecord=None, subsetReferences=None, updateSubsetsMode=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -A record for importing to the Granta MI database. -The ‘importRecordMode’ property specifies whether a record should be created, copied, or updated. -The accepted values are ‘Create’, ‘Update’, and ‘Copy’. If importRecordMode is ‘Create’, set -‘existingRecord’ to the parent record under which the new record is to be created. If -importRecordMode is ‘Update’, set ‘existingRecord’, to the target record to be changed. If -importRecordMode is ‘Copy’, set ‘existingRecord’ to be the source data for the operation, and use -‘copyDestinationParent’ to specify where the record copy should appear. For versioned databases, -set releaseRecord to specify whether the new or updated record should be released. Use -‘subsetReferences’ to define the Subsets the imported record belongs to (subsets will not be -inherited from the parent). ‘isFolder’ will have no effect if ‘importRecordMode’ is set to -‘Update’. - -* **Parameters:** - * **copyDestinationParent** ([`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference)) - * **existingRecord** ([`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference)) - * **importAttributeValues** (list of [`ImportAttributeValue`](#module-GRANTA_MIScriptingToolkit.ImportAttributeValue)) - * **importRecordMode** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **isFolder** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **recordName** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **releaseRecord** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **subsetReferences** (list of [`SubsetReference`](#module-GRANTA_MIScriptingToolkit.SubsetReference)) - * **updateSubsetsMode** ([*int*](https://docs.python.org/3/library/functions.html#int)) - - - -#### *property* importAttributeValues - -Property importAttributeValues is a list of [`ImportAttributeValue`](#module-GRANTA_MIScriptingToolkit.ImportAttributeValue) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`ImportAttributeValue`](#module-GRANTA_MIScriptingToolkit.ImportAttributeValue) - - - -#### *property* subsetReferences - -Property subsetReferences is a list of [`SubsetReference`](#module-GRANTA_MIScriptingToolkit.SubsetReference) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`SubsetReference`](#module-GRANTA_MIScriptingToolkit.SubsetReference) - - - -#### *property* recordName - -Property recordName is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* copyDestinationParent - -Property copyDestinationParent is of type [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference). - -* **Return type:** - [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) - - - -#### *property* existingRecord - -Property existingRecord is of type [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference). - -* **Return type:** - [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) - - - -#### *property* importRecordMode - -Property importRecordMode is of type str. See [`GRANTA_Constants`](#module-GRANTA_MIScriptingToolkit.GRANTA_Constants) for supported values. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* isFolder - -Property isFolder is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* releaseRecord - -Property releaseRecord is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* updateSubsetsMode - -Property updateSubsetsMode is of type int. See [`GRANTA_Constants`](#module-GRANTA_MIScriptingToolkit.GRANTA_Constants) for supported values. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### AddImportAttributeValue(\_importAttributeValue) - -Appends \_importAttributeValue to importAttributeValues property on ImportRecord C-object. - -* **Parameters:** - **\_importAttributeValue** ([`ImportAttributeValue`](#module-GRANTA_MIScriptingToolkit.ImportAttributeValue)) - - - -#### AddSubsetReference(\_subsetReference) - -Appends \_subsetReference to subsetReferences property on ImportRecord C-object. - -* **Parameters:** - **\_subsetReference** ([`SubsetReference`](#module-GRANTA_MIScriptingToolkit.SubsetReference)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### IntegerDataType - - - -### *class* IntegerDataType(isApplicable=None, value=None, \_isOwner=True) - -Bases: [`IDataValue`](#GRANTA_MIScriptingToolkit.IDataValue.IDataValue) - -A type to contain an integer data type. - -* **Parameters:** - * **isApplicable** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **value** ([*int*](https://docs.python.org/3/library/functions.html#int)) - - - -#### *property* isApplicable - -Property isApplicable is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* value - -Property value is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### IntegrationDatabase - - - -### *class* IntegrationDatabase(DBKey=None, author=None, company=None, integrationTables=None, volumeName=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Represents a database within an Integration Profile. - -* **Parameters:** - * **DBKey** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **author** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **company** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **integrationTables** (list of [`TableDetail`](#module-GRANTA_MIScriptingToolkit.TableDetail)) - * **volumeName** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* author - -Property author is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* company - -Property company is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* DBKey - -Property DBKey is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* integrationTables - -Property integrationTables is a list of [`TableDetail`](#module-GRANTA_MIScriptingToolkit.TableDetail) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`TableDetail`](#module-GRANTA_MIScriptingToolkit.TableDetail) - - - -#### *property* volumeName - -Property volumeName is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### IntegrationProfileDetail - - - -### *class* IntegrationProfileDetail(description=None, groupName=None, integrationDatabases=None, name=None, profile=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Detailed information about an Integration Profile. - -* **Parameters:** - * **description** ([`RichText`](#module-GRANTA_MIScriptingToolkit.RichText)) - * **groupName** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **integrationDatabases** (list of [`IntegrationDatabase`](#module-GRANTA_MIScriptingToolkit.IntegrationDatabase)) - * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **profile** ([`IntegrationProfileReference`](#module-GRANTA_MIScriptingToolkit.IntegrationProfileReference)) - - - -#### *property* description - -Property description is of type [`RichText`](#module-GRANTA_MIScriptingToolkit.RichText). - -* **Return type:** - [`RichText`](#module-GRANTA_MIScriptingToolkit.RichText) - - - -#### *property* groupName - -Property groupName is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* integrationDatabases - -Property integrationDatabases is a list of [`IntegrationDatabase`](#module-GRANTA_MIScriptingToolkit.IntegrationDatabase) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`IntegrationDatabase`](#module-GRANTA_MIScriptingToolkit.IntegrationDatabase) - - - -#### *property* name - -Property name is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* profile - -Property profile is of type [`IntegrationProfileReference`](#module-GRANTA_MIScriptingToolkit.IntegrationProfileReference). - -* **Return type:** - [`IntegrationProfileReference`](#module-GRANTA_MIScriptingToolkit.IntegrationProfileReference) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### IntegrationProfileReference - - - -### *class* IntegrationProfileReference(key=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Contains the key for an Integration Profile. - -* **Parameters:** - **key** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* key - -Property key is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### LayoutDetail - - - -### *class* LayoutDetail(attributeCategories=None, layout=None, name=None, table=None, displayNames=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Detailed meta-information about a Layout in a Granta MI database. - -* **Parameters:** - * **attributeCategories** (list of [`AttributeCategory`](#module-GRANTA_MIScriptingToolkit.AttributeCategory)) - * **layout** ([`LayoutReference`](#module-GRANTA_MIScriptingToolkit.LayoutReference)) - * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **table** ([`TableReference`](#module-GRANTA_MIScriptingToolkit.TableReference)) - * **displayNames** (list of [`DisplayName`](#module-GRANTA_MIScriptingToolkit.DisplayName)) - - - -#### *property* attributeCategories - -Property attributeCategories is a list of [`AttributeCategory`](#module-GRANTA_MIScriptingToolkit.AttributeCategory) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`AttributeCategory`](#module-GRANTA_MIScriptingToolkit.AttributeCategory) - - - -#### *property* displayNames - -Property displayNames is a list of [`DisplayName`](#module-GRANTA_MIScriptingToolkit.DisplayName) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`DisplayName`](#module-GRANTA_MIScriptingToolkit.DisplayName) - - - -#### *property* layout - -Property layout is of type [`LayoutReference`](#module-GRANTA_MIScriptingToolkit.LayoutReference). - -* **Return type:** - [`LayoutReference`](#module-GRANTA_MIScriptingToolkit.LayoutReference) - - - -#### *property* name - -Property name is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* table - -Property table is of type [`TableReference`](#module-GRANTA_MIScriptingToolkit.TableReference). - -* **Return type:** - [`TableReference`](#module-GRANTA_MIScriptingToolkit.TableReference) - - - -#### AddAttributeCategory(\_attributeCategory) - -Appends \_attributeCategory to attributeCategories property on LayoutDetail C-object. - -* **Parameters:** - **\_attributeCategory** ([`AttributeCategory`](#module-GRANTA_MIScriptingToolkit.AttributeCategory)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### LayoutReference - - - -### *class* LayoutReference(DBKey=None, layoutIdentity=None, name=None, partialTableReference=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -A type that allows identification of a particular Layout in a Granta MI database. - -* **Parameters:** - * **DBKey** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **layoutIdentity** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **partialTableReference** ([`PartialTableReference`](#module-GRANTA_MIScriptingToolkit.PartialTableReference)) - - - -#### *property* DBKey - -Property DBKey is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* layoutIdentity - -Property layoutIdentity is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* name - -Property name is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* partialTableReference - -Property partialTableReference is of type [`PartialTableReference`](#module-GRANTA_MIScriptingToolkit.PartialTableReference). - -* **Return type:** - [`PartialTableReference`](#module-GRANTA_MIScriptingToolkit.PartialTableReference) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### LessThanSearchValue - - - -### *class* LessThanSearchValue(tabularColumn=None, unit=None, value=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Search criterion to search for data less than a specified value. -Criterion passes if data value is less than a given value. Point, range, and integer attributes are -supported. - -* **Parameters:** - * **tabularColumn** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **unit** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **value** ([*float*](https://docs.python.org/3/library/functions.html#float)) - - - -#### *property* tabularColumn - -Property tabularColumn is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* unit - -Property unit is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* value - -Property value is of type float. - -* **Return type:** - [float](https://docs.python.org/3/library/functions.html#float) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### LinkAllCombinations - - - -### *class* LinkAllCombinations(nodeName=None, sourceRecords=None, targetRecords=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -For each given source record, add links to all the given target records. Silently skip any links -that already exist. - -* **Parameters:** - * **nodeName** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **sourceRecords** (list of [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference)) - * **targetRecords** (list of [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference)) - - - -#### *property* sourceRecords - -Property sourceRecords is a list of [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) - - - -#### *property* targetRecords - -Property targetRecords is of type list of [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference). - -* **Return type:** - list of [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) - - - -#### *property* nodeName - -Property nodeName is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### AddSourceRecord(\_recordReference) - -Appends \_recordReference to sourceRecords property on LinkAllCombinations C-object. - -* **Parameters:** - **\_recordReference** ([`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference)) - - - -#### AddTargetRecord(\_recordReference) - -Appends \_recordReference to targetRecords property on LinkAllCombinations C-object. - -* **Parameters:** - **\_recordReference** ([`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### LinkRecords - - - -### *class* LinkRecords(nodeName=None, sourceRecords=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -For each given source record, add links to the target records specified for that source record. -Silently skip any links that already exist. - -* **Parameters:** - * **nodeName** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **sourceRecords** (list of [`NotatedTargetedSourceRecord`](#module-GRANTA_MIScriptingToolkit.NotatedTargetedSourceRecord)) - - - -#### *property* sourceRecords - -Property sourceRecords is of type list of [`NotatedTargetedSourceRecord`](#module-GRANTA_MIScriptingToolkit.NotatedTargetedSourceRecord). - -* **Return type:** - list of [`NotatedTargetedSourceRecord`](#module-GRANTA_MIScriptingToolkit.NotatedTargetedSourceRecord) - - - -#### *property* nodeName - -Property nodeName is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### AddSourceRecord(\_notatedTargetedSourceRecord) - -Appends \_notatedTargetedSourceRecord to sourceRecords property on LinkRecords C-object. - -* **Parameters:** - **\_notatedTargetedSourceRecord** ([`NotatedTargetedSourceRecord`](#module-GRANTA_MIScriptingToolkit.NotatedTargetedSourceRecord)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### LinkedRecordsDataType - - - -### *class* LinkedRecordsDataType(nodeName=None, recordLinkGroups=None, typeString=None, \_isOwner=True) - -Bases: [`IDataValue`](#GRANTA_MIScriptingToolkit.IDataValue.IDataValue) - -A type representing a list of linked Records. - -* **Parameters:** - * **nodeName** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **recordLinkGroups** (list of [`RecordLinkGroup`](#module-GRANTA_MIScriptingToolkit.RecordLinkGroup)) - * **typeString** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* nodeName - -Property nodeName is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* recordLinkGroups - -Property recordLinkGroups is a list of [`RecordLinkGroup`](#module-GRANTA_MIScriptingToolkit.RecordLinkGroup) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`RecordLinkGroup`](#module-GRANTA_MIScriptingToolkit.RecordLinkGroup) - - - -#### *property* typeString - -Property typeString is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### ListDataType - - - -### *class* ListDataType(items=None, \_isOwner=True) - -Bases: [`IDataValue`](#GRANTA_MIScriptingToolkit.IDataValue.IDataValue) - -A list of values within a Cell in Tabular Data. - -* **Parameters:** - **items** (list of [`ListItem`](#module-GRANTA_MIScriptingToolkit.ListItem)) - - - -#### *property* items - -Property items is a list of [`ListItem`](#module-GRANTA_MIScriptingToolkit.ListItem) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`ListItem`](#module-GRANTA_MIScriptingToolkit.ListItem) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### ListItem - - - -### *class* ListItem(dataType=None, dateDataValue=None, discreteDataValue=None, fileDataValue=None, hyperlinkDataValue=None, integerDataValue=None, logicalDataValue=None, longTextDataValue=None, pictureDataValue=None, pointDataValue=None, rangeDataValue=None, shortTextDataValue=None, sourceRecordReference=None, floatFunctionalGriddedDataValue=None, floatFunctionalSeriesDataValue=None, discreteFunctionalGriddedDataValue=None, discreteFunctionalSeriesDataValue=None, emptyDataValue=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -An item in a List data value. - -* **Parameters:** - * **dataType** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **dateDataValue** ([`DateDataType`](#module-GRANTA_MIScriptingToolkit.DateDataType)) - * **discreteDataValue** ([`DiscreteDataType`](#module-GRANTA_MIScriptingToolkit.DiscreteDataType)) - * **fileDataValue** ([`FileDataType`](#module-GRANTA_MIScriptingToolkit.FileDataType)) - * **hyperlinkDataValue** ([`HyperlinkDataType`](#module-GRANTA_MIScriptingToolkit.HyperlinkDataType)) - * **integerDataValue** ([`IntegerDataType`](#module-GRANTA_MIScriptingToolkit.IntegerDataType)) - * **logicalDataValue** ([`LogicalDataType`](#module-GRANTA_MIScriptingToolkit.LogicalDataType)) - * **longTextDataValue** ([`LongTextDataType`](#module-GRANTA_MIScriptingToolkit.LongTextDataType)) - * **pictureDataValue** ([`PictureDataType`](#module-GRANTA_MIScriptingToolkit.PictureDataType)) - * **pointDataValue** ([`PointDataType`](#module-GRANTA_MIScriptingToolkit.PointDataType)) - * **rangeDataValue** ([`RangeDataType`](#module-GRANTA_MIScriptingToolkit.RangeDataType)) - * **shortTextDataValue** ([`ShortTextDataType`](#module-GRANTA_MIScriptingToolkit.ShortTextDataType)) - * **sourceRecordReference** ([`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference)) - * **floatFunctionalGriddedDataValue** ([`FloatFunctionalGriddedDataType`](#module-GRANTA_MIScriptingToolkit.FloatFunctionalGriddedDataType)) - * **floatFunctionalSeriesDataValue** ([`FloatFunctionalSeriesDataType`](#module-GRANTA_MIScriptingToolkit.FloatFunctionalSeriesDataType)) - * **discreteFunctionalGriddedDataValue** ([`DiscreteFunctionalGriddedDataType`](#module-GRANTA_MIScriptingToolkit.DiscreteFunctionalGriddedDataType)) - * **discreteFunctionalSeriesDataValue** ([`DiscreteFunctionalSeriesDataType`](#module-GRANTA_MIScriptingToolkit.DiscreteFunctionalSeriesDataType)) - * **emptyDataValue** ([`EmptyDataType`](#module-GRANTA_MIScriptingToolkit.EmptyDataType)) - - - -#### *property* dataType - -Property dataType is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* dateDataValue - -Property dateDataValue is of type [`DateDataType`](#module-GRANTA_MIScriptingToolkit.DateDataType). - -* **Return type:** - [`DateDataType`](#module-GRANTA_MIScriptingToolkit.DateDataType) - - - -#### *property* discreteDataValue - -Property discreteDataValue is of type [`DiscreteDataType`](#module-GRANTA_MIScriptingToolkit.DiscreteDataType). - -* **Return type:** - [`DiscreteDataType`](#module-GRANTA_MIScriptingToolkit.DiscreteDataType) - - - -#### *property* discreteFunctionalGriddedDataValue - -Property discreteFunctionalGriddedDataValue is of type [`DiscreteFunctionalGriddedDataType`](#module-GRANTA_MIScriptingToolkit.DiscreteFunctionalGriddedDataType). - -* **Return type:** - [`DiscreteFunctionalGriddedDataType`](#module-GRANTA_MIScriptingToolkit.DiscreteFunctionalGriddedDataType) - - - -#### *property* discreteFunctionalSeriesDataValue - -Property discreteFunctionalSeriesDataValue is of type [`DiscreteFunctionalSeriesDataType`](#module-GRANTA_MIScriptingToolkit.DiscreteFunctionalSeriesDataType). - -* **Return type:** - [`DiscreteFunctionalSeriesDataType`](#module-GRANTA_MIScriptingToolkit.DiscreteFunctionalSeriesDataType) - - - -#### *property* emptyDataValue - -Property emptyDataValue is of type [`EmptyDataType`](#module-GRANTA_MIScriptingToolkit.EmptyDataType). - -* **Return type:** - [`EmptyDataType`](#module-GRANTA_MIScriptingToolkit.EmptyDataType) - - - -#### *property* fileDataValue - -Property fileDataValue is of type [`FileDataType`](#module-GRANTA_MIScriptingToolkit.FileDataType). - -* **Return type:** - [`FileDataType`](#module-GRANTA_MIScriptingToolkit.FileDataType) - - - -#### *property* floatFunctionalGriddedDataValue - -Property floatFunctionalGriddedDataValue is of type [`FloatFunctionalGriddedDataType`](#module-GRANTA_MIScriptingToolkit.FloatFunctionalGriddedDataType). - -* **Return type:** - [`FloatFunctionalGriddedDataType`](#module-GRANTA_MIScriptingToolkit.FloatFunctionalGriddedDataType) - - - -#### *property* floatFunctionalSeriesDataValue - -Property floatFunctionalSeriesDataValue is of type [`FloatFunctionalSeriesDataType`](#module-GRANTA_MIScriptingToolkit.FloatFunctionalSeriesDataType). - -* **Return type:** - [`FloatFunctionalSeriesDataType`](#module-GRANTA_MIScriptingToolkit.FloatFunctionalSeriesDataType) - - - -#### *property* hyperlinkDataValue - -Property hyperlinkDataValue is of type [`HyperlinkDataType`](#module-GRANTA_MIScriptingToolkit.HyperlinkDataType). - -* **Return type:** - [`HyperlinkDataType`](#module-GRANTA_MIScriptingToolkit.HyperlinkDataType) - - - -#### *property* integerDataValue - -Property integerDataValue is of type [`IntegerDataType`](#module-GRANTA_MIScriptingToolkit.IntegerDataType). - -* **Return type:** - [`IntegerDataType`](#module-GRANTA_MIScriptingToolkit.IntegerDataType) - - - -#### *property* logicalDataValue - -Property logicalDataValue is of type [`LogicalDataType`](#module-GRANTA_MIScriptingToolkit.LogicalDataType). - -* **Return type:** - [`LogicalDataType`](#module-GRANTA_MIScriptingToolkit.LogicalDataType) - - - -#### *property* longTextDataValue - -Property longTextDataValue is of type [`LongTextDataType`](#module-GRANTA_MIScriptingToolkit.LongTextDataType). - -* **Return type:** - [`LongTextDataType`](#module-GRANTA_MIScriptingToolkit.LongTextDataType) - - - -#### *property* pictureDataValue - -Property pictureDataValue is of type [`PictureDataType`](#module-GRANTA_MIScriptingToolkit.PictureDataType). - -* **Return type:** - [`PictureDataType`](#module-GRANTA_MIScriptingToolkit.PictureDataType) - - - -#### *property* pointDataValue - -Property pointDataValue is of type [`PointDataType`](#module-GRANTA_MIScriptingToolkit.PointDataType). - -* **Return type:** - [`PointDataType`](#module-GRANTA_MIScriptingToolkit.PointDataType) - - - -#### *property* rangeDataValue - -Property rangeDataValue is of type [`RangeDataType`](#module-GRANTA_MIScriptingToolkit.RangeDataType). - -* **Return type:** - [`RangeDataType`](#module-GRANTA_MIScriptingToolkit.RangeDataType) - - - -#### *property* shortTextDataValue - -Property shortTextDataValue is of type [`ShortTextDataType`](#module-GRANTA_MIScriptingToolkit.ShortTextDataType). - -* **Return type:** - [`ShortTextDataType`](#module-GRANTA_MIScriptingToolkit.ShortTextDataType) - - - -#### *property* sourceRecordReference - -Property sourceRecordReference is of type [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference). - -* **Return type:** - [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### LogicalDataType - - - -### *class* LogicalDataType(isApplicable=None, value=None, \_isOwner=True) - -Bases: [`IDataValue`](#GRANTA_MIScriptingToolkit.IDataValue.IDataValue) - -A type to contain a logical data type. - -* **Parameters:** - * **isApplicable** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **value** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - - - -#### *property* isApplicable - -Property isApplicable is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* value - -Property value is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### LongTextDataType - - - -### *class* LongTextDataType(isApplicable=None, value=None, \_isOwner=True) - -Bases: [`IDataValue`](#GRANTA_MIScriptingToolkit.IDataValue.IDataValue) - -A type to contain a long text data type. - -* **Parameters:** - * **isApplicable** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **value** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* isApplicable - -Property isApplicable is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* value - -Property value is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### LookupValue - - - -### *class* LookupValue(attributeReference=None, attributeValue=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Object containing an [`AttributeValue`](#module-GRANTA_MIScriptingToolkit.AttributeValue) and -[`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference) object that uniquely identify a record in a -table. - -* **Parameters:** - * **attributeReference** ([`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference)) - * **attributeValue** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* attributeReference - -Property attributeReference is of type [`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference). - -* **Return type:** - [`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference) - - - -#### *property* attributeValue - -Property attributeValue is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### LowEndSearchValue - - - -### *class* LowEndSearchValue(unit=None, value=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Lower limit for the [`BetweenSearchValue`](#module-GRANTA_MIScriptingToolkit.BetweenSearchValue) search criterion. - -* **Parameters:** - * **unit** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **value** ([*float*](https://docs.python.org/3/library/functions.html#float)) - - - -#### *property* unit - -Property unit is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* value - -Property value is of type float. - -* **Return type:** - [float](https://docs.python.org/3/library/functions.html#float) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### MIEntityReference - - - -### *class* MIEntityReference - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -A base type for types that identify entities in a Granta MI database. - -The details of how entities are identified differ between concrete subtypes. - -#### WARNING -You should not interact directly with this class. - - - -#### GetDBKey() - - - -#### WithDBKey(value) - - - - - -### MIEntityResolution - - - -### *class* MIEntityResolution(canWrite=None, entityReference=None, resolved=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Represents whether the entity referred to by the reference property can actually be resolved to an -MI entity, and if that entity can be resolved whether or not it is writable. - -* **Parameters:** - * **canWrite** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **entityReference** ([`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference)) - * **resolved** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - - - -#### *class* CanWrite - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - - - -#### Yes *= 0* - - - -#### No *= 1* - - - -#### NotSupported *= 2* - - - -#### *property* canWrite - -Property canWrite is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* entityReference - -Property entityReference is of type [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference). - -* **Return type:** - [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) - - - -#### *property* resolved - -Property resolved is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### MIParameterValue - - - -### *class* MIParameterValue(revisionInfo=None, value=None, valueName=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -A named value of a Parameter in a Granta MI Database. - -* **Parameters:** - * **revisionInfo** ([`RevisionInfo`](#module-GRANTA_MIScriptingToolkit.RevisionInfo)) - * **value** ([*float*](https://docs.python.org/3/library/functions.html#float)) - * **valueName** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* revisionInfo - -Property revisionInfo is of type [`RevisionInfo`](#module-GRANTA_MIScriptingToolkit.RevisionInfo). - -* **Return type:** - [`RevisionInfo`](#module-GRANTA_MIScriptingToolkit.RevisionInfo) - - - -#### *property* value - -Property value is of type float. - -* **Return type:** - [float](https://docs.python.org/3/library/functions.html#float) - - - -#### *property* valueName - -Property valueName is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### MISession - - - -### *class* MISession(url='', verbosity=1) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -A connection to a Granta MI Server. Don’t create this class directly, instead see -[`GRANTA_MISession`](#GRANTA_MIScriptingToolkit.GRANTA_MISession.GRANTA_MISession) - -* **Parameters:** - * **url** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – URL to access the Granta MI Service Layer - * **verbosity** ([`str`](https://docs.python.org/3/library/stdtypes.html#str), {1, 2, 3}) – Logging verbosity, accepted values are: 1 - “ERROR”, 2 - “WARNING”, or 3 - “DEBUG” - - - -#### ConnectionIsValid() - -Indicates whether the connection was successful. - -* **Returns:** - * **is_valid** (*bool*) – Whether the connection test succeeded - * **description** (*str*) – Description of the test outcome - - - -#### TestConnection() - -Raises an exception if a request to the Granta MI Service Layer does not respond or responds with an error. - -* **Raises:** - [**GRANTA_Exception**](#GRANTA_MIScriptingToolkit.GRANTA_Exceptions.GRANTA_Exception) – If the connection test failed - - - -#### UseAutoLogon() - -Use the Windows credentials of the current user to authenticate to the Granta MI Service Layer. - - - -#### SetCredentials(domain, username, password) - -Use the provided credentials to authenticate with the Granta MI Service Layer. - -The Granta MI Service Layer must be configured to allow Basic authentication, or the MI Scripting Toolkit -session must be created on Windows, and NTLM authentication must be enabled. - -* **Parameters:** - * **username** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – Granta MI username - * **password** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – Granta MI password - * **domain** ([`str`](https://docs.python.org/3/library/stdtypes.html#str), optional) – Granta MI user domain - - - -#### SetAuthorization(auth) - -Use Open ID Connect to authenticate to the Granta MI Service Layer - -* **Parameters:** - **auth** ([`OIDC`](#GRANTA_MIScriptingToolkit.OIDC.OIDC)) - - - -#### SetReceiveTimeout(timeout) - -Sets time in milliseconds to wait for a response before timing out. - -* **Parameters:** - **timeout** ([*int*](https://docs.python.org/3/library/functions.html#int)) – Timeout (in milliseconds) - - - -#### *property* actAsReadUser - -Forces the session to operate with READ permissions, even if the user has higher privileges. - -If the user authenticates with a role that has additional privileges the session will behave as though they -have only read permissions. This prevents writing to the database and affects which versions of records are -visible for version controlled databases. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - - - -### MinMax - - - -### *class* MinMax(maxValue=None, minValue=None, units=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -The minimum and maximum data values for a specified numerical attribute, calculated from all records -you have read permissions for in a database. - -* **Parameters:** - * **maxValue** ([`MinMaxValue`](#module-GRANTA_MIScriptingToolkit.MinMaxValue)) - * **minValue** ([`MinMaxValue`](#module-GRANTA_MIScriptingToolkit.MinMaxValue)) - * **units** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* maxValue - -Property maxValue is of type [`MinMaxValue`](#module-GRANTA_MIScriptingToolkit.MinMaxValue). - -* **Return type:** - [`MinMaxValue`](#module-GRANTA_MIScriptingToolkit.MinMaxValue) - - - -#### *property* minValue - -Property minValue is of type [`MinMaxValue`](#module-GRANTA_MIScriptingToolkit.MinMaxValue). - -* **Return type:** - [`MinMaxValue`](#module-GRANTA_MIScriptingToolkit.MinMaxValue) - - - -#### *property* units - -Property units is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### MinMaxValue - - - -### *class* MinMaxValue(dateTime=None, double=None, integer=None, type=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -A type that represents the minimum or maximum data value for a numerical attribute in a database. - -* **Parameters:** - * **dateTime** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **double** ([*float*](https://docs.python.org/3/library/functions.html#float)) - * **integer** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **type** ([*int*](https://docs.python.org/3/library/functions.html#int)) - - - -#### *class* Type - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - - - -#### ERROR *= -1* - - - -#### DateType *= 0* - - - -#### DoubleType *= 1* - - - -#### IntegerType *= 2* - - - -#### NotANumber *= 3* - - - -#### *property* dateTime - -Property dateTime is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* double - -Property double is of type float. - -* **Return type:** - [float](https://docs.python.org/3/library/functions.html#float) - - - -#### *property* integer - -Property integer is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* type - -Property type is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### ModifyRecordLinksRequest - - - -### *class* ModifyRecordLinksRequest(importErrorMode=None, recordLinkCheckMode=None, recordLinkGroupReference=None, recordLinkModifications=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Input to the ModifyRecordLinks operation. -Requires a [`RecordLinkGroupReference`](#module-GRANTA_MIScriptingToolkit.RecordLinkGroupReference) to the record link group you -wish to modify and a [`RecordLinkModifications`](#module-GRANTA_MIScriptingToolkit.RecordLinkModifications) object, which -contains the modifications you wish to make to the record link group. The ‘importErrorMode’ -property defines how to handle errors which occur during linking and can take the following values: -‘FaultAndRollbackOnAnyError’, which stops the linking request when an error occurs and attempts to -roll back to the state before the request was issued; or ‘LogAndContinueWherePossible’, which will -log non-fatal errors and attempt to continue with the linking request. The ‘recordLinkCheckMode’ -property defines how to check the status of existing links and takes the following values: -‘CheckOnlyForwardLinks’, which checks for link only in the forward direction and is quicker than -checking both directions; or ‘CheckForwardAndReverseLinks’, which is slower but safer as it checks -for both forward and backward links. - -* **Parameters:** - * **importErrorMode** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **recordLinkCheckMode** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **recordLinkGroupReference** ([`RecordLinkGroupReference`](#module-GRANTA_MIScriptingToolkit.RecordLinkGroupReference)) - * **recordLinkModifications** ([`RecordLinkModifications`](#module-GRANTA_MIScriptingToolkit.RecordLinkModifications)) - - - -#### *property* importErrorMode - -Property importErrorMode is of type str. See [`GRANTA_Constants`](#module-GRANTA_MIScriptingToolkit.GRANTA_Constants) for supported values. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* recordLinkCheckMode - -Property recordLinkCheckMode is of type str. See [`GRANTA_Constants`](#module-GRANTA_MIScriptingToolkit.GRANTA_Constants) for supported values. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* recordLinkGroupReference - -Property recordLinkGroupReference is of type [`RecordLinkGroupReference`](#module-GRANTA_MIScriptingToolkit.RecordLinkGroupReference). - -* **Return type:** - [`RecordLinkGroupReference`](#module-GRANTA_MIScriptingToolkit.RecordLinkGroupReference) - - - -#### *property* recordLinkModifications - -Property recordLinkModifications is of type [`RecordLinkModifications`](#module-GRANTA_MIScriptingToolkit.RecordLinkModifications). - -* **Return type:** - [`RecordLinkModifications`](#module-GRANTA_MIScriptingToolkit.RecordLinkModifications) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### ModifyRecordLinksResponse - - - -### *class* ModifyRecordLinksResponse(c_obj) - -Bases: [`Response`](#GRANTA_MIScriptingToolkit.Response.Response) - -The response from a ModifyRecordLinks request. - -* **Parameters:** - **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a ModifyRecordLinksResponse object. - - - -#### *property* recordLinkChanges - -Property recordLinkChanges is of type [`RecordLinkChanges`](#module-GRANTA_MIScriptingToolkit.RecordLinkChanges). - -* **Return type:** - [`RecordLinkChanges`](#module-GRANTA_MIScriptingToolkit.RecordLinkChanges) - - - - - -### NamedAttribute - - - -### *class* NamedAttribute(about=None, attribute=None, isMeta=None, name=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Name information about an Attribute in a Granta MI database. - -* **Parameters:** - * **about** ([`NamedAttribute`](#module-GRANTA_MIScriptingToolkit.NamedAttribute)) - * **attribute** ([`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference)) - * **isMeta** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* about - -Property about is of type [`NamedAttribute`](#module-GRANTA_MIScriptingToolkit.NamedAttribute). Only populated if ‘isMeta’ is True. - -* **Return type:** - [`NamedAttribute`](#module-GRANTA_MIScriptingToolkit.NamedAttribute) - - - -#### *property* attribute - -Property attribute is of type [`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference). - -* **Return type:** - [`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference) - - - -#### *property* isMeta - -Property isMeta is of type bool. If this is True, the ‘about’ property may have additional information about the related parent attribute. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* name - -Property name is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### NamedLayout - - - -### *class* NamedLayout(layout=None, name=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -A layout in a Granta MI database. - -* **Parameters:** - * **layout** ([`LayoutReference`](#module-GRANTA_MIScriptingToolkit.LayoutReference)) - * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* layout - -Property layout is of type [`LayoutReference`](#module-GRANTA_MIScriptingToolkit.LayoutReference). - -* **Return type:** - [`LayoutReference`](#module-GRANTA_MIScriptingToolkit.LayoutReference) - - - -#### *property* name - -Property name is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### NamedRecord - - - -### *class* NamedRecord(longName=None, recordReference=None, shortName=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -A [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) with the short and long name of the record. - -* **Parameters:** - * **longName** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **recordReference** ([`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference)) - * **shortName** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* longName - -Property longName is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* recordReference - -Property recordReference is of type [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference). - -* **Return type:** - [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) - - - -#### *property* shortName - -Property shortName is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### NamedSubset - - - -### *class* NamedSubset(name=None, subset=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -A [`SubsetReference`](#module-GRANTA_MIScriptingToolkit.SubsetReference) with the subset name. - -* **Parameters:** - * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **subset** ([`SubsetReference`](#module-GRANTA_MIScriptingToolkit.SubsetReference)) - - - -#### *property* name - -Property name is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* subset - -Property subset is of type [`SubsetReference`](#module-GRANTA_MIScriptingToolkit.SubsetReference). - -* **Return type:** - [`SubsetReference`](#module-GRANTA_MIScriptingToolkit.SubsetReference) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### NamedTargetedSourceRecord - - - -### *class* NamedTargetedSourceRecord(record=None, targetRecords=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -A named record used for modifying record links. - -* **Parameters:** - * **record** ([`NamedRecord`](#module-GRANTA_MIScriptingToolkit.NamedRecord)) - * **targetRecords** (list of [`NamedRecord`](#module-GRANTA_MIScriptingToolkit.NamedRecord)) - - - -#### *property* targetRecords - -Property targetRecords is a list of [`NamedRecord`](#module-GRANTA_MIScriptingToolkit.NamedRecord) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`NamedRecord`](#module-GRANTA_MIScriptingToolkit.NamedRecord) - - - -#### *property* record - -Property record is of type [`NamedRecord`](#module-GRANTA_MIScriptingToolkit.NamedRecord). - -* **Return type:** - [`NamedRecord`](#module-GRANTA_MIScriptingToolkit.NamedRecord) - - - -#### AddTargetRecords(\_namedRecord) - -Appends \_namedRecord to targetRecords property on NamedTargetedSourceRecord C-object. - -* **Parameters:** - **\_namedRecord** ([`NamedRecord`](#module-GRANTA_MIScriptingToolkit.NamedRecord)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### NotatedTargetRecord - - - -### *class* NotatedTargetRecord(notes=None, record=None, reverseNotes=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -A [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) of the record you wish to link to and notes on -the record link. -Requires a [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference). Notes on the link and the reverse -link are optional. - -* **Parameters:** - * **notes** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **record** ([`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference)) - * **reverseNotes** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* notes - -Property notes is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* record - -Property record is of type [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference). - -* **Return type:** - [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) - - - -#### *property* reverseNotes - -Property reverseNotes is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### NotatedTargetedSourceRecord - - - -### *class* NotatedTargetedSourceRecord(sourceRecord=None, targetRecords=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -A [`NamedRecord`](#module-GRANTA_MIScriptingToolkit.NamedRecord) to link from and container of -[`NamedRecord`](#module-GRANTA_MIScriptingToolkit.NamedRecord) of the records to link to. -Requires a source [`NamedRecord`](#module-GRANTA_MIScriptingToolkit.NamedRecord). Can set zero to many target -[`NamedRecord`](#module-GRANTA_MIScriptingToolkit.NamedRecord) objects you wish to link to. - -* **Parameters:** - * **sourceRecord** ([`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference)) - * **targetRecords** (list of [`NotatedTargetRecord`](#module-GRANTA_MIScriptingToolkit.NotatedTargetRecord)) - - - -#### *property* targetRecords - -Property targetRecords is a list of [`NotatedTargetRecord`](#module-GRANTA_MIScriptingToolkit.NotatedTargetRecord) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`NotatedTargetRecord`](#module-GRANTA_MIScriptingToolkit.NotatedTargetRecord) - - - -#### *property* sourceRecord - -Property sourceRecord is of type [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference). - -* **Return type:** - [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) - - - -#### AddTargetRecord(\_notatedTargetRecord) - -Appends \_notatedTargetRecord to targetRecords property on NotatedTargetedSourceRecord C-object. - -* **Parameters:** - **\_notatedTargetRecord** ([`NotatedTargetRecord`](#module-GRANTA_MIScriptingToolkit.NotatedTargetRecord)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### OIDC - - - -### *class* OIDC(accessToken=None, refreshToken=None, authorizeTimeout=None) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -An object to allow authorization using OpenID Connect. Contact Ansys Granta Technical Support for information -on supported identity providers, and for configuration and setup documentation. - -If neither accessToken nor refreshToken are provided then call [`Authorize()`](#GRANTA_MIScriptingToolkit.OIDC.OIDC.Authorize) for interactive login with -the user’s credentials. If refreshToken is provided then the session will attempt to obtain an access token from -the identity provider. If accessToken is provided then the session will use it directly. - -* **Parameters:** - * **accessToken** ([`str`](https://docs.python.org/3/library/stdtypes.html#str), optional) – Valid access token for the MI Service Layer - * **refreshToken** ([`str`](https://docs.python.org/3/library/stdtypes.html#str), optional) – Valid refresh token for the MI Service Layer - * **authorizeTimeout** ([`int`](https://docs.python.org/3/library/functions.html#int), default 300,000) – Number of milliseconds to wait for a response after calling [`Authorize()`](#GRANTA_MIScriptingToolkit.OIDC.OIDC.Authorize) - - - -#### Authorize() - -Authorize a Granta MI session with an OpenID Connect provider. - - - -#### CheckAuthentication() - -Checks whether your access and refresh tokens are valid. - -* **Returns:** - * **is_valid** (*bool*) – Whether the tokens could be used to connect to the Granta MI Service layer - * **message** (*str*) – Error message if the tokens could not be used to connect to the Granta MI Service Layer. - - - -#### TestAuthentication() - -Checks whether your access and refresh tokens are valid. - -* **Raises:** - [**GRANTA_Exception**](#GRANTA_MIScriptingToolkit.GRANTA_Exceptions.GRANTA_Exception) – If the tokens could not be used to connect to the Granta MI Service Layer. - - - -#### *property* authorizeTimeout - -The number of milliseconds to wait for the user to authenticate in their browser. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* accessToken - -OIDC access token. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* refreshToken - -OIDC refresh token, if one is available from the OpenID Identity Provider. - -#### NOTE -The identity provider must provide the offline_access scope for refresh tokens to be available - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - - - -### ParameterDetail - - - -### *class* ParameterDetail(appliesToAttribute=None, appliesToRecord=None, defaultValue=None, interpolationType=None, name=None, order=None, parameterReference=None, parameterType=None, parameterValues=None, revisionInfo=None, scaleType=None, unit=None, helpInfo=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Detailed information about a Parameter in a Granta MI Database. - -* **Parameters:** - * **appliesToAttribute** ([`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference)) - * **appliesToRecord** ([`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference)) - * **defaultValue** ([`MIParameterValue`](#module-GRANTA_MIScriptingToolkit.MIParameterValue)) - * **interpolationType** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **order** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **parameterReference** ([`ParameterReference`](#module-GRANTA_MIScriptingToolkit.ParameterReference)) - * **parameterType** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **parameterValues** (list of [`MIParameterValue`](#module-GRANTA_MIScriptingToolkit.MIParameterValue)) - * **revisionInfo** ([`RevisionInfo`](#module-GRANTA_MIScriptingToolkit.RevisionInfo)) - * **scaleType** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **unit** ([`UnitInformation`](#module-GRANTA_MIScriptingToolkit.UnitInformation)) - * **helpInfo** ([`HelpInfo`](#module-GRANTA_MIScriptingToolkit.HelpInfo)) - - - -#### *class* Interpolation - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - - - -#### NONE *= 0* - - - -#### Linear *= 1* - - - -#### CubicSpline *= 2* - - - -#### *class* ScaleType - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - - - -#### NotSet *= 0* - - - -#### Linear *= 1* - - - -#### Log *= 2* - - - -#### *class* ParameterType - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - - - -#### NumericUnrestricted *= 0* - - - -#### NumericRestricted *= 1* - - - -#### Discrete *= 2* - - - -#### *property* appliesToAttribute - -Property appliesToAttribute is of type [`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference). - -* **Return type:** - [`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference) - - - -#### *property* appliesToRecord - -Property appliesToRecord is of type [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference). - -* **Return type:** - [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) - - - -#### *property* defaultValue - -Property defaultValue is of type [`MIParameterValue`](#module-GRANTA_MIScriptingToolkit.MIParameterValue). - -* **Return type:** - [`MIParameterValue`](#module-GRANTA_MIScriptingToolkit.MIParameterValue) - - - -#### *property* helpInfo - -Property helpInfo is of type [`HelpInfo`](#module-GRANTA_MIScriptingToolkit.HelpInfo). - -* **Return type:** - [`HelpInfo`](#module-GRANTA_MIScriptingToolkit.HelpInfo) - - - -#### *property* interpolationType - -Property interpolationType is of type int. See [`ParameterDetail.Interpolation`](#GRANTA_MIScriptingToolkit.ParameterDetail.ParameterDetail.Interpolation) for supported values. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* name - -Property name is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* parameterValues - -Property parameterValues is a list of [`MIParameterValue`](#module-GRANTA_MIScriptingToolkit.MIParameterValue) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`MIParameterValue`](#module-GRANTA_MIScriptingToolkit.MIParameterValue) - - - -#### *property* order - -Property order is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* parameterReference - -Property parameterReference is of type [`ParameterReference`](#module-GRANTA_MIScriptingToolkit.ParameterReference). - -* **Return type:** - [`ParameterReference`](#module-GRANTA_MIScriptingToolkit.ParameterReference) - - - -#### *property* parameterType - -Property parameterType is of type int. See [`ParameterDetail.ParameterType`](#GRANTA_MIScriptingToolkit.ParameterDetail.ParameterDetail.ParameterType) for supported values. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* revisionInfo - -Property revisionInfo is of type [`RevisionInfo`](#module-GRANTA_MIScriptingToolkit.RevisionInfo). - -* **Return type:** - [`RevisionInfo`](#module-GRANTA_MIScriptingToolkit.RevisionInfo) - - - -#### *property* scaleType - -Property scaleType is of type int. See [`ParameterDetail.ScaleType`](#GRANTA_MIScriptingToolkit.ParameterDetail.ParameterDetail.ScaleType) for supported values. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* unit - -Property unit is of type [`UnitInformation`](#module-GRANTA_MIScriptingToolkit.UnitInformation). - -* **Return type:** - [`UnitInformation`](#module-GRANTA_MIScriptingToolkit.UnitInformation) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### ParameterDomain - - - -### *class* ParameterDomain(exporterParameterId=None, interpolable=None, values=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -A type to contain a list of parameter values. - -* **Parameters:** - * **exporterParameterId** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **interpolable** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **values** (list of [`ParameterValue`](#module-GRANTA_MIScriptingToolkit.ParameterValue)) - - - -#### *property* exporterParameterId - -Property exporterParameterId is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* interpolable - -Property interpolable is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* values - -Property values is a list of [`ParameterValue`](#module-GRANTA_MIScriptingToolkit.ParameterValue) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`ParameterValue`](#module-GRANTA_MIScriptingToolkit.ParameterValue) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### ParameterInformation - - - -### *class* ParameterInformation(name=None, parameterReference=None, unit=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Information for a parameter in a Granta MI database. -Contains the name and unit information for a parameter and a -[`ParameterReference`](#module-GRANTA_MIScriptingToolkit.ParameterReference) to the parameter. - -* **Parameters:** - * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **parameterReference** ([`ParameterReference`](#module-GRANTA_MIScriptingToolkit.ParameterReference)) - * **unit** ([`UnitInformation`](#module-GRANTA_MIScriptingToolkit.UnitInformation)) - - - -#### *property* name - -Property name is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* parameterReference - -Property parameterReference is of type [`ParameterReference`](#module-GRANTA_MIScriptingToolkit.ParameterReference). - -* **Return type:** - [`ParameterReference`](#module-GRANTA_MIScriptingToolkit.ParameterReference) - - - -#### *property* unit - -Property unit is of type [`UnitInformation`](#module-GRANTA_MIScriptingToolkit.UnitInformation). - -* **Return type:** - [`UnitInformation`](#module-GRANTA_MIScriptingToolkit.UnitInformation) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### ParameterReference - - - -### *class* ParameterReference(DBKey=None, ID=None, name=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Identification of a particular parameter in a Granta MI database . -For requests a DBKey is required, and either the parameter ID or the parameter name. - -* **Parameters:** - * **DBKey** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **ID** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* DBKey - -Property DBKey is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* ID - -Property ID is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* name - -Property name is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### ParameterReferenceAndValue - - - -### *class* ParameterReferenceAndValue(parameter=None, parameterValue=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Contains a [`ParameterReference`](#module-GRANTA_MIScriptingToolkit.ParameterReference) and a -[`ParameterValue`](#module-GRANTA_MIScriptingToolkit.ParameterValue). - -* **Parameters:** - * **parameter** ([`ParameterReference`](#module-GRANTA_MIScriptingToolkit.ParameterReference)) - * **parameterValue** ([`ParameterValue`](#module-GRANTA_MIScriptingToolkit.ParameterValue)) - - - -#### *property* parameter - -Property parameter is of type [`ParameterReference`](#module-GRANTA_MIScriptingToolkit.ParameterReference). - -* **Return type:** - [`ParameterReference`](#module-GRANTA_MIScriptingToolkit.ParameterReference) - - - -#### *property* parameterValue - -Property parameterValue is of type [`ParameterValue`](#module-GRANTA_MIScriptingToolkit.ParameterValue). - -* **Return type:** - [`ParameterValue`](#module-GRANTA_MIScriptingToolkit.ParameterValue) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### ParameterReferencesAndValues - - - -### *class* ParameterReferencesAndValues(parameterWithValues=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -A collection of [`ParameterReferenceAndValue`](#module-GRANTA_MIScriptingToolkit.ParameterReferenceAndValue) objects. - -* **Parameters:** - **parameterWithValues** (list of [`ParameterReferenceAndValue`](#module-GRANTA_MIScriptingToolkit.ParameterReferenceAndValue)) - - - -#### *property* parameterWithValues - -Property parameterWithValues is a list of [`ParameterReferenceAndValue`](#module-GRANTA_MIScriptingToolkit.ParameterReferenceAndValue) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`ParameterReferenceAndValue`](#module-GRANTA_MIScriptingToolkit.ParameterReferenceAndValue) - - - -#### AddParameterWithValue(\_parameterReferenceAndValue) - -Appends \_parameterReferenceAndValue to parameterWithValues property on ParameterReferencesAndValues C-object. - -* **Parameters:** - **\_parameterReferenceAndValue** ([`ParameterReferenceAndValue`](#module-GRANTA_MIScriptingToolkit.ParameterReferenceAndValue)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### ParameterValue - - - -### *class* ParameterValue(discreteValue=None, numericValue=None, type=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -A value of a Parameter in Functional data. - -* **Parameters:** - * **discreteValue** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **numericValue** ([*float*](https://docs.python.org/3/library/functions.html#float)) - * **type** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* discreteValue - -Property discreteValue is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* numericValue - -Property numericValue is of type float. - -* **Return type:** - [float](https://docs.python.org/3/library/functions.html#float) - - - -#### *property* type - -Property type is of type str. There is no need to set this property manually. -See [`GRANTA_Constants`](#module-GRANTA_MIScriptingToolkit.GRANTA_Constants) for supported values. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### Parameters - - - -### *class* Parameters(parameters=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -A collection of [`ParameterInformation`](#module-GRANTA_MIScriptingToolkit.ParameterInformation) objects. - -* **Parameters:** - **parameters** (list of [`ParameterInformation`](#module-GRANTA_MIScriptingToolkit.ParameterInformation)) - - - -#### *property* parameters - -Property parameters is a list of [`ParameterInformation`](#module-GRANTA_MIScriptingToolkit.ParameterInformation) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`ParameterInformation`](#module-GRANTA_MIScriptingToolkit.ParameterInformation) - - - -#### AddParameter(\_parameterInformation) - -Appends \_parameterInformation to parameters property on Parameters C-object. - -* **Parameters:** - **\_parameterInformation** ([`ParameterInformation`](#module-GRANTA_MIScriptingToolkit.ParameterInformation)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### PartialTableReference - - - -### *class* PartialTableReference(tableGUID=None, tableID=None, tableName=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -A reference to a Granta MI table. -Usually, just one of the several optional fields should be provided; where more than one is -provided, the highest priority one is used, where the descending priority order is: tableIdentity, -tableGUID, tableName. - -* **Parameters:** - * **tableGUID** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **tableID** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **tableName** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* tableGUID - -Property tableGUID is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* tableID - -Property tableID is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* tableName - -Property tableName is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### PathLeaf - - - -### *class* PathLeaf(longName=None, recordReference=None, shortName=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -The folder furthest from the root record folder, for each path checked or created. - -* **Parameters:** - * **longName** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **recordReference** ([`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference)) - * **shortName** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* longName - -Property longName is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* recordReference - -Property recordReference is of type [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference). - -* **Return type:** - [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) - - - -#### *property* shortName - -Property shortName is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### PictureDataType - - - -### *class* PictureDataType(URL=None, contentType=None, data=None, isApplicable=None, \_isOwner=True) - -Bases: [`IDataValue`](#GRANTA_MIScriptingToolkit.IDataValue.IDataValue) - -A type representing a piece of Picture data in a Granta MI Database. -To get a byte-array representing the binary data, call ReadBinaryData(). To set the binary data (as -part of a data import), use ModifyBinaryData(). - -* **Parameters:** - * **URL** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **contentType** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **data** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **isApplicable** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - - - -#### ModifyBinaryData(binaryData) - -* **Parameters:** - **binaryData** ([*bytes*](https://docs.python.org/3/library/stdtypes.html#bytes)) - - - -#### ReadBinaryData() - -* **Return type:** - [bytes](https://docs.python.org/3/library/stdtypes.html#bytes) - - - -#### *property* contentType - -Property contentType is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* data - -Property data is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* isApplicable - -Property isApplicable is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* URL - -Property URL is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### PointDataType - - - -### *class* PointDataType(isApplicable=None, isEstimated=None, parameters=None, points=None, unitSymbol=None, \_isOwner=True) - -Bases: [`IDataValue`](#GRANTA_MIScriptingToolkit.IDataValue.IDataValue) - -A type to contain an array of float data types. - -* **Parameters:** - * **isApplicable** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **isEstimated** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **parameters** ([`Parameters`](#module-GRANTA_MIScriptingToolkit.Parameters)) - * **points** (list of [`PointValueWithParameters`](#module-GRANTA_MIScriptingToolkit.PointValueWithParameters)) - * **unitSymbol** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* points - -Property points is a list of [`PointValueWithParameters`](#module-GRANTA_MIScriptingToolkit.PointValueWithParameters) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`PointValueWithParameters`](#module-GRANTA_MIScriptingToolkit.PointValueWithParameters) - - - -#### *property* isApplicable - -Property isApplicable is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* isEstimated - -Property isEstimated is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* parameters - -Property parameters is of type [`Parameters`](#module-GRANTA_MIScriptingToolkit.Parameters). - -* **Return type:** - [`Parameters`](#module-GRANTA_MIScriptingToolkit.Parameters) - - - -#### *property* unitSymbol - -Property unitSymbol is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### AddPoint(\_pointValueWithParameters) - -Appends \_pointValueWithParameters to points property on PointDataType C-object. - -* **Parameters:** - **\_pointValueWithParameters** ([`PointValueWithParameters`](#module-GRANTA_MIScriptingToolkit.PointValueWithParameters)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### PointValueWithParameters - - - -### *class* PointValueWithParameters(hasTrailingZeroInfo=None, trailingZeroInfo=None, value=None, valueParameters=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -A numeric value with associated [`ParameterReferencesAndValues`](#module-GRANTA_MIScriptingToolkit.ParameterReferencesAndValues) -object. - -* **Parameters:** - * **hasTrailingZeroInfo** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **trailingZeroInfo** ([`TrailingZeroInformation`](#module-GRANTA_MIScriptingToolkit.TrailingZeroInformation)) - * **value** ([*float*](https://docs.python.org/3/library/functions.html#float)) - * **valueParameters** ([`ParameterReferencesAndValues`](#module-GRANTA_MIScriptingToolkit.ParameterReferencesAndValues)) - - - -#### *property* hasTrailingZeroInfo - -Property hasTrailingZeroInfo is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* trailingZeroInfo - -Property trailingZeroInfo is of type [`TrailingZeroInformation`](#module-GRANTA_MIScriptingToolkit.TrailingZeroInformation). - -* **Return type:** - [`TrailingZeroInformation`](#module-GRANTA_MIScriptingToolkit.TrailingZeroInformation) - - - -#### *property* value - -Property value is of type float. - -* **Return type:** - [float](https://docs.python.org/3/library/functions.html#float) - - - -#### *property* valueParameters - -Property valueParameters is of type [`ParameterReferencesAndValues`](#module-GRANTA_MIScriptingToolkit.ParameterReferencesAndValues). - -* **Return type:** - [`ParameterReferencesAndValues`](#module-GRANTA_MIScriptingToolkit.ParameterReferencesAndValues) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### RangeDataType - - - -### *class* RangeDataType(hasHigh=None, hasHighTrailingZeroInfo=None, hasLow=None, hasLowTrailingZeroInfo=None, high=None, highValueTrailingZeroInfo=None, isApplicable=None, isEstimated=None, low=None, lowValueTrailingZeroInfo=None, unitSymbol=None, highValueIsInclusive=None, lowValueIsInclusive=None, \_isOwner=True) - -Bases: [`IDataValue`](#GRANTA_MIScriptingToolkit.IDataValue.IDataValue) - -Type for values of range data. -Both LowValue and HighValue must be populated. - -* **Parameters:** - * **hasHigh** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **hasHighTrailingZeroInfo** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **hasLow** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **hasLowTrailingZeroInfo** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **high** ([*float*](https://docs.python.org/3/library/functions.html#float)) - * **highValueTrailingZeroInfo** ([`TrailingZeroInformation`](#module-GRANTA_MIScriptingToolkit.TrailingZeroInformation)) - * **isApplicable** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **isEstimated** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **low** ([*float*](https://docs.python.org/3/library/functions.html#float)) - * **lowValueTrailingZeroInfo** ([`TrailingZeroInformation`](#module-GRANTA_MIScriptingToolkit.TrailingZeroInformation)) - * **unitSymbol** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **highValueIsInclusive** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **lowValueIsInclusive** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - - - -#### *property* hasHigh - -Property hasHigh is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* hasHighTrailingZeroInfo - -Property hasHighTrailingZeroInfo is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* hasLow - -Property hasLow is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* hasLowTrailingZeroInfo - -Property hasLowTrailingZeroInfo is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* high - -Property high is of type float. - -* **Return type:** - [float](https://docs.python.org/3/library/functions.html#float) - - - -#### *property* highValueIsInclusive - -Property highValueIsInclusive is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* highValueTrailingZeroInfo - -Property highValueTrailingZeroInfo is of type [`TrailingZeroInformation`](#module-GRANTA_MIScriptingToolkit.TrailingZeroInformation). - -* **Return type:** - [`TrailingZeroInformation`](#module-GRANTA_MIScriptingToolkit.TrailingZeroInformation) - - - -#### *property* isApplicable - -Property isApplicable is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* isEstimated - -Property isEstimated is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* low - -Property low is of type float. - -* **Return type:** - [float](https://docs.python.org/3/library/functions.html#float) - - - -#### *property* lowValueIsInclusive - -Property lowValueIsInclusive is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* lowValueTrailingZeroInfo - -Property lowValueTrailingZeroInfo is of type [`TrailingZeroInformation`](#module-GRANTA_MIScriptingToolkit.TrailingZeroInformation). - -* **Return type:** - [`TrailingZeroInformation`](#module-GRANTA_MIScriptingToolkit.TrailingZeroInformation) - - - -#### *property* unitSymbol - -Property unitSymbol is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### RasterSize - - - -### *class* RasterSize(heightPixels=None, widthPixels=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Gives the size in pixels of picture data. - -* **Parameters:** - * **heightPixels** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **widthPixels** ([*int*](https://docs.python.org/3/library/functions.html#int)) - - - -#### *property* heightPixels - -Property heightPixels is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* widthPixels - -Property widthPixels is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### RecordAttribute - - - -### *class* RecordAttribute(attribute=None, dataCreatedRecordVersion=None, dataRetiredRecordVersion=None, dataRevisionInfo=None, dataVersionNumber=None, hasData=None, parameterDetails=None, recordReference=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Meta-information about the data of a particular attribute of a particular Record in a Granta MI -database. -Does NOT include values of the data (see [`AttributeValue`](#module-GRANTA_MIScriptingToolkit.AttributeValue) type). - -* **Parameters:** - * **attribute** ([`NamedAttribute`](#module-GRANTA_MIScriptingToolkit.NamedAttribute)) - * **dataCreatedRecordVersion** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **dataRetiredRecordVersion** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **dataRevisionInfo** ([`RevisionInfo`](#module-GRANTA_MIScriptingToolkit.RevisionInfo)) - * **dataVersionNumber** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **hasData** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **parameterDetails** (list of [`ParameterDetail`](#module-GRANTA_MIScriptingToolkit.ParameterDetail)) - * **recordReference** ([`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference)) - - - -#### *property* attribute - -Property attribute is of type [`NamedAttribute`](#module-GRANTA_MIScriptingToolkit.NamedAttribute). - -* **Return type:** - [`NamedAttribute`](#module-GRANTA_MIScriptingToolkit.NamedAttribute) - - - -#### *property* dataCreatedRecordVersion - -Property dataCreatedRecordVersion is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* dataRetiredRecordVersion - -Property dataRetiredRecordVersion is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* dataRevisionInfo - -Property dataRevisionInfo is of type [`RevisionInfo`](#module-GRANTA_MIScriptingToolkit.RevisionInfo). - -* **Return type:** - [`RevisionInfo`](#module-GRANTA_MIScriptingToolkit.RevisionInfo) - - - -#### *property* dataVersionNumber - -Property dataVersionNumber is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* hasData - -Property hasData is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* parameterDetails - -Property parameterDetails is a list of [`ParameterDetail`](#module-GRANTA_MIScriptingToolkit.ParameterDetail) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`ParameterDetail`](#module-GRANTA_MIScriptingToolkit.ParameterDetail) - - - -#### *property* recordReference - -Property recordReference is of type [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference). - -* **Return type:** - [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### RecordData - - - -### *class* RecordData(attributeValues=None, recordReference=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -The values of data for attribute(s) of a particular record. - -* **Parameters:** - * **attributeValues** (list of [`AttributeValue`](#module-GRANTA_MIScriptingToolkit.AttributeValue)) - * **recordReference** ([`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference)) - - - -#### *property* attributeValues - -Property attributeValues is a list of [`AttributeValue`](#module-GRANTA_MIScriptingToolkit.AttributeValue) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`AttributeValue`](#module-GRANTA_MIScriptingToolkit.AttributeValue) - - - -#### *property* recordReference - -Property recordReference is of type [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference). - -* **Return type:** - [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### RecordExporterParameters - - - -### *class* RecordExporterParameters(attributes=None, record=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -A type to contain a record and its associated attribute exporter parameters. - -* **Parameters:** - * **attributes** (list of [`AttributeExporterParameters`](#module-GRANTA_MIScriptingToolkit.AttributeExporterParameters)) - * **record** ([`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference)) - - - -#### *property* attributes - -Property attributes is a list of [`AttributeExporterParameters`](#module-GRANTA_MIScriptingToolkit.AttributeExporterParameters) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`AttributeExporterParameters`](#module-GRANTA_MIScriptingToolkit.AttributeExporterParameters) - - - -#### *property* record - -Property record is of type [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference). - -* **Return type:** - [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### RecordFilter - - - -### *class* RecordFilter(profile=None, subsets=None, recordLists=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -A type allowing lists of Records to be filtered, e.g., by membership of Subset(s). You should -specify either a profile or a subset reference, but not both. You can pass in a list containing an -uninitialized [`SubsetReference`](#module-GRANTA_MIScriptingToolkit.SubsetReference) to effectively disable the subset -filter. Note that subsets are not inherited; newly-created records will not be filtered until they -are added to a Subset. - -* **Parameters:** - * **profile** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **subsets** (list of [`SubsetReference`](#module-GRANTA_MIScriptingToolkit.SubsetReference)) - * **recordLists** (list of [`RecordListReference`](#module-GRANTA_MIScriptingToolkit.RecordListReference)) - - - -#### *property* recordLists - -Property recordLists is a list of [`RecordListReference`](#module-GRANTA_MIScriptingToolkit.RecordListReference) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`RecordListReference`](#module-GRANTA_MIScriptingToolkit.RecordListReference) - - - -#### *property* subsets - -Property subsets is a list of [`SubsetReference`](#module-GRANTA_MIScriptingToolkit.SubsetReference) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`SubsetReference`](#module-GRANTA_MIScriptingToolkit.SubsetReference) - - - -#### *property* profile - -Property profile is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### AddRecordList(\_recordListReference) - -Appends \_recordListReference to recordLists property on RecordFilter C-object. - -* **Parameters:** - **\_recordListReference** ([`RecordListReference`](#module-GRANTA_MIScriptingToolkit.RecordListReference)) - - - -#### AddSubset(\_subsetReference) - -Appends \_subsetReference to subsets property on RecordFilter C-object. - -* **Parameters:** - **\_subsetReference** ([`SubsetReference`](#module-GRANTA_MIScriptingToolkit.SubsetReference)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### RecordFolderPath - - - -### *class* RecordFolderPath(color=None, recordReference=None, treeNames=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -The path to a Granta MI record folder. Contains the record folder at which the path starts as -parent, the tree names, and the color. - -* **Parameters:** - * **color** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **recordReference** ([`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference)) - * **treeNames** ([*list*](https://docs.python.org/3/library/stdtypes.html#list) *of* [*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* treeNames - -Property treeNames is a list of str objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - [list](https://docs.python.org/3/library/stdtypes.html#list) of [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* color - -Property color is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* recordReference - -Property recordReference is of type [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference). - -* **Return type:** - [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) - - - -#### AddTreeName(value) - -Appends value to treeNames property on RecordFolderPath C-object. - -* **Parameters:** - **value** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### RecordLinkChanges - - - -### *class* RecordLinkChanges(linked=None, unlinked=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -A set of changes to be made to record link groups. - -* **Parameters:** - * **linked** (list of [`NamedTargetedSourceRecord`](#module-GRANTA_MIScriptingToolkit.NamedTargetedSourceRecord)) - * **unlinked** (list of [`NamedTargetedSourceRecord`](#module-GRANTA_MIScriptingToolkit.NamedTargetedSourceRecord)) - - - -#### *property* linked - -Property linked is a list of [`NamedTargetedSourceRecord`](#module-GRANTA_MIScriptingToolkit.NamedTargetedSourceRecord) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`NamedTargetedSourceRecord`](#module-GRANTA_MIScriptingToolkit.NamedTargetedSourceRecord) - - - -#### *property* unlinked - -Property unlinked is a list of [`NamedTargetedSourceRecord`](#module-GRANTA_MIScriptingToolkit.NamedTargetedSourceRecord) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`NamedTargetedSourceRecord`](#module-GRANTA_MIScriptingToolkit.NamedTargetedSourceRecord) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### RecordLinkGroup - - - -### *class* RecordLinkGroup(linkedRecords=None, name=None, standardNames=None, tableFilters=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -A type representing a group of linked records. - -* **Parameters:** - * **linkedRecords** (list of [`NamedRecord`](#module-GRANTA_MIScriptingToolkit.NamedRecord)) - * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **standardNames** ([*list*](https://docs.python.org/3/library/stdtypes.html#list) *of* [*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **tableFilters** ([*list*](https://docs.python.org/3/library/stdtypes.html#list) *of* [*int*](https://docs.python.org/3/library/functions.html#int)) - - - -#### *property* linkedRecords - -Property linkedRecords is a list of [`NamedRecord`](#module-GRANTA_MIScriptingToolkit.NamedRecord) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`NamedRecord`](#module-GRANTA_MIScriptingToolkit.NamedRecord) - - - -#### *property* name - -Property name is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* standardNames - -Property standardNames is a list of str objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - [list](https://docs.python.org/3/library/stdtypes.html#list) of [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* tableFilters - -Property tableFilters is a list of int objects. See [`GRANTA_Constants`](#module-GRANTA_MIScriptingToolkit.GRANTA_Constants) for supported values. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - [list](https://docs.python.org/3/library/stdtypes.html#list) of [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### RecordLinkGroupDetail - - - -### *class* RecordLinkGroupDetail(fromTable=None, linkGroupType=None, name=None, reference=None, reverseName=None, reverseReference=None, standardNames=None, toTable=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Detailed information about a Record Link Group in a Granta MI Database. - -* **Parameters:** - * **fromTable** ([`TableReference`](#module-GRANTA_MIScriptingToolkit.TableReference)) - * **linkGroupType** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **reference** ([`RecordLinkGroupReference`](#module-GRANTA_MIScriptingToolkit.RecordLinkGroupReference)) - * **reverseName** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **reverseReference** ([`RecordLinkGroupReference`](#module-GRANTA_MIScriptingToolkit.RecordLinkGroupReference)) - * **standardNames** ([*list*](https://docs.python.org/3/library/stdtypes.html#list) *of* [*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **toTable** ([`TableReference`](#module-GRANTA_MIScriptingToolkit.TableReference)) - - - -#### *property* standardNames - -Property standardNames is a list of str objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - [list](https://docs.python.org/3/library/stdtypes.html#list) of [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* fromTable - -Property fromTable is of type [`TableReference`](#module-GRANTA_MIScriptingToolkit.TableReference). - -* **Return type:** - [`TableReference`](#module-GRANTA_MIScriptingToolkit.TableReference) - - - -#### *property* linkGroupType - -Property linkGroupType is of type str. See [`GRANTA_Constants`](#module-GRANTA_MIScriptingToolkit.GRANTA_Constants) for supported values. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* name - -Property name is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* reference - -Property reference is of type [`RecordLinkGroupReference`](#module-GRANTA_MIScriptingToolkit.RecordLinkGroupReference). - -* **Return type:** - [`RecordLinkGroupReference`](#module-GRANTA_MIScriptingToolkit.RecordLinkGroupReference) - - - -#### *property* reverseName - -Property reverseName is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* reverseReference - -Property reverseReference is of type [`RecordLinkGroupReference`](#module-GRANTA_MIScriptingToolkit.RecordLinkGroupReference). - -* **Return type:** - [`RecordLinkGroupReference`](#module-GRANTA_MIScriptingToolkit.RecordLinkGroupReference) - - - -#### *property* toTable - -Property toTable is of type [`TableReference`](#module-GRANTA_MIScriptingToolkit.TableReference). - -* **Return type:** - [`TableReference`](#module-GRANTA_MIScriptingToolkit.TableReference) - - - -#### AddStandardName(value) - -Appends value to standardNames property on RecordLinkGroupDetail C-object. - -* **Parameters:** - **value** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### RecordLinkGroupReference - - - -### *class* RecordLinkGroupReference(DBKey=None, isStandardName=None, name=None, partialTableReference=None, recordLinkGroupIdentity=None, recordLinkGroupType=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -A type that allows identification of a particular record link group in a Granta MI database. -This may be done by specifying the identity of the group, or its name and a partial table reference. - -* **Parameters:** - * **DBKey** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **isStandardName** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **partialTableReference** ([`PartialTableReference`](#module-GRANTA_MIScriptingToolkit.PartialTableReference)) - * **recordLinkGroupIdentity** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **recordLinkGroupType** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* DBKey - -Property DBKey is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* isStandardName - -Property isStandardName is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* name - -Property name is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* partialTableReference - -Property partialTableReference is of type [`PartialTableReference`](#module-GRANTA_MIScriptingToolkit.PartialTableReference). - -* **Return type:** - [`PartialTableReference`](#module-GRANTA_MIScriptingToolkit.PartialTableReference) - - - -#### *property* recordLinkGroupIdentity - -Property recordLinkGroupIdentity is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* recordLinkGroupType - -Property recordLinkGroupType is of type str. See [`GRANTA_Constants`](#module-GRANTA_MIScriptingToolkit.GRANTA_Constants) for supported values. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### RecordLinkModifications - - - -### *class* RecordLinkModifications(linkAllCombinations=None, linkRecords=None, unlinkAllRecords=None, unlinkRecords=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -A set of modifications to be made to record link groups. - -* **Parameters:** - * **linkAllCombinations** (list of [`LinkAllCombinations`](#module-GRANTA_MIScriptingToolkit.LinkAllCombinations)) - * **linkRecords** (list of [`LinkRecords`](#module-GRANTA_MIScriptingToolkit.LinkRecords)) - * **unlinkAllRecords** (list of [`UnlinkAllRecords`](#module-GRANTA_MIScriptingToolkit.UnlinkAllRecords)) - * **unlinkRecords** (list of [`UnlinkRecords`](#module-GRANTA_MIScriptingToolkit.UnlinkRecords)) - - - -#### *property* linkAllCombinations - -Property linkAllCombinations is a list of [`LinkAllCombinations`](#module-GRANTA_MIScriptingToolkit.LinkAllCombinations) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`LinkAllCombinations`](#module-GRANTA_MIScriptingToolkit.LinkAllCombinations) - - - -#### *property* linkRecords - -Property linkRecords is a list of [`LinkRecords`](#module-GRANTA_MIScriptingToolkit.LinkRecords) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`LinkRecords`](#module-GRANTA_MIScriptingToolkit.LinkRecords) - - - -#### *property* unlinkAllRecords - -Property unlinkAllRecords is a list of [`UnlinkAllRecords`](#module-GRANTA_MIScriptingToolkit.UnlinkAllRecords) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`UnlinkAllRecords`](#module-GRANTA_MIScriptingToolkit.UnlinkAllRecords) - - - -#### *property* unlinkRecords - -Property unlinkRecords is a list of [`UnlinkRecords`](#module-GRANTA_MIScriptingToolkit.UnlinkRecords) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`UnlinkRecords`](#module-GRANTA_MIScriptingToolkit.UnlinkRecords) - - - -#### AddLinkAllCombinations(\_linkAllCombinations) - -Appends \_linkAllCombinations to linkAllCombinations property on RecordLinkModifications C-object. - -* **Parameters:** - **\_linkAllCombinations** ([`LinkAllCombinations`](#module-GRANTA_MIScriptingToolkit.LinkAllCombinations)) - - - -#### AddLinkRecords(\_linkRecords) - -Appends \_linkRecords to linkRecords property on RecordLinkModifications C-object. - -* **Parameters:** - **\_linkRecords** ([`LinkRecords`](#module-GRANTA_MIScriptingToolkit.LinkRecords)) - - - -#### AddUnlinkAllRecords(\_unlinkAllRecords) - -Appends \_unlinkAllRecords to unlinkAllRecords property on RecordLinkModifications C-object. - -* **Parameters:** - **\_unlinkAllRecords** ([`UnlinkAllRecords`](#module-GRANTA_MIScriptingToolkit.UnlinkAllRecords)) - - - -#### AddUnlinkRecords(\_unlinkRecords) - -Appends \_unlinkRecords to unlinkRecords property on RecordLinkModifications C-object. - -* **Parameters:** - **\_unlinkRecords** ([`UnlinkRecords`](#module-GRANTA_MIScriptingToolkit.UnlinkRecords)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### RecordListReference - - - -### *class* RecordListReference(GUID=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -A unique identifier for a record list. - -* **Parameters:** - **GUID** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* GUID - -Property GUID is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - -### RecordManipulatorService - - - - - -### *class* RecordManipulatorService(mi_session, retries=0) - -Bases: [`Service`](#GRANTA_MIScriptingToolkit.Service.Service) - -The Record Manipulator service provides a way to move a record whilst preserving its metadata and attribute values. - - - -#### MoveRecord(\_req) - -Reparents a record. Metadata such as creation date will be preserved, along with attribute values. - -* **Parameters:** - **\_req** ([`RecordMoveRequest`](#module-GRANTA_MIScriptingToolkit.RecordMoveRequest) object) -* **Return type:** - [`EmptyRestResponse`](#module-GRANTA_MIScriptingToolkit.EmptyRestResponse) object - - - - - -### RecordMoveRequest - - - -### *class* RecordMoveRequest(DBKey=None, newParentRecordHistoryGuid=None, recordHistoryGuid=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -The details of a MoveRecord operation. -The record to be moved and the new location are both specified with Record History GUIDs. - -* **Parameters:** - * **DBKey** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **newParentRecordHistoryGuid** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **recordHistoryGuid** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* DBKey - -Property DBKey is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* newParentRecordHistoryGuid - -Property newParentRecordHistoryGuid is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* recordHistoryGuid - -Property recordHistoryGuid is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### RecordNameSearchRequest - - - -### *class* RecordNameSearchRequest(caseSensitiveNames=None, filter=None, populateGUIDs=None, recordName=None, searchFullNames=None, searchShortNames=None, table=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -The input for the RecordNameSearch operation. Both the table and recordName are required. - -* **Parameters:** - * **caseSensitiveNames** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **filter** ([`RecordFilter`](#module-GRANTA_MIScriptingToolkit.RecordFilter)) - * **populateGUIDs** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **recordName** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **searchFullNames** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **searchShortNames** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **table** ([`TableReference`](#module-GRANTA_MIScriptingToolkit.TableReference)) - - - -#### *property* caseSensitiveNames - -Property caseSensitiveNames is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* filter - -Property filter is of type [`RecordFilter`](#module-GRANTA_MIScriptingToolkit.RecordFilter). - -* **Return type:** - [`RecordFilter`](#module-GRANTA_MIScriptingToolkit.RecordFilter) - - - -#### *property* populateGUIDs - -Property populateGUIDs is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* recordName - -Property recordName is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* searchFullNames - -Property searchFullNames is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* searchShortNames - -Property searchShortNames is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* table - -Property table is of type [`TableReference`](#module-GRANTA_MIScriptingToolkit.TableReference). - -* **Return type:** - [`TableReference`](#module-GRANTA_MIScriptingToolkit.TableReference) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### RecordReference - - - -### *class* RecordReference(DBKey=None, historyGUID=None, identity=None, lookupValue=None, recordGUID=None, version=None, recordUID=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -A type that allows identification of a particular record in a Granta MI database. -This is done directly by specifying the Identity or GUID of the record. - -* **Parameters:** - * **DBKey** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **historyGUID** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **identity** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **lookupValue** ([`LookupValue`](#module-GRANTA_MIScriptingToolkit.LookupValue)) - * **recordGUID** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **version** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **recordUID** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* DBKey - -Property DBKey is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* historyGUID - -Property historyGUID is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* identity - -Property identity is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* lookupValue - -Property lookupValue is of type [`LookupValue`](#module-GRANTA_MIScriptingToolkit.LookupValue). - -* **Return type:** - [`LookupValue`](#module-GRANTA_MIScriptingToolkit.LookupValue) - - - -#### *property* recordGUID - -Property recordGUID is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* recordUID - -Property recordUID is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* version - -Property version is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### RecordSearchCriterion - - - -### *class* RecordSearchCriterion(betweenDateTimesSearchValue=None, betweenSearchValue=None, containsAllSearchValue=None, containsAnySearchValue=None, containsSearchValue=None, doesNotContainSearchValue=None, doesNotExistSearchValue=None, exactlySearchValue=None, existsSearchValue=None, greaterThanSearchValue=None, lessThanSearchValue=None, searchAttribute=None, type=None, equalToSearchValue=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -One criterion that controls results returned from a search. -A search comprises one or more such criteria. - -* **Parameters:** - * **betweenDateTimesSearchValue** ([`BetweenDateTimesSearchValue`](#module-GRANTA_MIScriptingToolkit.BetweenDateTimesSearchValue)) - * **betweenSearchValue** ([`BetweenSearchValue`](#module-GRANTA_MIScriptingToolkit.BetweenSearchValue)) - * **containsAllSearchValue** ([`ContainsAllSearchValue`](#module-GRANTA_MIScriptingToolkit.ContainsAllSearchValue)) - * **containsAnySearchValue** ([`ContainsAnySearchValue`](#module-GRANTA_MIScriptingToolkit.ContainsAnySearchValue)) - * **containsSearchValue** ([`ContainsSearchValue`](#module-GRANTA_MIScriptingToolkit.ContainsSearchValue)) - * **doesNotContainSearchValue** ([`DoesNotContainSearchValue`](#module-GRANTA_MIScriptingToolkit.DoesNotContainSearchValue)) - * **doesNotExistSearchValue** ([`DoesNotExistSearchValue`](#module-GRANTA_MIScriptingToolkit.DoesNotExistSearchValue)) - * **exactlySearchValue** ([`ExactlySearchValue`](#module-GRANTA_MIScriptingToolkit.ExactlySearchValue)) - * **existsSearchValue** ([`ExistsSearchValue`](#module-GRANTA_MIScriptingToolkit.ExistsSearchValue)) - * **greaterThanSearchValue** ([`GreaterThanSearchValue`](#module-GRANTA_MIScriptingToolkit.GreaterThanSearchValue)) - * **lessThanSearchValue** ([`LessThanSearchValue`](#module-GRANTA_MIScriptingToolkit.LessThanSearchValue)) - * **searchAttribute** ([`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference)) - * **type** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **equalToSearchValue** ([`EqualToSearchValue`](#module-GRANTA_MIScriptingToolkit.EqualToSearchValue)) - - - -#### *property* betweenDateTimesSearchValue - -Property betweenDateTimesSearchValue is of type [`BetweenDateTimesSearchValue`](#module-GRANTA_MIScriptingToolkit.BetweenDateTimesSearchValue). - -* **Return type:** - [`BetweenDateTimesSearchValue`](#module-GRANTA_MIScriptingToolkit.BetweenDateTimesSearchValue) - - - -#### *property* betweenSearchValue - -Property betweenSearchValue is of type [`BetweenSearchValue`](#module-GRANTA_MIScriptingToolkit.BetweenSearchValue). - -* **Return type:** - [`BetweenSearchValue`](#module-GRANTA_MIScriptingToolkit.BetweenSearchValue) - - - -#### *property* containsAllSearchValue - -Property containsAllSearchValue is of type [`ContainsAllSearchValue`](#module-GRANTA_MIScriptingToolkit.ContainsAllSearchValue). - -* **Return type:** - [`ContainsAllSearchValue`](#module-GRANTA_MIScriptingToolkit.ContainsAllSearchValue) - - - -#### *property* containsAnySearchValue - -Property containsAnySearchValue is of type [`ContainsAnySearchValue`](#module-GRANTA_MIScriptingToolkit.ContainsAnySearchValue). - -* **Return type:** - [`ContainsAnySearchValue`](#module-GRANTA_MIScriptingToolkit.ContainsAnySearchValue) - - - -#### *property* containsSearchValue - -Property containsSearchValue is of type [`ContainsSearchValue`](#module-GRANTA_MIScriptingToolkit.ContainsSearchValue). - -* **Return type:** - [`ContainsSearchValue`](#module-GRANTA_MIScriptingToolkit.ContainsSearchValue) - - - -#### *property* doesNotContainSearchValue - -Property doesNotContainSearchValue is of type [`DoesNotContainSearchValue`](#module-GRANTA_MIScriptingToolkit.DoesNotContainSearchValue). - -* **Return type:** - [`DoesNotContainSearchValue`](#module-GRANTA_MIScriptingToolkit.DoesNotContainSearchValue) - - - -#### *property* doesNotExistSearchValue - -Property doesNotExistSearchValue is of type [`DoesNotExistSearchValue`](#module-GRANTA_MIScriptingToolkit.DoesNotExistSearchValue). - -* **Return type:** - [`DoesNotExistSearchValue`](#module-GRANTA_MIScriptingToolkit.DoesNotExistSearchValue) - - - -#### *property* equalToSearchValue - -Property equalToSearchValue is of type [`EqualToSearchValue`](#module-GRANTA_MIScriptingToolkit.EqualToSearchValue). - -* **Return type:** - [`EqualToSearchValue`](#module-GRANTA_MIScriptingToolkit.EqualToSearchValue) - - - -#### *property* exactlySearchValue - -Property exactlySearchValue is of type [`ExactlySearchValue`](#module-GRANTA_MIScriptingToolkit.ExactlySearchValue). - -* **Return type:** - [`ExactlySearchValue`](#module-GRANTA_MIScriptingToolkit.ExactlySearchValue) - - - -#### *property* existsSearchValue - -Property existsSearchValue is of type [`ExistsSearchValue`](#module-GRANTA_MIScriptingToolkit.ExistsSearchValue). - -* **Return type:** - [`ExistsSearchValue`](#module-GRANTA_MIScriptingToolkit.ExistsSearchValue) - - - -#### *property* greaterThanSearchValue - -Property greaterThanSearchValue is of type [`GreaterThanSearchValue`](#module-GRANTA_MIScriptingToolkit.GreaterThanSearchValue). - -* **Return type:** - [`GreaterThanSearchValue`](#module-GRANTA_MIScriptingToolkit.GreaterThanSearchValue) - - - -#### *property* lessThanSearchValue - -Property lessThanSearchValue is of type [`LessThanSearchValue`](#module-GRANTA_MIScriptingToolkit.LessThanSearchValue). - -* **Return type:** - [`LessThanSearchValue`](#module-GRANTA_MIScriptingToolkit.LessThanSearchValue) - - - -#### *property* searchAttribute - -Property searchAttribute is of type [`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference). - -* **Return type:** - [`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference) - - - -#### *property* type - -Property type is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### RecordVersionState - - - -### *class* RecordVersionState(recordReference=None, versionState=None, hasReleasedRevision=None, hasSupersededRevision=None, hasWithdrawnRevision=None, createdRevision=None, modifiedRevision=None, releasedRevision=None, supersededRevision=None, withdrawnRevision=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -The version status of a particular Record in a Granta MI database. - -* **Parameters:** - * **recordReference** ([`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference)) - * **versionState** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **hasReleasedRevision** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **hasSupersededRevision** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **hasWithdrawnRevision** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **createdRevision** ([`DatabaseRevision`](#module-GRANTA_MIScriptingToolkit.DatabaseRevision)) - * **modifiedRevision** ([`DatabaseRevision`](#module-GRANTA_MIScriptingToolkit.DatabaseRevision)) - * **releasedRevision** ([`DatabaseRevision`](#module-GRANTA_MIScriptingToolkit.DatabaseRevision)) - * **supersededRevision** ([`DatabaseRevision`](#module-GRANTA_MIScriptingToolkit.DatabaseRevision)) - * **withdrawnRevision** ([`DatabaseRevision`](#module-GRANTA_MIScriptingToolkit.DatabaseRevision)) - - - -#### *class* VersionState - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - - - -#### Released *= 0* - - - -#### Superseded *= 1* - - - -#### Withdrawn *= 2* - - - -#### Unreleased *= 3* - - - -#### Unversioned *= 4* - - - -#### Unknown *= 5* - - - -#### *property* createdRevision - -Property createdRevision is of type [`DatabaseRevision`](#module-GRANTA_MIScriptingToolkit.DatabaseRevision). - -* **Return type:** - [`DatabaseRevision`](#module-GRANTA_MIScriptingToolkit.DatabaseRevision) - - - -#### *property* hasReleasedRevision - -Property hasReleasedRevision is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* hasSupersededRevision - -Property hasSupersededRevision is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* hasWithdrawnRevision - -Property hasWithdrawnRevision is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* modifiedRevision - -Property modifiedRevision is of type [`DatabaseRevision`](#module-GRANTA_MIScriptingToolkit.DatabaseRevision). - -* **Return type:** - [`DatabaseRevision`](#module-GRANTA_MIScriptingToolkit.DatabaseRevision) - - - -#### *property* recordReference - -Property recordReference is of type [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference). - -* **Return type:** - [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) - - - -#### *property* releasedRevision - -Property releasedRevision is of type [`DatabaseRevision`](#module-GRANTA_MIScriptingToolkit.DatabaseRevision). - -* **Return type:** - [`DatabaseRevision`](#module-GRANTA_MIScriptingToolkit.DatabaseRevision) - - - -#### *property* supersededRevision - -Property supersededRevision is of type [`DatabaseRevision`](#module-GRANTA_MIScriptingToolkit.DatabaseRevision). - -* **Return type:** - [`DatabaseRevision`](#module-GRANTA_MIScriptingToolkit.DatabaseRevision) - - - -#### *property* versionState - -Property versionState is of type int. See [`RecordVersionState.VersionState`](#GRANTA_MIScriptingToolkit.RecordVersionState.RecordVersionState.VersionState) for supported values. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* withdrawnRevision - -Property withdrawnRevision is of type [`DatabaseRevision`](#module-GRANTA_MIScriptingToolkit.DatabaseRevision). - -* **Return type:** - [`DatabaseRevision`](#module-GRANTA_MIScriptingToolkit.DatabaseRevision) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### RecordWithAttributeAddresses - - - -### *class* RecordWithAttributeAddresses(attributeAddresses=None, recordReference=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -A [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) with a list of attributes and their upload URL -addresses. - -* **Parameters:** - * **attributeAddresses** (list of [`AttributeAddress`](#module-GRANTA_MIScriptingToolkit.AttributeAddress)) - * **recordReference** ([`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference)) - - - -#### *property* attributeAddresses - -Property attributeAddresses is a list of [`AttributeAddress`](#module-GRANTA_MIScriptingToolkit.AttributeAddress) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`AttributeAddress`](#module-GRANTA_MIScriptingToolkit.AttributeAddress) - - - -#### *property* recordReference - -Property recordReference is of type [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference). - -* **Return type:** - [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) - - - -#### AddAttributeAddress(\_attributeAddress) - -Appends \_attributeAddress to attributeAddresses property on RecordWithAttributeAddresses C-object. - -* **Parameters:** - **\_attributeAddress** ([`AttributeAddress`](#module-GRANTA_MIScriptingToolkit.AttributeAddress)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### ResolveReferencesRequest - - - -### *class* ResolveReferencesRequest(entities=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Input for the ResolveReferences operation. - -* **Parameters:** - **entities** (list of [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference)) - - - -#### *property* entities - -Property entities is a list of [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) - - - -#### AddEntitie(\_recordReference) - -Appends \_recordReference to entities property on ResolveReferencesRequest C-object. - -* **Parameters:** - **\_recordReference** ([`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### ResolveReferencesResponse - - - -### *class* ResolveReferencesResponse(c_obj) - -Bases: [`Response`](#GRANTA_MIScriptingToolkit.Response.Response) - -Output from the ResolveReferences operation. - -* **Parameters:** - **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a ResolveReferencesResponse object. - - - -#### *property* entityResolutions - -Property entityResolutions is a list of [`MIEntityResolution`](#module-GRANTA_MIScriptingToolkit.MIEntityResolution) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`MIEntityResolution`](#module-GRANTA_MIScriptingToolkit.MIEntityResolution) - - - - - -### Response - - - -### *class* Response(c_obj) - -Bases: [`ABC`](https://docs.python.org/3/library/abc.html#abc.ABC) - -Base class for response types in Granta MI. - -* **Parameters:** - **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a response object. - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - -#### *property* serviceLayerResponse - -The raw response object received from the Granta MI Service Layer. - -* **Return type:** - [`ServiceLayerResponse`](#GRANTA_MIScriptingToolkit.ServiceLayerResponse.ServiceLayerResponse) - - - - - -### RevisionInfo - - - -### *class* RevisionInfo(created=None, modified=None, updateCount=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Describes when an entity in a Granta MI database was created and updated. - -* **Parameters:** - * **created** ([`DatabaseRevision`](#module-GRANTA_MIScriptingToolkit.DatabaseRevision)) - * **modified** ([`DatabaseRevision`](#module-GRANTA_MIScriptingToolkit.DatabaseRevision)) - * **updateCount** ([*int*](https://docs.python.org/3/library/functions.html#int)) - - - -#### *property* created - -Property created is of type [`DatabaseRevision`](#module-GRANTA_MIScriptingToolkit.DatabaseRevision). - -* **Return type:** - [`DatabaseRevision`](#module-GRANTA_MIScriptingToolkit.DatabaseRevision) - - - -#### *property* modified - -Property modified is of type [`DatabaseRevision`](#module-GRANTA_MIScriptingToolkit.DatabaseRevision). - -* **Return type:** - [`DatabaseRevision`](#module-GRANTA_MIScriptingToolkit.DatabaseRevision) - - - -#### *property* updateCount - -Property updateCount is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### RichText - - - -### *class* RichText(type=None, value=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Contains a piece of text and its type. - -* **Parameters:** - * **type** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **value** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *class* Type - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - - - -#### Plain *= 0* - - - -#### Markdown *= 1* - - - -#### *property* type - -Property type is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* value - -Property value is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### SearchResult - - - -### *class* SearchResult(longName=None, ranking=None, recordReference=None, shortName=None, color=None, recordType=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -An extension of [`NamedRecord`](#module-GRANTA_MIScriptingToolkit.NamedRecord) with a ranking. The higher the -ranking the better the match to your search criteria. - -* **Parameters:** - * **longName** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **ranking** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **recordReference** ([`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference)) - * **shortName** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **color** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **recordType** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* color - -Property color is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* longName - -Property longName is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* ranking - -Property ranking is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* recordReference - -Property recordReference is of type [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference). - -* **Return type:** - [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) - - - -#### *property* recordType - -Property recordType is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* shortName - -Property shortName is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - -### SearchService - - - - - -### *class* SearchService(mi_session, retries=0) - -Bases: [`Service`](#GRANTA_MIScriptingToolkit.Service.Service) - -The Search service finds Records, within Granta MI Databases, matching specified criteria. - - - -#### SimpleTextSearch(\_req) - -Searches for records matching simple text criteria. - -* **Parameters:** - **\_req** ([`SimpleTextSearch`](#module-GRANTA_MIScriptingToolkit.SimpleTextSearch) object) -* **Return type:** - [`SimpleTextSearchResponse`](#module-GRANTA_MIScriptingToolkit.SimpleTextSearchResponse) object - - - -#### CriteriaSearch(\_req) - -Searches for records matching attribute-based criteria. - -* **Parameters:** - **\_req** ([`CriteriaSearch`](#module-GRANTA_MIScriptingToolkit.CriteriaSearch) object) -* **Return type:** - [`SimpleTextSearchResponse`](#module-GRANTA_MIScriptingToolkit.SimpleTextSearchResponse) object - - - -#### RecordNameSearch(\_req) - -Searches for Records with a given exact Record name. - -* **Parameters:** - **\_req** ([`RecordNameSearchRequest`](#module-GRANTA_MIScriptingToolkit.RecordNameSearchRequest) object) -* **Return type:** - [`SimpleTextSearchResponse`](#module-GRANTA_MIScriptingToolkit.SimpleTextSearchResponse) object - - - - - -### Series - - - -### *class* Series(XYPoints=None, constraints=None, decoration=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Type for functional data which includes X-Y data and any constraints. - -* **Parameters:** - * **XYPoints** ([`XYData`](#module-GRANTA_MIScriptingToolkit.XYData)) - * **constraints** ([`Constraints`](#module-GRANTA_MIScriptingToolkit.Constraints)) - * **decoration** ([*int*](https://docs.python.org/3/library/functions.html#int)) - - - -#### *property* constraints - -Property constraints is of type [`Constraints`](#module-GRANTA_MIScriptingToolkit.Constraints). - -* **Return type:** - [`Constraints`](#module-GRANTA_MIScriptingToolkit.Constraints) - - - -#### *property* decoration - -Property decoration is of type int. See [`GRANTA_Constants`](#module-GRANTA_MIScriptingToolkit.GRANTA_Constants) for supported values. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* XYPoints - -Property XYPoints is of type [`XYData`](#module-GRANTA_MIScriptingToolkit.XYData). - -* **Return type:** - [`XYData`](#module-GRANTA_MIScriptingToolkit.XYData) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### Service - - - -### *class* Service(mi_session, retries=0) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Base class for Granta MI Service objects. For internal use only. - - - - - -### ServiceLayerResponse - - - -### *class* ServiceLayerResponse(errorMessage=None, requestMessage=None, responseCode=None, responseMessage=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -The HTTP response information from Granta MI Service Layer. Useful for debugging bad requests. - -* **Parameters:** - * **errorMessage** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **requestMessage** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **responseCode** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **responseMessage** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* errorMessage - -Property errorMessage is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* requestMessage - -Property requestMessage is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* responseCode - -Property responseCode is of type int. This is an HTTP status code. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* responseMessage - -Property responseMessage is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### SetRecordAttributesRequest - - - -### *class* SetRecordAttributesRequest(importErrorMode=None, importRecords=None, notes=None, releaseNotes=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -The input to a set record attributes operation. Includes an array of records to import. - -* **Parameters:** - * **importErrorMode** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **importRecords** (list of [`ImportRecord`](#module-GRANTA_MIScriptingToolkit.ImportRecord)) - * **notes** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **releaseNotes** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* importRecords - -Property importRecords is of type list of [`ImportRecord`](#module-GRANTA_MIScriptingToolkit.ImportRecord). - -* **Return type:** - list of [`ImportRecord`](#module-GRANTA_MIScriptingToolkit.ImportRecord) - - - -#### *property* notes - -Property notes is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* releaseNotes - -Property releaseNotes is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* importErrorMode - -Property importErrorMode is of type str. See [`GRANTA_Constants`](#module-GRANTA_MIScriptingToolkit.GRANTA_Constants) for supported values. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### AddImportRecord(\_importRecord) - -Appends \_importRecord to importRecords property on SetRecordAttributesRequest C-object. - -* **Parameters:** - **\_importRecord** ([`ImportRecord`](#module-GRANTA_MIScriptingToolkit.ImportRecord)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### SetRecordAttributesResponse - - - -### *class* SetRecordAttributesResponse(c_obj) - -Bases: [`Response`](#GRANTA_MIScriptingToolkit.Response.Response) - -Response for set record attributes operation. Includes an array of import records. - -* **Parameters:** - **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a SetRecordAttributesResponse object. - - - -#### *property* recordsImported - -Property recordsImported is a list of [`NamedRecord`](#module-GRANTA_MIScriptingToolkit.NamedRecord) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`NamedRecord`](#module-GRANTA_MIScriptingToolkit.NamedRecord) - - - - - -### ShortTextDataType - - - -### *class* ShortTextDataType(isApplicable=None, value=None, \_isOwner=True) - -Bases: [`IDataValue`](#GRANTA_MIScriptingToolkit.IDataValue.IDataValue) - -Type for values of short text (string) data. - -* **Parameters:** - * **isApplicable** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **value** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* isApplicable - -Property isApplicable is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* value - -Property value is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### SimpleTextSearch - - - -### *class* SimpleTextSearch(DBKey=None, populateGUIDs=None, recordFilter=None, restrictToTables=None, searchFilter=None, searchMode=None, searchValue=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -The input to a simple text search operation. -Both the DBKey, and search value are required. - -* **Parameters:** - * **DBKey** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **populateGUIDs** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **recordFilter** ([`RecordFilter`](#module-GRANTA_MIScriptingToolkit.RecordFilter)) - * **restrictToTables** (list of [`PartialTableReference`](#module-GRANTA_MIScriptingToolkit.PartialTableReference)) - * **searchFilter** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **searchMode** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **searchValue** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* restrictToTables - -Property restrictToTables is a list of [`PartialTableReference`](#module-GRANTA_MIScriptingToolkit.PartialTableReference) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`PartialTableReference`](#module-GRANTA_MIScriptingToolkit.PartialTableReference) - - - -#### *property* DBKey - -Property DBKey is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* populateGUIDs - -Property populateGUIDs is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* searchValue - -Property searchValue is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* recordFilter - -Property recordFilter is of type [`RecordFilter`](#module-GRANTA_MIScriptingToolkit.RecordFilter). - -* **Return type:** - [`RecordFilter`](#module-GRANTA_MIScriptingToolkit.RecordFilter) - - - -#### *property* searchFilter - -Property searchFilter is of type int. See [`GRANTA_Constants`](#module-GRANTA_MIScriptingToolkit.GRANTA_Constants) for supported values. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* searchMode - -Property searchMode is of type int. See [`GRANTA_Constants`](#module-GRANTA_MIScriptingToolkit.GRANTA_Constants) for supported values. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### AddRestrictToTable(\_partialTableReference) - -Appends \_partialTableReference to restrictToTables property on SimpleTextSearch C-object. - -* **Parameters:** - **\_partialTableReference** ([`PartialTableReference`](#module-GRANTA_MIScriptingToolkit.PartialTableReference)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### SimpleTextSearchResponse - - - -### *class* SimpleTextSearchResponse(c_obj) - -Bases: [`Response`](#GRANTA_MIScriptingToolkit.Response.Response) - -The output to the simple text search operation. -Contains a list of records returned by the search and a -[`ServiceLayerResponse`](#module-GRANTA_MIScriptingToolkit.ServiceLayerResponse) object. - -* **Parameters:** - **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a SimpleTextSearchResponse object. - - - -#### *property* searchResults - -Property searchResults is a list of [`SearchResult`](#module-GRANTA_MIScriptingToolkit.SearchResult) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`SearchResult`](#module-GRANTA_MIScriptingToolkit.SearchResult) - - - -#### AddSearchResult(\_searchResult) - -Appends \_searchResult to searchResults property on SimpleTextSearchResponse C-object. - -* **Parameters:** - **\_searchResult** ([`SearchResult`](#module-GRANTA_MIScriptingToolkit.SearchResult)) - - - - - -### SourceRecord - - - -### *class* SourceRecord(record=None, recordLinkGroups=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -A type that contains a record reference and associated record link groups. - -* **Parameters:** - * **record** ([`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference)) - * **recordLinkGroups** ([`LinkedRecordsDataType`](#module-GRANTA_MIScriptingToolkit.LinkedRecordsDataType)) - - - -#### *property* record - -Property record is of type [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference). - -* **Return type:** - [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) - - - -#### *property* recordLinkGroups - -Property recordLinkGroups is of type [`LinkedRecordsDataType`](#module-GRANTA_MIScriptingToolkit.LinkedRecordsDataType). - -* **Return type:** - [`LinkedRecordsDataType`](#module-GRANTA_MIScriptingToolkit.LinkedRecordsDataType) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### SourceUnitConversionSet - - - -### *class* SourceUnitConversionSet(conversions=None, sourceSymbol=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -All the unit conversions available for a specified unit. - -* **Parameters:** - * **conversions** (list of [`UnitConversionTarget`](#module-GRANTA_MIScriptingToolkit.UnitConversionTarget)) - * **sourceSymbol** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* conversions - -Property conversions is a list of [`UnitConversionTarget`](#module-GRANTA_MIScriptingToolkit.UnitConversionTarget) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`UnitConversionTarget`](#module-GRANTA_MIScriptingToolkit.UnitConversionTarget) - - - -#### *property* sourceSymbol - -Property sourceSymbol is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### SpecificUnitConversionContext - - - -### *class* SpecificUnitConversionContext(absoluteUnits=None, currency=None, unitSymbol=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Type defining how values with convertible units should be represented. - -* **Parameters:** - * **absoluteUnits** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **currency** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **unitSymbol** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* absoluteUnits - -Property absoluteUnits is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* currency - -Property currency is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* unitSymbol - -Property unitSymbol is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### SubsetDetail - - - -### *class* SubsetDetail(name=None, subset=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Detailed meta-information about a subset in a Granta MI database. - -* **Parameters:** - * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **subset** ([`SubsetReference`](#module-GRANTA_MIScriptingToolkit.SubsetReference)) - - - -#### *property* name - -Property name is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* subset - -Property subset is of type [`SubsetReference`](#module-GRANTA_MIScriptingToolkit.SubsetReference). - -* **Return type:** - [`SubsetReference`](#module-GRANTA_MIScriptingToolkit.SubsetReference) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### SubsetReference - - - -### *class* SubsetReference(DBKey=None, name=None, partialTableReference=None, subsetIdentity=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -A type that identifies a particular subset in a Granta MI database. This may be done by specifying -the identity of the subset, or by specifying a name that will match (only) the subset along with -the table to which the subset belongs. - -* **Parameters:** - * **DBKey** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **partialTableReference** ([`PartialTableReference`](#module-GRANTA_MIScriptingToolkit.PartialTableReference)) - * **subsetIdentity** ([*int*](https://docs.python.org/3/library/functions.html#int)) - - - -#### *property* DBKey - -Property DBKey is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* name - -Property name is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* partialTableReference - -Property partialTableReference is of type [`PartialTableReference`](#module-GRANTA_MIScriptingToolkit.PartialTableReference). When used for input, this only needs to be specified if you are specifying a name rather than an id. - -* **Return type:** - [`PartialTableReference`](#module-GRANTA_MIScriptingToolkit.PartialTableReference) - - - -#### *property* subsetIdentity - -Property subsetIdentity is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### SubsetsDataType - - - -### *class* SubsetsDataType(dataVersionNo=None, importNodeName=None, namedSubsets=None, nodeName=None, typeString=None, \_isOwner=True) - -Bases: [`IDataValue`](#GRANTA_MIScriptingToolkit.IDataValue.IDataValue) - -Contains a list of subsets. -Contains a list of subsets (returned by DataExport for the pseudo attribute for Subsets). - -* **Parameters:** - * **dataVersionNo** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **importNodeName** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **namedSubsets** (list of [`NamedSubset`](#module-GRANTA_MIScriptingToolkit.NamedSubset)) - * **nodeName** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **typeString** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* dataVersionNo - -Property dataVersionNo is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* importNodeName - -Property importNodeName is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* namedSubsets - -Property namedSubsets is a list of [`NamedSubset`](#module-GRANTA_MIScriptingToolkit.NamedSubset) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`NamedSubset`](#module-GRANTA_MIScriptingToolkit.NamedSubset) - - - -#### *property* nodeName - -Property nodeName is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* typeString - -Property typeString is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### TableDetail - - - -### *class* TableDetail(attributeReferences=None, defaultLayout=None, defaultSubset=None, standardAttributeReferences=None, tableFilters=None, tableReference=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Detailed meta-information about a table in a Granta MI database. - -* **Parameters:** - * **attributeReferences** (list of [`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference)) - * **defaultLayout** ([`NamedLayout`](#module-GRANTA_MIScriptingToolkit.NamedLayout)) - * **defaultSubset** ([`SubsetDetail`](#module-GRANTA_MIScriptingToolkit.SubsetDetail)) - * **standardAttributeReferences** (list of [`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference)) - * **tableFilters** ([*list*](https://docs.python.org/3/library/stdtypes.html#list) *of* [*int*](https://docs.python.org/3/library/functions.html#int)) - * **tableReference** ([`TableReference`](#module-GRANTA_MIScriptingToolkit.TableReference)) - - - -#### *property* attributeReferences - -Property attributeReferences is a list of [`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference) - - - -#### *property* defaultLayout - -Property defaultLayout is of type [`NamedLayout`](#module-GRANTA_MIScriptingToolkit.NamedLayout). - -* **Return type:** - [`NamedLayout`](#module-GRANTA_MIScriptingToolkit.NamedLayout) - - - -#### *property* defaultSubset - -Property defaultSubset is of type [`SubsetDetail`](#module-GRANTA_MIScriptingToolkit.SubsetDetail). - -* **Return type:** - [`SubsetDetail`](#module-GRANTA_MIScriptingToolkit.SubsetDetail) - - - -#### *property* standardAttributeReferences - -Property standardAttributeReferences is a list of [`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference) - - - -#### *property* tableFilters - -Property tableFilters is a list of int objects. See [`GRANTA_Constants`](#module-GRANTA_MIScriptingToolkit.GRANTA_Constants) for supported values. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - [list](https://docs.python.org/3/library/stdtypes.html#list) of [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* tableReference - -Property tableReference is of type [`TableReference`](#module-GRANTA_MIScriptingToolkit.TableReference). - -* **Return type:** - [`TableReference`](#module-GRANTA_MIScriptingToolkit.TableReference) - - - -#### AddAttributeReferences(\_attributeReference) - -Appends \_attributeReference to attributeReferences property on TableDetail C-object. - -* **Parameters:** - **\_attributeReference** ([`AttributeReference`](#module-GRANTA_MIScriptingToolkit.AttributeReference)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### TableReference - - - -### *class* TableReference(DBKey=None, GUID=None, ID=None, name=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -A type that allows identification of a particular table in a particular Granta MI database. -The DBKey is required in addition to at least one of either: ID, GUID, or Name. - -* **Parameters:** - * **DBKey** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **GUID** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **ID** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* DBKey - -Property DBKey is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* GUID - -Property GUID is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* ID - -Property ID is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* name - -Property name is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### TabularColumnDetail - - - -### *class* TabularColumnDetail(dataType=None, databaseUnit=None, discreteValues=None, name=None, revisionInfo=None, type=None, identity=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Describes a Tabular Column, defined in a Tabular Attribute. -This details how the schema describes the Column, and does not provide information about the -contents of the Column in any particular Datum. - -* **Parameters:** - * **dataType** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **databaseUnit** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **discreteValues** ([*list*](https://docs.python.org/3/library/stdtypes.html#list) *of* [*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **revisionInfo** ([`RevisionInfo`](#module-GRANTA_MIScriptingToolkit.RevisionInfo)) - * **type** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **identity** ([*int*](https://docs.python.org/3/library/functions.html#int)) - - - -#### *property* dataType - -Property dataType is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* databaseUnit - -Property databaseUnit is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* discreteValues - -Property discreteValues is a list of str objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - [list](https://docs.python.org/3/library/stdtypes.html#list) of [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* identity - -Property identity is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* name - -Property name is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* revisionInfo - -Property revisionInfo is of type [`RevisionInfo`](#module-GRANTA_MIScriptingToolkit.RevisionInfo). - -* **Return type:** - [`RevisionInfo`](#module-GRANTA_MIScriptingToolkit.RevisionInfo) - - - -#### *property* type - -Property type is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### TabularDataCell - - - -### *class* TabularDataCell(data=None, dataType=None, dateDataValue=None, discreteDataValue=None, fileDataValue=None, hyperlinkDataValue=None, integerDataValue=None, listDataValue=None, logicalDataValue=None, longTextDataValue=None, pictureDataValue=None, pointDataValue=None, rangeDataValue=None, shortTextDataValue=None, emptyDataValue=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -A Cell within an item of Tabular Data. When importing, TabularDataRow’s CreateRow() and -CreateUpdateRow() functions initialize empty cells. You can set this type’s data member to be -various data types: range, point, short text, long text, discrete, integer, logical, hyperlink, -file, picture, or date. - -* **Parameters:** - * **data** ([`IDataValue`](#module-GRANTA_MIScriptingToolkit.IDataValue)) - * **dataType** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **dateDataValue** ([`DateDataType`](#module-GRANTA_MIScriptingToolkit.DateDataType)) - * **discreteDataValue** ([`DiscreteDataType`](#module-GRANTA_MIScriptingToolkit.DiscreteDataType)) - * **fileDataValue** ([`FileDataType`](#module-GRANTA_MIScriptingToolkit.FileDataType)) - * **hyperlinkDataValue** ([`HyperlinkDataType`](#module-GRANTA_MIScriptingToolkit.HyperlinkDataType)) - * **integerDataValue** ([`IntegerDataType`](#module-GRANTA_MIScriptingToolkit.IntegerDataType)) - * **listDataValue** ([`ListDataType`](#module-GRANTA_MIScriptingToolkit.ListDataType)) - * **logicalDataValue** ([`LogicalDataType`](#module-GRANTA_MIScriptingToolkit.LogicalDataType)) - * **longTextDataValue** ([`LongTextDataType`](#module-GRANTA_MIScriptingToolkit.LongTextDataType)) - * **pictureDataValue** ([`PictureDataType`](#module-GRANTA_MIScriptingToolkit.PictureDataType)) - * **pointDataValue** ([`PointDataType`](#module-GRANTA_MIScriptingToolkit.PointDataType)) - * **rangeDataValue** ([`RangeDataType`](#module-GRANTA_MIScriptingToolkit.RangeDataType)) - * **shortTextDataValue** ([`ShortTextDataType`](#module-GRANTA_MIScriptingToolkit.ShortTextDataType)) - * **emptyDataValue** ([`EmptyDataType`](#module-GRANTA_MIScriptingToolkit.EmptyDataType)) - - - -#### *property* dataType - -Property dataType is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* dateDataValue - -Property dateDataValue is of type [`DateDataType`](#module-GRANTA_MIScriptingToolkit.DateDataType). - -* **Return type:** - [`DateDataType`](#module-GRANTA_MIScriptingToolkit.DateDataType) - - - -#### *property* discreteDataValue - -Property discreteDataValue is of type [`DiscreteDataType`](#module-GRANTA_MIScriptingToolkit.DiscreteDataType). - -* **Return type:** - [`DiscreteDataType`](#module-GRANTA_MIScriptingToolkit.DiscreteDataType) - - - -#### *property* emptyDataValue - -Property emptyDataValue is of type [`EmptyDataType`](#module-GRANTA_MIScriptingToolkit.EmptyDataType). - -* **Return type:** - [`EmptyDataType`](#module-GRANTA_MIScriptingToolkit.EmptyDataType) - - - -#### *property* fileDataValue - -Property fileDataValue is of type [`FileDataType`](#module-GRANTA_MIScriptingToolkit.FileDataType). - -* **Return type:** - [`FileDataType`](#module-GRANTA_MIScriptingToolkit.FileDataType) - - - -#### *property* hyperlinkDataValue - -Property hyperlinkDataValue is of type [`HyperlinkDataType`](#module-GRANTA_MIScriptingToolkit.HyperlinkDataType). - -* **Return type:** - [`HyperlinkDataType`](#module-GRANTA_MIScriptingToolkit.HyperlinkDataType) - - - -#### *property* integerDataValue - -Property integerDataValue is of type [`IntegerDataType`](#module-GRANTA_MIScriptingToolkit.IntegerDataType). - -* **Return type:** - [`IntegerDataType`](#module-GRANTA_MIScriptingToolkit.IntegerDataType) - - - -#### *property* listDataValue - -Property listDataValue is of type [`ListDataType`](#module-GRANTA_MIScriptingToolkit.ListDataType). - -* **Return type:** - [`ListDataType`](#module-GRANTA_MIScriptingToolkit.ListDataType) - - - -#### *property* logicalDataValue - -Property logicalDataValue is of type [`LogicalDataType`](#module-GRANTA_MIScriptingToolkit.LogicalDataType). - -* **Return type:** - [`LogicalDataType`](#module-GRANTA_MIScriptingToolkit.LogicalDataType) - - - -#### *property* longTextDataValue - -Property longTextDataValue is of type [`LongTextDataType`](#module-GRANTA_MIScriptingToolkit.LongTextDataType). - -* **Return type:** - [`LongTextDataType`](#module-GRANTA_MIScriptingToolkit.LongTextDataType) - - - -#### *property* pictureDataValue - -Property pictureDataValue is of type [`PictureDataType`](#module-GRANTA_MIScriptingToolkit.PictureDataType). - -* **Return type:** - [`PictureDataType`](#module-GRANTA_MIScriptingToolkit.PictureDataType) - - - -#### *property* pointDataValue - -Property pointDataValue is of type [`PointDataType`](#module-GRANTA_MIScriptingToolkit.PointDataType). - -* **Return type:** - [`PointDataType`](#module-GRANTA_MIScriptingToolkit.PointDataType) - - - -#### *property* rangeDataValue - -Property rangeDataValue is of type [`RangeDataType`](#module-GRANTA_MIScriptingToolkit.RangeDataType). - -* **Return type:** - [`RangeDataType`](#module-GRANTA_MIScriptingToolkit.RangeDataType) - - - -#### *property* shortTextDataValue - -Property shortTextDataValue is of type [`ShortTextDataType`](#module-GRANTA_MIScriptingToolkit.ShortTextDataType). - -* **Return type:** - [`ShortTextDataType`](#module-GRANTA_MIScriptingToolkit.ShortTextDataType) - - - -#### *property* data - -Property data is of type [`IDataValue`](#module-GRANTA_MIScriptingToolkit.IDataValue). - -* **Return type:** - [`IDataValue`](#module-GRANTA_MIScriptingToolkit.IDataValue) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### TabularDataRow - - - -### *class* TabularDataRow(Id=None, cells=None, linkedRecords=None, linkingValue=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -A Row within an item of Tabular Data. When importing, this must be created by TabularDataType’s -CreateRow() or CreateUpdateRow() functions. These functions return rows with empty cells (the -number of which is the number of columns added with AddColumn()). - -* **Parameters:** - * **Id** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **cells** (list of [`TabularDataCell`](#module-GRANTA_MIScriptingToolkit.TabularDataCell)) - * **linkedRecords** (list of [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference)) - * **linkingValue** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* cells - -Property cells is a list of [`TabularDataCell`](#module-GRANTA_MIScriptingToolkit.TabularDataCell) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`TabularDataCell`](#module-GRANTA_MIScriptingToolkit.TabularDataCell) - - - -#### *property* Id - -Property Id is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* linkedRecords - -Property linkedRecords is a list of [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) - - - -#### *property* linkingValue - -Property linkingValue is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### TabularDataType - - - -### *class* TabularDataType(columns=None, isApplicable=None, tabularDataRows=None, summaryColumns=None, summaryRow=None, \_isOwner=True) - -Bases: [`IDataValue`](#GRANTA_MIScriptingToolkit.IDataValue.IDataValue) - -Type representing an item of exported Tabular Data, including metadata such as Column definitions. -This type can also be used for import, although the usage pattern is different. See the -[`TabularDataRow`](#module-GRANTA_MIScriptingToolkit.TabularDataRow) type for more information. - -* **Parameters:** - * **columns** (list of [`TabularDataTypeColumn`](#module-GRANTA_MIScriptingToolkit.TabularDataTypeColumn)) - * **isApplicable** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **tabularDataRows** (list of [`TabularDataRow`](#module-GRANTA_MIScriptingToolkit.TabularDataRow)) - * **summaryColumns** (list of [`TabularDataTypeColumn`](#module-GRANTA_MIScriptingToolkit.TabularDataTypeColumn)) - * **summaryRow** ([`TabularDataRow`](#module-GRANTA_MIScriptingToolkit.TabularDataRow)) - - - -#### *class* ChangeType - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - - - -#### InsertBefore *= 0* - - - -#### Append *= 1* - - - -#### Update *= 2* - - - -#### Delete *= 3* - - - -#### CreateRow() - -Create and return a row for a tabular data import operation. - - - -#### CreateUpdateRow(type, identity) - -Create and return a row for a tabular data import update operation. To append a new row, use identity 0: `new_row = tabular_data_type.CreateUpdateRow(type=ChangeType.Append, identity=0)`. To clear data from an existing cell, use EmptyDataType in an update operation. - -* **Parameters:** - * **type** ([*TabularDataType.ChangeType*](#GRANTA_MIScriptingToolkit.TabularDataType.TabularDataType.ChangeType)) – This specifies the operation to perform on this tabular datum - * **identity** – The ID of the row to update. You should retrieve this from a data export operation (GetRecordAttributesByRef). If type is Append, pass this argument in as 0. - - - -#### *property* columns - -Property columns is a list of [`TabularDataTypeColumn`](#module-GRANTA_MIScriptingToolkit.TabularDataTypeColumn) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`TabularDataTypeColumn`](#module-GRANTA_MIScriptingToolkit.TabularDataTypeColumn) - - - -#### *property* isApplicable - -Property isApplicable is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* summaryColumns - -Property summaryColumns is a list of [`TabularDataTypeColumn`](#module-GRANTA_MIScriptingToolkit.TabularDataTypeColumn) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`TabularDataTypeColumn`](#module-GRANTA_MIScriptingToolkit.TabularDataTypeColumn) - - - -#### *property* tabularDataRows - -Property tabularDataRows is a list of [`TabularDataRow`](#module-GRANTA_MIScriptingToolkit.TabularDataRow) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`TabularDataRow`](#module-GRANTA_MIScriptingToolkit.TabularDataRow) - - - -#### *property* summaryRow - -Property summaryRow is of type [`TabularDataRow`](#module-GRANTA_MIScriptingToolkit.TabularDataRow). - -* **Return type:** - [`TabularDataRow`](#module-GRANTA_MIScriptingToolkit.TabularDataRow) - - - -#### AddColumn(value) - -Appends value to columns property on TabularDataType C-object. - -* **Parameters:** - **value** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### TabularDataTypeColumn - - - -### *class* TabularDataTypeColumn(columnType=None, dataType=None, databaseUnit=None, identity=None, name=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Information about a column or data summary column in a specific tabular attribute. - -* **Parameters:** - * **columnType** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **dataType** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **databaseUnit** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **identity** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *class* ColType - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - - - -#### Local *= 0* - - - -#### TargetAttribute *= 1* - - - -#### TargetRecord *= 2* - - - -#### TargetTabularColumn *= 3* - - - -#### Unavailable *= 4* - - - -#### *property* columnType - -Property columnType is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* dataType - -Property dataType is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* databaseUnit - -Property databaseUnit is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* identity - -Property identity is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* name - -Property name is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### TabularDataSettings - - - -### *class* TabularDataSettings(exportFunctionalDataAsLinks=None, includeWithdrawn=None, omitBinaryCells=None, unfiltered=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Settings that affect the export of Tabular Data. - -* **Parameters:** - * **exportFunctionalDataAsLinks** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **includeWithdrawn** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **omitBinaryCells** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **unfiltered** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - - - -#### *property* exportFunctionalDataAsLinks - -Property exportFunctionalDataAsLinks is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* includeWithdrawn - -Property includeWithdrawn is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* omitBinaryCells - -Property omitBinaryCells is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* unfiltered - -Property unfiltered is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### TabularDetail - - - -### *class* TabularDetail(columns=None, linkedTable=None, linkingAttribute=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Information about a specific tabular attribute. If the tabular attribute has a linking attribute, -you can specify the linking attribute and the linked table containing that attribute. - -* **Parameters:** - * **columns** (list of [`TabularColumnDetail`](#module-GRANTA_MIScriptingToolkit.TabularColumnDetail)) - * **linkedTable** ([`TableReference`](#module-GRANTA_MIScriptingToolkit.TableReference)) - * **linkingAttribute** ([`NamedAttribute`](#module-GRANTA_MIScriptingToolkit.NamedAttribute)) - - - -#### *property* columns - -Property columns is a list of [`TabularColumnDetail`](#module-GRANTA_MIScriptingToolkit.TabularColumnDetail) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`TabularColumnDetail`](#module-GRANTA_MIScriptingToolkit.TabularColumnDetail) - - - -#### *property* linkedTable - -Property linkedTable is of type [`TableReference`](#module-GRANTA_MIScriptingToolkit.TableReference). - -* **Return type:** - [`TableReference`](#module-GRANTA_MIScriptingToolkit.TableReference) - - - -#### *property* linkingAttribute - -Property linkingAttribute is of type [`NamedAttribute`](#module-GRANTA_MIScriptingToolkit.NamedAttribute). - -* **Return type:** - [`NamedAttribute`](#module-GRANTA_MIScriptingToolkit.NamedAttribute) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### TargetedSourceRecord - - - -### *class* TargetedSourceRecord(sourceRecord=None, targetRecords=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -A type for unlinking records, contains a source [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) -and an array of target [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) objects. - -* **Parameters:** - * **sourceRecord** ([`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference)) - * **targetRecords** (list of [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference)) - - - -#### *property* targetRecords - -Property targetRecords is a list of [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) - - - -#### *property* sourceRecord - -Property sourceRecord is of type [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference). - -* **Return type:** - [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) - - - -#### AddTargetRecord(\_recordReference) - -Appends \_recordReference to targetRecords property on TargetedSourceRecord C-object. - -* **Parameters:** - **\_recordReference** ([`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### TrailingZeroInformation - - - -### *class* TrailingZeroInformation(enteredUnit=None, enteredValue=None, significantFigures=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Type representing the numerical value as originally entered, including original unit and significant -figures. - -* **Parameters:** - * **enteredUnit** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **enteredValue** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **significantFigures** ([*int*](https://docs.python.org/3/library/functions.html#int)) - - - -#### *property* enteredUnit - -Property enteredUnit is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* enteredValue - -Property enteredValue is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* significantFigures - -Property significantFigures is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### TreeRecord - - - -### *class* TreeRecord(children=None, color=None, longName=None, parentRecordHistoryIdentity=None, recordReference=None, shortName=None, type=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Type representing a single record in a Granta MI database, along with information about its position -in the node-tree. - -* **Parameters:** - * **children** (list of [`TreeRecord`](#module-GRANTA_MIScriptingToolkit.TreeRecord)) - * **color** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **longName** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **parentRecordHistoryIdentity** ([*int*](https://docs.python.org/3/library/functions.html#int)) - * **recordReference** ([`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference)) - * **shortName** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **type** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* children - -Property children is a list of [`TreeRecord`](#module-GRANTA_MIScriptingToolkit.TreeRecord) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`TreeRecord`](#module-GRANTA_MIScriptingToolkit.TreeRecord) - - - -#### *property* color - -Property color is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* longName - -Property longName is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* parentRecordHistoryIdentity - -Property parentRecordHistoryIdentity is of type int. - -* **Return type:** - [int](https://docs.python.org/3/library/functions.html#int) - - - -#### *property* recordReference - -Property recordReference is of type [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference). - -* **Return type:** - [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) - - - -#### *property* shortName - -Property shortName is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* type - -Property type is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### AddChildren(\_treeRecord) - -Appends \_treeRecord to children property on TreeRecord C-object. - -* **Parameters:** - **\_treeRecord** ([`TreeRecord`](#module-GRANTA_MIScriptingToolkit.TreeRecord)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### UnitConversion - - - -### *class* UnitConversion(factor=None, offset=None, sourceSymbol=None, targetSymbol=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Information about how to convert from a specified source unit to a target unit. - -* **Parameters:** - * **factor** ([*float*](https://docs.python.org/3/library/functions.html#float)) - * **offset** ([*float*](https://docs.python.org/3/library/functions.html#float)) - * **sourceSymbol** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **targetSymbol** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* factor - -Property factor is of type float. - -* **Return type:** - [float](https://docs.python.org/3/library/functions.html#float) - - - -#### *property* offset - -Property offset is of type float. - -* **Return type:** - [float](https://docs.python.org/3/library/functions.html#float) - - - -#### *property* sourceSymbol - -Property sourceSymbol is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* targetSymbol - -Property targetSymbol is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### UnitConversionContext - - - -### *class* UnitConversionContext(absoluteUnits=None, currency=None, unitSystem=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Type defining how values with units should be represented. - -* **Parameters:** - * **absoluteUnits** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **currency** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **unitSystem** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* absoluteUnits - -Property absoluteUnits is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* currency - -Property currency is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* unitSystem - -Property unitSystem is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### UnitConversionContextConversionSet - - - -### *class* UnitConversionContextConversionSet(unitConversionContext=None, unitConversions=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -All the unit conversions available with a specified unit conversion context. - -* **Parameters:** - * **unitConversionContext** ([`UnitConversionContext`](#module-GRANTA_MIScriptingToolkit.UnitConversionContext)) - * **unitConversions** (list of [`UnitConversion`](#module-GRANTA_MIScriptingToolkit.UnitConversion)) - - - -#### *property* unitConversions - -Property unitConversions is a list of [`UnitConversion`](#module-GRANTA_MIScriptingToolkit.UnitConversion) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`UnitConversion`](#module-GRANTA_MIScriptingToolkit.UnitConversion) - - - -#### *property* unitConversionContext - -Property unitConversionContext is of type [`UnitConversionContext`](#module-GRANTA_MIScriptingToolkit.UnitConversionContext). - -* **Return type:** - [`UnitConversionContext`](#module-GRANTA_MIScriptingToolkit.UnitConversionContext) - - - -#### AddUnitConversion(\_unitConversion) - -Appends \_unitConversion to unitConversions property on UnitConversionContextConversionSet C-object. - -* **Parameters:** - **\_unitConversion** ([`UnitConversion`](#module-GRANTA_MIScriptingToolkit.UnitConversion)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### UnitConversionTarget - - - -### *class* UnitConversionTarget(factor=None, offset=None, targetSymbol=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -Information about how to convert to a target unit. When this type is used directly, the source unit -is assumed to be already known from a different type. To obtain a value in the target units, -multiply the source value by the factor, and then add the offset. - -* **Parameters:** - * **factor** ([*float*](https://docs.python.org/3/library/functions.html#float)) - * **offset** ([*float*](https://docs.python.org/3/library/functions.html#float)) - * **targetSymbol** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* factor - -Property factor is of type float. - -* **Return type:** - [float](https://docs.python.org/3/library/functions.html#float) - - - -#### *property* offset - -Property offset is of type float. - -* **Return type:** - [float](https://docs.python.org/3/library/functions.html#float) - - - -#### *property* targetSymbol - -Property targetSymbol is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### UnitInformation - - - -### *class* UnitInformation(unitName=None, unitSymbol=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -A type used to give details of units for quantities. -When this type is output by the Service Layer, both name and symbol will be populated. When passed -as input to the Service Layer, only name or symbol need to be populated; if both are populated, -only the symbol is used. - -* **Parameters:** - * **unitName** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **unitSymbol** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* unitName - -Property unitName is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* unitSymbol - -Property unitSymbol is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### UnitSymbol - - - -### *class* UnitSymbol(hasCurrency=None, symbol=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -A unit symbol known to MI, and whether it references a currency. - -* **Parameters:** - * **hasCurrency** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **symbol** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* hasCurrency - -Property hasCurrency is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* symbol - -Property symbol is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### UnittedParameterValue - - - -### *class* UnittedParameterValue(parameterWithValues=None, unitSymbol=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -A Parameter, along with a single value of that Parameter, optionally with units. - -* **Parameters:** - * **parameterWithValues** ([`ParameterReferenceAndValue`](#module-GRANTA_MIScriptingToolkit.ParameterReferenceAndValue)) - * **unitSymbol** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* parameterWithValues - -Property parameterWithValues is of type [`ParameterReferenceAndValue`](#module-GRANTA_MIScriptingToolkit.ParameterReferenceAndValue). - -* **Return type:** - [`ParameterReferenceAndValue`](#module-GRANTA_MIScriptingToolkit.ParameterReferenceAndValue) - - - -#### *property* unitSymbol - -Property unitSymbol is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### UnlinkAllRecords - - - -### *class* UnlinkAllRecords(nodeName=None, sourceRecords=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -For each given source record, remove all links in the Record Link Group. - -* **Parameters:** - * **nodeName** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **sourceRecords** (list of [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference)) - - - -#### *property* sourceRecords - -Property sourceRecords is a list of [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference) - - - -#### *property* nodeName - -Property nodeName is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### AddSourceRecord(\_recordReference) - -Appends \_recordReference to sourceRecords property on UnlinkAllRecords C-object. - -* **Parameters:** - **\_recordReference** ([`RecordReference`](#module-GRANTA_MIScriptingToolkit.RecordReference)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### UnlinkRecords - - - -### *class* UnlinkRecords(nodeName=None, sourceRecords=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -For each given source record, remove links to the target records specified for that source record. -Silently skip any links that do not exist. - -* **Parameters:** - * **nodeName** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **sourceRecords** (list of [`TargetedSourceRecord`](#module-GRANTA_MIScriptingToolkit.TargetedSourceRecord)) - - - -#### *property* sourceRecords - -Property sourceRecords is of type list of [`TargetedSourceRecord`](#module-GRANTA_MIScriptingToolkit.TargetedSourceRecord). - -* **Return type:** - list of [`TargetedSourceRecord`](#module-GRANTA_MIScriptingToolkit.TargetedSourceRecord) - - - -#### *property* nodeName - -Property nodeName is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### AddSourceRecord(\_targetedSourceRecord) - -Appends \_targetedSourceRecord to sourceRecords property on UnlinkRecords C-object. - -* **Parameters:** - **\_targetedSourceRecord** ([`TargetedSourceRecord`](#module-GRANTA_MIScriptingToolkit.TargetedSourceRecord)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### XYData - - - -### *class* XYData(XYPoints=None, XYRanges=None, type=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -A collection of y-axis values for a graph where the y-axis values are either point or range values. - -* **Parameters:** - * **XYPoints** (list of [`XYPoint`](#module-GRANTA_MIScriptingToolkit.XYPoint)) - * **XYRanges** (list of [`XYRange`](#module-GRANTA_MIScriptingToolkit.XYRange)) - * **type** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - - - -#### *property* XYPoints - -Property XYPoints is a list of [`XYPoint`](#module-GRANTA_MIScriptingToolkit.XYPoint) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`XYPoint`](#module-GRANTA_MIScriptingToolkit.XYPoint) - - - -#### *property* XYRanges - -Property XYRanges is a list of [`XYRange`](#module-GRANTA_MIScriptingToolkit.XYRange) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`XYRange`](#module-GRANTA_MIScriptingToolkit.XYRange) - - - -#### *property* type - -Property type is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### AddXYPoint(\_XYPoint) - -Appends \_XYPoint to XYPoints property on XYData C-object. - -* **Parameters:** - **\_XYPoint** ([`XYPoint`](#module-GRANTA_MIScriptingToolkit.XYPoint)) - - - -#### AddXYRange(\_XYRange) - -Appends \_XYRange to XYRanges property on XYData C-object. - -* **Parameters:** - **\_XYRange** ([`XYRange`](#module-GRANTA_MIScriptingToolkit.XYRange)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### XYDiscrete - - - -### *class* XYDiscrete(Y=None, isEstimated=None, parameterValue=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -An x-y datum where the y-axis value is a discrete value. - -* **Parameters:** - * **Y** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) - * **isEstimated** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **parameterValue** ([`ParameterValue`](#module-GRANTA_MIScriptingToolkit.ParameterValue)) - - - -#### *property* isEstimated - -Property isEstimated is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* parameterValue - -Property parameterValue is of type [`ParameterValue`](#module-GRANTA_MIScriptingToolkit.ParameterValue). - -* **Return type:** - [`ParameterValue`](#module-GRANTA_MIScriptingToolkit.ParameterValue) - - - -#### *property* Y - -Property Y is of type str. - -* **Return type:** - [str](https://docs.python.org/3/library/stdtypes.html#str) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### XYDiscreteData - - - -### *class* XYDiscreteData(XYDiscretes=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -A collection of y-axis values for a graph where the y-axis values are discrete values. - -* **Parameters:** - **XYDiscretes** (list of [`XYDiscrete`](#module-GRANTA_MIScriptingToolkit.XYDiscrete)) - - - -#### *property* XYDiscretes - -Property XYDiscretes is a list of [`XYDiscrete`](#module-GRANTA_MIScriptingToolkit.XYDiscrete) objects. - -#### WARNING -Do not attempt to edit or append to the returned value. - -* **Return type:** - list of [`XYDiscrete`](#module-GRANTA_MIScriptingToolkit.XYDiscrete) - - - -#### AddXYDiscrete(\_XYDiscrete) - -Appends \_XYDiscrete to XYDiscretes property on XYDiscreteData C-object. - -* **Parameters:** - **\_XYDiscrete** ([`XYDiscrete`](#module-GRANTA_MIScriptingToolkit.XYDiscrete)) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### XYPoint - - - -### *class* XYPoint(Y=None, isEstimated=None, parameterValue=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -An x-y datum where the y-axis value is a point. - -* **Parameters:** - * **Y** ([*float*](https://docs.python.org/3/library/functions.html#float)) - * **isEstimated** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **parameterValue** ([`ParameterValue`](#module-GRANTA_MIScriptingToolkit.ParameterValue)) - - - -#### *property* isEstimated - -Property isEstimated is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* parameterValue - -Property parameterValue is of type [`ParameterValue`](#module-GRANTA_MIScriptingToolkit.ParameterValue). - -* **Return type:** - [`ParameterValue`](#module-GRANTA_MIScriptingToolkit.ParameterValue) - - - -#### *property* Y - -Property Y is of type float. - -* **Return type:** - [float](https://docs.python.org/3/library/functions.html#float) - - - -#### *property* c_obj - -Pointer to the underlying C-object - - - - - -### XYRange - - - -### *class* XYRange(isEstimated=None, lowerY=None, parameterValue=None, upperY=None, \_isOwner=True) - -Bases: [`object`](https://docs.python.org/3/library/functions.html#object) - -An x-y datum where the y-axis value is a range. - -* **Parameters:** - * **isEstimated** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) - * **lowerY** ([*float*](https://docs.python.org/3/library/functions.html#float)) - * **parameterValue** ([`ParameterValue`](#module-GRANTA_MIScriptingToolkit.ParameterValue)) - * **upperY** ([*float*](https://docs.python.org/3/library/functions.html#float)) - - - -#### *property* isEstimated - -Property isEstimated is of type bool. - -* **Return type:** - [bool](https://docs.python.org/3/library/functions.html#bool) - - - -#### *property* lowerY - -Property lowerY is of type float. - -* **Return type:** - [float](https://docs.python.org/3/library/functions.html#float) - - - -#### *property* parameterValue - -Property parameterValue is of type [`ParameterValue`](#module-GRANTA_MIScriptingToolkit.ParameterValue). - -* **Return type:** - [`ParameterValue`](#module-GRANTA_MIScriptingToolkit.ParameterValue) - - - -#### *property* upperY - -Property upperY is of type float. - -* **Return type:** - [float](https://docs.python.org/3/library/functions.html#float) - - - -#### *property* c_obj - -Pointer to the underlying C-object diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/foundation/index.md b/2026R1/scripting-toolkit-dev-portal-26-r1/foundation/index.md deleted file mode 100644 index 806def8b82..0000000000 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/foundation/index.md +++ /dev/null @@ -1,31 +0,0 @@ -# Foundation API - - - -The Foundation API provides a low-level wrapper around the base functionality provided by the Server Layer SOAP API. As -a result, a detailed knowledge of the Service Layer SOAP API is required, and care is needed around managing request -size to achieve satisfactory performance and stability. - -#### WARNING -The Foundation API is included for compatibility purposes only. The Streamlined API should be used for all new -solutions. - -#### WARNING -The Foundation API does not follow Semantic Versioning. Breaking changes may be introduced with any release and will -in general not be documented. - - - -## Example notebooks - -These example scripts show you how to use MI Scripting Toolkit to search for records, export data, and import data. All examples -use the MI Training database, available from the Ansys Download Center. - -Download all the notebooks and example files [`here`](/samples/foundation/example_files_foundation.zip), or -access individual notebooks via the links in the navigation bar on the left. - - - -## API reference - -The Foundation API is fully documented [here](api.md). diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/foundation_api.md b/2026R1/scripting-toolkit-dev-portal-26-r1/foundation_api.md new file mode 100644 index 0000000000..888a452c07 --- /dev/null +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/foundation_api.md @@ -0,0 +1,16524 @@ +# Foundation API reference + + + +#### WARNING +Always consult your ACE representative before using the Foundation API. See [Foundation API](user_guide/package_overview.md#foundation-api) for more +information. + + + +## Services reference + + + + + +### BrowseService + +### *class* BrowseService(mi_session, retries=0) + +The Browse service provides read-only operation for a Granta MI Server. + +#### get_associated_records(\_req) + +Returns all the Records, in a single target Table, that are associated with each of a given set of source Records, via Tabular Data links. These links can be in the forward or reverse direction. Note that, if there is more than one Tabular Attribute linking the source and target Tables, the Associated Records are the union of all those linked by each of the Tabular Attributes. + +* **Parameters:** + **\_req** ([`GetAssociatedRecordsRequest`](#module-ansys.grantami.backend.soap.GetAssociatedRecordsRequest) object) +* **Return type:** + [`GetAssociatedRecordsResponse`](#module-ansys.grantami.backend.soap.GetAssociatedRecordsResponse) object + +#### get_attribute_details(\_req) + +Returns detailed meta-information about given Attribute(s) in a Granta MI Database. Does not retrieve values of the Data; for that, use the DataExport service. + +* **Parameters:** + **\_req** ([`GetAttributeDetailsRequest`](#module-ansys.grantami.backend.soap.GetAttributeDetailsRequest) object) +* **Return type:** + [`GetAttributeDetailsResponse`](#module-ansys.grantami.backend.soap.GetAttributeDetailsResponse) object + +#### get_attribute_parameters(\_req) + +Gets detailed information about the Parameters that are declared to be usable with given Attribute(s) in a Granta MI Database. Can only be used with Functional Attributes or Multi-Valued Attributes. + +* **Parameters:** + **\_req** ([`GetAttributeParametersRequest`](#module-ansys.grantami.backend.soap.GetAttributeParametersRequest) object) +* **Return type:** + [`GetAttributeParametersResponse`](#module-ansys.grantami.backend.soap.GetAttributeParametersResponse) object + +#### get_child_nodes(\_req) + +Returns information about the child nodes of the given node in the node-tree of a Granta MI Table. + +* **Parameters:** + **\_req** ([`GetChildNodes`](#module-ansys.grantami.backend.soap.GetChildNodes) object) +* **Return type:** + [`GetChildNodesResponse`](#module-ansys.grantami.backend.soap.GetChildNodesResponse) object + +#### get_currencies() + +Returns the currencies available in the Granta MI Server. + +* **Return type:** + [`GetCurrenciesResponse`](#module-ansys.grantami.backend.soap.GetCurrenciesResponse) object + +#### get_database_parameters(\_req) + +List the parameter(s) in a Granta MI Database. + +* **Parameters:** + **\_req** ([`GetDatabaseParameters`](#module-ansys.grantami.backend.soap.GetDatabaseParameters) object) +* **Return type:** + [`GetDatabaseParametersResponse`](#module-ansys.grantami.backend.soap.GetDatabaseParametersResponse) object + +#### get_databases() + +List the databases available on the Granta MI Server. + +* **Return type:** + [`GetDatabasesResponse`](#module-ansys.grantami.backend.soap.GetDatabasesResponse) object + +#### get_datasheet_path(\_req) + +For each record reference gets the relative portion of an HTTP URL to a Granta MI datasheet, served by MI Viewer. + +* **Parameters:** + **\_req** ([`GetDatasheetPath`](#module-ansys.grantami.backend.soap.GetDatasheetPath) object) +* **Return type:** + [`GetDatasheetPathResponse`](#module-ansys.grantami.backend.soap.GetDatasheetPathResponse) object + +#### get_datasheet_path_parameterized(\_req) + +Gets information that may be used to construct an HTTP URL to a Granta MI datasheet, served by MI Viewer. + +* **Parameters:** + **\_req** ([`GetDatasheetPathParameterized`](#module-ansys.grantami.backend.soap.GetDatasheetPathParameterized) object) +* **Return type:** + [`GetDatasheetPathParameterizedResponse`](#module-ansys.grantami.backend.soap.GetDatasheetPathParameterizedResponse) object + +#### get_integration_profiles(\_req) + +List the profiles available on a Granta MI Database. + +* **Parameters:** + **\_req** ([`GetIntegrationProfiles`](#module-ansys.grantami.backend.soap.GetIntegrationProfiles) object) +* **Return type:** + [`GetIntegrationProfilesResponse`](#module-ansys.grantami.backend.soap.GetIntegrationProfilesResponse) object + +#### get_layouts(\_req) + +List the Layouts for an MI Database or for one Table in a Database. + +* **Parameters:** + **\_req** ([`GetLayouts`](#module-ansys.grantami.backend.soap.GetLayouts) object) +* **Return type:** + [`GetLayoutsResponse`](#module-ansys.grantami.backend.soap.GetLayoutsResponse) object + +#### get_linked_records(\_req) + +Returns the linked records for specified records, for one or more record link groups. + +* **Parameters:** + **\_req** ([`GetLinkedRecordsRequest`](#module-ansys.grantami.backend.soap.GetLinkedRecordsRequest) object) +* **Return type:** + [`GetLinkedRecordsResponse`](#module-ansys.grantami.backend.soap.GetLinkedRecordsResponse) object + +#### get_meta_attributes(\_req) + +Returns the Meta-Attributes of one or more parent Attributes in a Table of a Granta MI Database. + +* **Parameters:** + **\_req** ([`GetMetaAttributesRequest`](#module-ansys.grantami.backend.soap.GetMetaAttributesRequest) object) +* **Return type:** + [`GetMetaAttributesResponse`](#module-ansys.grantami.backend.soap.GetMetaAttributesResponse) object + +#### get_parameter_details(\_req) + +Returns detailed information about the given Parameter(s) in a Granta MI Database. + +* **Parameters:** + **\_req** ([`GetParameterDetailsRequest`](#module-ansys.grantami.backend.soap.GetParameterDetailsRequest) object) +* **Return type:** + [`GetParameterDetailsResponse`](#module-ansys.grantami.backend.soap.GetParameterDetailsResponse) object + +#### get_record_attributes(\_req) + +Returns information about which Attributes have Data, for given Record(s). Includes information about when Data was created and retired, in a Version-Controlled Table. Does not retrieve values of the Data; for that, use the DataExport or EngineeringData services. + +* **Parameters:** + **\_req** ([`GetRecordAttributesRequest`](#module-ansys.grantami.backend.soap.GetRecordAttributesRequest) object) +* **Return type:** + [`GetRecordAttributesResponse`](#module-ansys.grantami.backend.soap.GetRecordAttributesResponse) object + +#### get_record_link_groups(\_req) + +Gets details of Record Link Groups in a Granta MI Database. + +* **Parameters:** + **\_req** ([`GetRecordLinkGroups`](#module-ansys.grantami.backend.soap.GetRecordLinkGroups) object) +* **Return type:** + [`GetRecordLinkGroupsResponse`](#module-ansys.grantami.backend.soap.GetRecordLinkGroupsResponse) object + +#### get_record_versions(\_req) + +Returns version information about the records specified in the request object. + +* **Parameters:** + **\_req** ([`GetRecordVersionsRequest`](#module-ansys.grantami.backend.soap.GetRecordVersionsRequest) object) +* **Return type:** + [`GetRecordVersionsResponse`](#module-ansys.grantami.backend.soap.GetRecordVersionsResponse) object + +#### get_root_node(\_req) + +Returns information about the root node of a particular Table in a Granta MI Database. This can be passed to get_child_nodes operation to find the contents of the rest of the node-tree of the Table. + +* **Parameters:** + **\_req** ([`GetRootNode`](#module-ansys.grantami.backend.soap.GetRootNode) object) +* **Return type:** + [`GetRootNodeResponse`](#module-ansys.grantami.backend.soap.GetRootNodeResponse) object + +#### get_subsets(\_req) + +List the Subsets for a Granta MI Database or for one Table in a Database. + +* **Parameters:** + **\_req** ([`GetSubsetsRequest`](#module-ansys.grantami.backend.soap.GetSubsetsRequest) object) +* **Return type:** + [`GetSubsetsResponse`](#module-ansys.grantami.backend.soap.GetSubsetsResponse) object + +#### get_tables(\_req) + +List the tables contained in a particular Granta MI Database. + +* **Parameters:** + **\_req** ([`GetTables`](#module-ansys.grantami.backend.soap.GetTables) object) +* **Return type:** + [`GetTablesResponse`](#module-ansys.grantami.backend.soap.GetTablesResponse) object + +#### get_tree_records(\_req) + +Returns name, record type, and some tree information for the given record(s). Does not retrieve the tree children; for that, use the get_child_records operation. + +* **Parameters:** + **\_req** ([`GetTreeRecordsRequest`](#module-ansys.grantami.backend.soap.GetTreeRecordsRequest) object) +* **Return type:** + [`GetTreeRecordsResponse`](#module-ansys.grantami.backend.soap.GetTreeRecordsResponse) object + +#### get_unit_conversions(\_req) + +Gets all the unit conversions available for a specified unit or unit system. + +* **Parameters:** + **\_req** ([`GetUnitConversionsRequest`](#module-ansys.grantami.backend.soap.GetUnitConversionsRequest) object) +* **Return type:** + [`GetUnitConversionsResponse`](#module-ansys.grantami.backend.soap.GetUnitConversionsResponse) object + +#### get_unit_systems(\_req) + +Returns information about the unit systems known to a Granta MI Database + +* **Parameters:** + **\_req** ([`GetUnitSystems`](#module-ansys.grantami.backend.soap.GetUnitSystems) object) +* **Return type:** + [`GetUnitSystemsResponse`](#module-ansys.grantami.backend.soap.GetUnitSystemsResponse) object + +#### get_units(\_req) + +Returns information about the units known to one or more Granta MI Databases + +* **Parameters:** + **\_req** ([`GetUnits`](#module-ansys.grantami.backend.soap.GetUnits) object) +* **Return type:** + [`GetUnitsResponse`](#module-ansys.grantami.backend.soap.GetUnitsResponse) object + +#### resolve_references(\_req) + +Checks whether the specified Granta MI entities exist in the database and, if so, whether the current user has read permissions or write permissions for it. + +* **Parameters:** + **\_req** ([`ResolveReferencesRequest`](#module-ansys.grantami.backend.soap.ResolveReferencesRequest) object) +* **Return type:** + [`ResolveReferencesResponse`](#module-ansys.grantami.backend.soap.ResolveReferencesResponse) object + + + + + +### SearchService + +### *class* SearchService(mi_session, retries=0) + +The Search service finds Records, within Granta MI Databases, matching specified criteria. + +#### criteria_search(\_req) + +Searches for records matching attribute-based criteria. + +* **Parameters:** + **\_req** ([`CriteriaSearch`](#module-ansys.grantami.backend.soap.CriteriaSearch) object) +* **Return type:** + [`SimpleTextSearchResponse`](#module-ansys.grantami.backend.soap.SimpleTextSearchResponse) object + +#### record_name_search(\_req) + +Searches for Records with a given exact Record name. + +* **Parameters:** + **\_req** ([`RecordNameSearchRequest`](#module-ansys.grantami.backend.soap.RecordNameSearchRequest) object) +* **Return type:** + [`SimpleTextSearchResponse`](#module-ansys.grantami.backend.soap.SimpleTextSearchResponse) object + +#### simple_text_search(\_req) + +Searches for records matching simple text criteria. + +* **Parameters:** + **\_req** ([`SimpleTextSearch`](#module-ansys.grantami.backend.soap.SimpleTextSearch) object) +* **Return type:** + [`SimpleTextSearchResponse`](#module-ansys.grantami.backend.soap.SimpleTextSearchResponse) object + + + + + +### DataImportService + +### *class* DataImportService(mi_session, retries=0) + +The DataImport service writes data to attributes of records in Granta MI Databases. + +#### delete_or_withdraw_if_latest_record_version(\_req) + +Deletes or withdraws the latest version of the specified record(s). In a version-controlled table, the latest version of a record can be seen by Write users in Edit mode of MI Viewer. This operation will revert (or delete) unreleased record versions, withdraw released versions, and skip withdrawn versions. In a non-version-controlled table, records will only have one version. This operation will delete specified records of this type. Note: this operation will only act on the latest record version. In the case where the specified record corresponds to a record version that is an earlier version, the operation will return a fault. + +* **Parameters:** + **\_req** ([`DeleteOrWithdrawIfLatestRecordVersionRequest`](#module-ansys.grantami.backend.soap.DeleteOrWithdrawIfLatestRecordVersionRequest) object) +* **Return type:** + [`DeleteOrWithdrawIfLatestRecordVersionResponse`](#module-ansys.grantami.backend.soap.DeleteOrWithdrawIfLatestRecordVersionResponse) object + +#### ensure_record_folder_paths(\_req) + +Checks whether given hierarchies of folders exist, creating them if not. Each hierarchy is specified as a sequence of tree names; where the folder needs to be created, this name is also used as the full name of the created folder. New folders will be assigned to their parents’ subsets; existing folders are not assigned or removed from any subsets. If a colour is specified, new folders will be of that colour; existing folders’ colours are never changed. Note: this operation can accept an arbitrary number of Record Folder paths to be ensured, but in practice there is a limit to the amount of changes that can be done in a single operation. + +* **Parameters:** + **\_req** ([`EnsureRecordFolderPathsRequest`](#module-ansys.grantami.backend.soap.EnsureRecordFolderPathsRequest) object) +* **Return type:** + [`EnsureRecordFolderPathsResponse`](#module-ansys.grantami.backend.soap.EnsureRecordFolderPathsResponse) object + +#### get_upload_addresses(\_req) + +Returns an address to which a datum can be uploaded, for each combination of given sets of records and attributes in a Granta MI database. Each address will be an HTTP or HTTPS URL. The upload service only supports a subset of all available Granta MI attribute types, but this operation will give an address for an attribute of any type. + +* **Parameters:** + **\_req** ([`GetUploadAddressesRequest`](#module-ansys.grantami.backend.soap.GetUploadAddressesRequest) object) +* **Return type:** + [`GetUploadAddressesResponse`](#module-ansys.grantami.backend.soap.GetUploadAddressesResponse) object + +#### modify_record_links(\_req) + +Adds or removes static Links between record(s) in a Granta MI Database. + +* **Parameters:** + **\_req** ([`ModifyRecordLinksRequest`](#module-ansys.grantami.backend.soap.ModifyRecordLinksRequest) object) +* **Return type:** + [`ModifyRecordLinksResponse`](#module-ansys.grantami.backend.soap.ModifyRecordLinksResponse) object + +#### set_record_attributes(\_req) + +Sets the data values for the given attribute(s) and record(s) in a Granta MI Database. This method will create any records or folders which do not already exist in the database (however, new folders should be created with ‘EnsureRecordFolderPaths’ instead). Note: This operation can accept an arbitrary number of attributes and records to be imported, but in practice there is a fairly low limit to the amount of data that can be imported in a single operation. Client code should perform large imports in small chunks. + +* **Parameters:** + **\_req** ([`SetRecordAttributesRequest`](#module-ansys.grantami.backend.soap.SetRecordAttributesRequest) object) +* **Return type:** + [`SetRecordAttributesResponse`](#module-ansys.grantami.backend.soap.SetRecordAttributesResponse) object + + + + + +### DataExportService + +### *class* DataExportService(mi_session, retries=0) + +The DataExport service retrieves and returns data from attributes of records in Granta MI Databases. + +#### get_record_attributes_by_ref(\_req) + +Retrieves the data values for the given attribute(s) and record(s) in a Granta MI Database. + +* **Parameters:** + **\_req** ([`GetRecordAttributesByRefRequest`](#module-ansys.grantami.backend.soap.GetRecordAttributesByRefRequest) object) +* **Return type:** + [`GetRecordAttributesByRefResponse`](#module-ansys.grantami.backend.soap.GetRecordAttributesByRefResponse) object + + + + + +### EngineeringDataService + +### *class* EngineeringDataService(mi_session, retries=0) + +The EngineeringData service provides custom data export operations for a Granta MI Server. + +#### export_record_data(\_req) + +Performs an FEA Export and returns the result as the response. + +* **Parameters:** + **\_req** ([`ExportRecordDataRequest`](#module-ansys.grantami.backend.soap.ExportRecordDataRequest) object) +* **Return type:** + [`ExportRecordDataResponse`](#module-ansys.grantami.backend.soap.ExportRecordDataResponse) object + +#### exporters_for_records(\_req) + +Returns the FEA Exporter configurations, known to the MI Server, filtering for their applicability to given Record(s) and optionally to particular situations. + +* **Parameters:** + **\_req** ([`ExportersForRecordsRequest`](#module-ansys.grantami.backend.soap.ExportersForRecordsRequest) object) +* **Return type:** + [`ExportersForRecordsResponse`](#module-ansys.grantami.backend.soap.ExportersForRecordsResponse) object + +#### get_available_exporters(\_req) + +Returns the FEA Exporter configurations known to the MI Server, optionally filtering for their applicability to particular situations. + +* **Parameters:** + **\_req** ([`GetAvailableExportersRequest`](#module-ansys.grantami.backend.soap.GetAvailableExportersRequest) object) +* **Return type:** + [`GetAvailableExportersResponse`](#module-ansys.grantami.backend.soap.GetAvailableExportersResponse) object + +#### get_exporter_parameters(\_req) + +Returns information about the MI Parameter Values that will need to be chosen, to run the specified Exporter on the specified Record(s). + +* **Parameters:** + **\_req** ([`GetExporterParametersRequest`](#module-ansys.grantami.backend.soap.GetExporterParametersRequest) object) +* **Return type:** + [`GetExporterParametersResponse`](#module-ansys.grantami.backend.soap.GetExporterParametersResponse) object + + + + + +### RecordManipulatorService + +### *class* RecordManipulatorService(mi_session, retries=0) + +The Record Manipulator service provides a way to move a record whilst preserving its metadata and attribute values. + +#### move_record(\_req) + +Reparents a record. Metadata such as creation date will be preserved, along with attribute values. + +* **Parameters:** + **\_req** ([`RecordMoveRequest`](#module-ansys.grantami.backend.soap.RecordMoveRequest) object) +* **Return type:** + [`EmptyRestResponse`](#module-ansys.grantami.backend.soap.EmptyRestResponse) object + + + +## Objects reference + + + + + +### AssociatedRecords + + + +### *class* AssociatedRecords(associated_records=None, source_record=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Object containing a source [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) object and an array +of associated [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) objects. + +* **Parameters:** + * **associated_records** (list of [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference)) + * **source_record** ([`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference)) + + + +#### *property* associated_records *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[RecordReference](#ansys.grantami.backend.soap.RecordReference.RecordReference)]* + +Property associated_records is a list of [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) + + + +#### *property* source_record *: [RecordReference](#ansys.grantami.backend.soap.RecordReference.RecordReference)* + +Property source_record is of type [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference). + +* **Return type:** + [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) + + + + + +### AttributeAddress + + + +### *class* AttributeAddress(url=None, attribute_id=None, attribute_name=None, attribute_standard_name=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +The upload URL of an attribute and an attribute identifier. +The attribute is identified by the identity, name, and where available, standard name. + +* **Parameters:** + * **url** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **attribute_id** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **attribute_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **attribute_standard_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *property* attribute_id *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property attribute_id is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* attribute_name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property attribute_name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* attribute_standard_name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property attribute_standard_name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* url *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property url is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### AttributeCategory + + + +### *class* AttributeCategory(category_attribute_details=None, name=None, order=None, record_link_group_details=None, display_names=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Gives the details of contents of a category in a layout. Does not include Tabular Data Association +Chains. + +* **Parameters:** + * **category_attribute_details** (list of [`CategoryAttributeDetail`](#module-ansys.grantami.backend.soap.CategoryAttributeDetail)) + * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **order** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **record_link_group_details** (list of [`RecordLinkGroupDetail`](#module-ansys.grantami.backend.soap.RecordLinkGroupDetail)) + * **display_names** (list of [`DisplayName`](#module-ansys.grantami.backend.soap.DisplayName)) + + + +#### add_category_attribute_detail(\_categoryAttributeDetail) + +Appends \_categoryAttributeDetail to categoryAttributeDetails property on AttributeCategory C-object. + +* **Parameters:** + **\_categoryAttributeDetail** ([`CategoryAttributeDetail`](#module-ansys.grantami.backend.soap.CategoryAttributeDetail)) + + + +#### add_record_link_group_detail(\_recordLinkGroupDetail) + +Appends \_recordLinkGroupDetail to recordLinkGroupDetails property on AttributeCategory C-object. + +* **Parameters:** + **\_recordLinkGroupDetail** ([`RecordLinkGroupDetail`](#module-ansys.grantami.backend.soap.RecordLinkGroupDetail)) + + + +#### *property* category_attribute_details *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[CategoryAttributeDetail](#ansys.grantami.backend.soap.CategoryAttributeDetail.CategoryAttributeDetail)]* + +Property category_attribute_details is a list of [`CategoryAttributeDetail`](#module-ansys.grantami.backend.soap.CategoryAttributeDetail) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`CategoryAttributeDetail`](#module-ansys.grantami.backend.soap.CategoryAttributeDetail) + + + +#### *property* display_names *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[DisplayName](#ansys.grantami.backend.soap.DisplayName.DisplayName)]* + +Property display_names is a list of [`DisplayName`](#module-ansys.grantami.backend.soap.DisplayName) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`DisplayName`](#module-ansys.grantami.backend.soap.DisplayName) + + + +#### *property* name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* order *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property order is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* record_link_group_details *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[RecordLinkGroupDetail](#ansys.grantami.backend.soap.RecordLinkGroupDetail.RecordLinkGroupDetail)]* + +Property record_link_group_details is a list of [`RecordLinkGroupDetail`](#module-ansys.grantami.backend.soap.RecordLinkGroupDetail) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`RecordLinkGroupDetail`](#module-ansys.grantami.backend.soap.RecordLinkGroupDetail) + + + + + +### AttributeDetail + + + +### *class* AttributeDetail(about=None, attribute=None, axis_name=None, chartable=None, database_unit=None, default_threshold=None, discrete_values=None, identity=None, is_meta=None, is_multi_valued=None, is_searchable=None, is_unique=None, min_max=None, name=None, order=None, revision_info=None, tabular=None, type_=None, is_functional_range=None, is_ordered=None, display_names=None, data_rule=None, help_info=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Detailed meta-information about an attribute in a Granta MI database. +Does not include values of the attribute. For requests, the name, and type are required. + +* **Parameters:** + * **about** ([`NamedAttribute`](#module-ansys.grantami.backend.soap.NamedAttribute)) + * **attribute** ([`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference)) + * **axis_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **chartable** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **database_unit** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **default_threshold** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **discrete_values** ([*list*](https://docs.python.org/3/library/stdtypes.html#list) *of* [*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **identity** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **is_meta** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **is_multi_valued** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **is_searchable** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **is_unique** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **min_max** ([`MinMax`](#module-ansys.grantami.backend.soap.MinMax)) + * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **order** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **revision_info** ([`RevisionInfo`](#module-ansys.grantami.backend.soap.RevisionInfo)) + * **tabular** ([`TabularDetail`](#module-ansys.grantami.backend.soap.TabularDetail)) + * **type** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **is_functional_range** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **is_ordered** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **display_names** (list of [`DisplayName`](#module-ansys.grantami.backend.soap.DisplayName)) + * **data_rule** ([`DataRule`](#module-ansys.grantami.backend.soap.DataRule)) + * **help_info** ([`HelpInfo`](#module-ansys.grantami.backend.soap.HelpInfo)) + + + +#### *property* about *: [NamedAttribute](#ansys.grantami.backend.soap.NamedAttribute.NamedAttribute)* + +Property about is of type [`NamedAttribute`](#module-ansys.grantami.backend.soap.NamedAttribute). Only populated if ‘isMeta’ is True. + +* **Return type:** + [`NamedAttribute`](#module-ansys.grantami.backend.soap.NamedAttribute) + + + +#### *property* attribute *: [AttributeReference](#ansys.grantami.backend.soap.AttributeReference.AttributeReference)* + +Property attribute is of type [`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference). + +* **Return type:** + [`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference) + + + +#### *property* axis_name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property axis_name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* chartable *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property chartable is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* data_rule *: [DataRule](#ansys.grantami.backend.soap.DataRule.DataRule)* + +Property data_rule is of type [`DataRule`](#module-ansys.grantami.backend.soap.DataRule). + +* **Return type:** + [`DataRule`](#module-ansys.grantami.backend.soap.DataRule) + + + +#### *property* database_unit *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property database_unit is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* default_threshold *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property default_threshold is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* discrete_values *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str)]* + +Property discrete_values is a list of str objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + [list](https://docs.python.org/3/library/stdtypes.html#list) of [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* display_names *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[DisplayName](#ansys.grantami.backend.soap.DisplayName.DisplayName)]* + +Property display_names is a list of [`DisplayName`](#module-ansys.grantami.backend.soap.DisplayName) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`DisplayName`](#module-ansys.grantami.backend.soap.DisplayName) + + + +#### *property* help_info *: [HelpInfo](#ansys.grantami.backend.soap.HelpInfo.HelpInfo)* + +Property help_info is of type [`HelpInfo`](#module-ansys.grantami.backend.soap.HelpInfo). + +* **Return type:** + [`HelpInfo`](#module-ansys.grantami.backend.soap.HelpInfo) + + + +#### *property* identity *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property identity is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* is_functional_range *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property is_functional_range is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* is_meta *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property is_meta is of type bool. If this is True, the ‘about’ property may have additional information about the related parent attribute. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* is_multi_valued *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property is_multi_valued is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* is_ordered *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property is_ordered is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* is_searchable *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property is_searchable is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* is_unique *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property is_unique is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* min_max *: [MinMax](#ansys.grantami.backend.soap.MinMax.MinMax)* + +Property min_max is of type [`MinMax`](#module-ansys.grantami.backend.soap.MinMax). + +* **Return type:** + [`MinMax`](#module-ansys.grantami.backend.soap.MinMax) + + + +#### *property* name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* order *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property order is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* revision_info *: [RevisionInfo](#ansys.grantami.backend.soap.RevisionInfo.RevisionInfo)* + +Property revision_info is of type [`RevisionInfo`](#module-ansys.grantami.backend.soap.RevisionInfo). + +* **Return type:** + [`RevisionInfo`](#module-ansys.grantami.backend.soap.RevisionInfo) + + + +#### *property* tabular *: [TabularDetail](#ansys.grantami.backend.soap.TabularDetail.TabularDetail)* + +Property tabular is of type [`TabularDetail`](#module-ansys.grantami.backend.soap.TabularDetail). + +* **Return type:** + [`TabularDetail`](#module-ansys.grantami.backend.soap.TabularDetail) + + + +#### *property* type_ *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property type_ is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### AttributeExporterParameters + + + +### *class* AttributeExporterParameters(attribute=None, data_presence=None, graph_domains=None, parameters=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +A type to contain an attribute along with associated parameters and domains. +All [`Parameters`](#module-ansys.grantami.backend.soap.Parameters) are declared on the MI parameterised Attribute, +even if not used in some combination of [`Exporter`](#module-ansys.grantami.backend.soap.Exporter) and Record. +It also contains the possible domains in which the fixed Parameter values must be chosen. + +* **Parameters:** + * **attribute** ([`NamedAttribute`](#module-ansys.grantami.backend.soap.NamedAttribute)) + * **data_presence** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **graph_domains** (list of [`GraphDomain`](#module-ansys.grantami.backend.soap.GraphDomain)) + * **parameters** (list of [`ExporterParameter`](#module-ansys.grantami.backend.soap.ExporterParameter)) + + + +#### *class* DataPresence + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + + + +#### DataIncompatibleWithConfiguration *= 4* + + + +#### Missing *= 3* + + + +#### NotApplicable *= 2* + + + +#### Present *= 1* + + + +#### Unknown *= 0* + + + +#### add_graph_domain(\_graphDomain) + +Appends \_graphDomain to graphDomains property on AttributeExporterParameters C-object. + +* **Parameters:** + **\_graphDomain** ([`GraphDomain`](#module-ansys.grantami.backend.soap.GraphDomain)) + + + +#### add_parameter(\_exporterParameter) + +Appends \_exporterParameter to parameters property on AttributeExporterParameters C-object. + +* **Parameters:** + **\_exporterParameter** ([`ExporterParameter`](#module-ansys.grantami.backend.soap.ExporterParameter)) + + + +#### *property* attribute *: [NamedAttribute](#ansys.grantami.backend.soap.NamedAttribute.NamedAttribute)* + +Property attribute is of type [`NamedAttribute`](#module-ansys.grantami.backend.soap.NamedAttribute). + +* **Return type:** + [`NamedAttribute`](#module-ansys.grantami.backend.soap.NamedAttribute) + + + +#### *property* data_presence *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property data_presence is of type int. See [`AttributeExporterParameters.DataPresence`](#ansys.grantami.backend.soap.AttributeExporterParameters.AttributeExporterParameters.DataPresence) for supported values. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* graph_domains *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[GraphDomain](#ansys.grantami.backend.soap.GraphDomain.GraphDomain)]* + +Property graph_domains is a list of [`GraphDomain`](#module-ansys.grantami.backend.soap.GraphDomain) objects. Each graph domain contains information on the possible values that the corresponding parameter (by list index) can take. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`GraphDomain`](#module-ansys.grantami.backend.soap.GraphDomain) + + + +#### *property* parameters *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[ExporterParameter](#ansys.grantami.backend.soap.ExporterParameter.ExporterParameter)]* + +Property parameters is a list of [`ExporterParameter`](#module-ansys.grantami.backend.soap.ExporterParameter) objects. This is a list of parameters that parameterize the attribute in question. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`ExporterParameter`](#module-ansys.grantami.backend.soap.ExporterParameter) + + + + + +### AttributeMetaAttributes + + + +### *class* AttributeMetaAttributes(meta_attributes=None, parent_attribute=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Lists the Meta-Attributes of a particular Attribute in a Granta MI Database Table. + +* **Parameters:** + * **meta_attributes** (list of [`NamedAttribute`](#module-ansys.grantami.backend.soap.NamedAttribute)) + * **parent_attribute** ([`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference)) + + + +#### *property* meta_attributes *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[NamedAttribute](#ansys.grantami.backend.soap.NamedAttribute.NamedAttribute)]* + +Property meta_attributes is a list of [`NamedAttribute`](#module-ansys.grantami.backend.soap.NamedAttribute) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`NamedAttribute`](#module-ansys.grantami.backend.soap.NamedAttribute) + + + +#### *property* parent_attribute *: [AttributeReference](#ansys.grantami.backend.soap.AttributeReference.AttributeReference)* + +Property parent_attribute is of type [`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference). + +* **Return type:** + [`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference) + + + + + +### AttributeReference + + + +### *class* AttributeReference(db_key=None, attribute_id=None, is_standard_name=None, name=None, partial_table_reference=None, pseudo_attribute=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Identification of a particular attribute in a Granta MI database. +For requests, a db_key is required and either the attribute ID or the attribute name. If the name is +not a standard name, then a partial_table_reference is also required. + +* **Parameters:** + * **db_key** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **attribute_id** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **is_standard_name** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **partial_table_reference** ([`PartialTableReference`](#module-ansys.grantami.backend.soap.PartialTableReference)) + * **pseudo_attribute** ([*int*](https://docs.python.org/3/library/functions.html#int)) + + + +#### *class* MIPseudoAttributeReference + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + + + +#### createdDate *= 21* + + + +#### creator *= 22* + + + +#### lastModifier *= 23* + + + +#### modifiedDate *= 4* + + + +#### name *= 0* + + + +#### parentName *= 17* + + + +#### parentRecordHistoryGUID *= 20* + + + +#### parentRecordHistoryIdentity *= 19* + + + +#### parentShortName *= 18* + + + +#### recordColor *= 7* + + + +#### recordGUID *= 10* + + + +#### recordHistoryGUID *= 11* + + + +#### recordHistoryIdentity *= 6* + + + +#### recordType *= 5* + + + +#### recordVersionNumber *= 12* + + + +#### releasedDate *= 3* + + + +#### shortName *= 1* + + + +#### subsets *= 2* + + + +#### tableName *= 13* + + + +#### writable *= 16* + + + +#### *property* attribute_id *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property attribute_id is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* db_key *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property db_key is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* is_standard_name *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property is_standard_name is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* partial_table_reference *: [PartialTableReference](#ansys.grantami.backend.soap.PartialTableReference.PartialTableReference)* + +Property partial_table_reference is of type [`PartialTableReference`](#module-ansys.grantami.backend.soap.PartialTableReference). + +* **Return type:** + [`PartialTableReference`](#module-ansys.grantami.backend.soap.PartialTableReference) + + + +#### *property* pseudo_attribute *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property pseudo_attribute is of type int. See [`AttributeReference.MIPseudoAttributeReference`](#ansys.grantami.backend.soap.AttributeReference.AttributeReference.MIPseudoAttributeReference) for supported values. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + + + +### AttributeValue + + + +### *class* AttributeValue(attribute_id=None, attribute_name=None, attribute_standard_name=None, data_type=None, discrete_data_value=None, hyperlink_data_value=None, integer_data_value=None, logical_data_value=None, date_data_value=None, date_time_data_value=None, discrete_functional_gridded_data_value=None, discrete_functional_series_data_value=None, file_data_value=None, float_functional_gridded_data_value=None, float_functional_series_data_value=None, long_text_data_value=None, picture_data_value=None, point_data_value=None, range_data_value=None, short_text_data_value=None, subsets_data_value=None, tabular_data_value=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Type representing the value of a piece of data for a particular attribute. Access supported data +types, and the attribute identity by Name, ID, or Standard Name. + +* **Parameters:** + * **attribute_id** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **attribute_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **attribute_standard_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **data_type** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **discrete_data_value** ([`DiscreteDataType`](#module-ansys.grantami.backend.soap.DiscreteDataType)) + * **hyperlink_data_value** ([`HyperlinkDataType`](#module-ansys.grantami.backend.soap.HyperlinkDataType)) + * **integer_data_value** ([`IntegerDataType`](#module-ansys.grantami.backend.soap.IntegerDataType)) + * **logical_data_value** ([`LogicalDataType`](#module-ansys.grantami.backend.soap.LogicalDataType)) + * **date_data_value** ([`DateDataType`](#module-ansys.grantami.backend.soap.DateDataType)) + * **date_time_data_value** ([`DateTimeDataType`](#module-ansys.grantami.backend.soap.DateTimeDataType)) + * **discrete_functional_gridded_data_value** ([`DiscreteFunctionalGriddedDataType`](#module-ansys.grantami.backend.soap.DiscreteFunctionalGriddedDataType)) + * **discrete_functional_series_data_value** ([`DiscreteFunctionalSeriesDataType`](#module-ansys.grantami.backend.soap.DiscreteFunctionalSeriesDataType)) + * **file_data_value** ([`FileDataType`](#module-ansys.grantami.backend.soap.FileDataType)) + * **float_functional_gridded_data_value** ([`FloatFunctionalGriddedDataType`](#module-ansys.grantami.backend.soap.FloatFunctionalGriddedDataType)) + * **float_functional_series_data_value** ([`FloatFunctionalSeriesDataType`](#module-ansys.grantami.backend.soap.FloatFunctionalSeriesDataType)) + * **long_text_data_value** ([`LongTextDataType`](#module-ansys.grantami.backend.soap.LongTextDataType)) + * **picture_data_value** ([`PictureDataType`](#module-ansys.grantami.backend.soap.PictureDataType)) + * **point_data_value** ([`PointDataType`](#module-ansys.grantami.backend.soap.PointDataType)) + * **range_data_value** ([`RangeDataType`](#module-ansys.grantami.backend.soap.RangeDataType)) + * **short_text_data_value** ([`ShortTextDataType`](#module-ansys.grantami.backend.soap.ShortTextDataType)) + * **subsets_data_value** ([`SubsetsDataType`](#module-ansys.grantami.backend.soap.SubsetsDataType)) + * **tabular_data_value** ([`TabularDataType`](#module-ansys.grantami.backend.soap.TabularDataType)) + + + +#### *property* attribute_id *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property attribute_id is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* attribute_name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property attribute_name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* attribute_standard_name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property attribute_standard_name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* data_type *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property data_type is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* date_data_value *: [DateDataType](#ansys.grantami.backend.soap.DateDataType.DateDataType)* + +Property date_data_value is of type [`DateDataType`](#module-ansys.grantami.backend.soap.DateDataType). + +* **Return type:** + [`DateDataType`](#module-ansys.grantami.backend.soap.DateDataType) + + + +#### *property* date_time_data_value *: [DateTimeDataType](#ansys.grantami.backend.soap.DateTimeDataType.DateTimeDataType)* + +Property date_time_data_value is of type [`DateTimeDataType`](#module-ansys.grantami.backend.soap.DateTimeDataType). + +* **Return type:** + [`DateTimeDataType`](#module-ansys.grantami.backend.soap.DateTimeDataType) + + + +#### *property* discrete_data_value *: [DiscreteDataType](#ansys.grantami.backend.soap.DiscreteDataType.DiscreteDataType)* + +Property discrete_data_value is of type [`DiscreteDataType`](#module-ansys.grantami.backend.soap.DiscreteDataType). + +* **Return type:** + [`DiscreteDataType`](#module-ansys.grantami.backend.soap.DiscreteDataType) + + + +#### *property* discrete_functional_gridded_data_value *: [DiscreteFunctionalGriddedDataType](#ansys.grantami.backend.soap.DiscreteFunctionalGriddedDataType.DiscreteFunctionalGriddedDataType)* + +Property discrete_functional_gridded_data_value is of type [`DiscreteFunctionalGriddedDataType`](#module-ansys.grantami.backend.soap.DiscreteFunctionalGriddedDataType). + +* **Return type:** + [`DiscreteFunctionalGriddedDataType`](#module-ansys.grantami.backend.soap.DiscreteFunctionalGriddedDataType) + + + +#### *property* discrete_functional_series_data_value *: [DiscreteFunctionalSeriesDataType](#ansys.grantami.backend.soap.DiscreteFunctionalSeriesDataType.DiscreteFunctionalSeriesDataType)* + +Property discrete_functional_series_data_value is of type [`DiscreteFunctionalSeriesDataType`](#module-ansys.grantami.backend.soap.DiscreteFunctionalSeriesDataType). + +* **Return type:** + [`DiscreteFunctionalSeriesDataType`](#module-ansys.grantami.backend.soap.DiscreteFunctionalSeriesDataType) + + + +#### *property* file_data_value *: [FileDataType](#ansys.grantami.backend.soap.FileDataType.FileDataType)* + +Property file_data_value is of type [`FileDataType`](#module-ansys.grantami.backend.soap.FileDataType). + +* **Return type:** + [`FileDataType`](#module-ansys.grantami.backend.soap.FileDataType) + + + +#### *property* float_functional_gridded_data_value *: [FloatFunctionalGriddedDataType](#ansys.grantami.backend.soap.FloatFunctionalGriddedDataType.FloatFunctionalGriddedDataType)* + +Property float_functional_gridded_data_value is of type [`FloatFunctionalGriddedDataType`](#module-ansys.grantami.backend.soap.FloatFunctionalGriddedDataType). + +* **Return type:** + [`FloatFunctionalGriddedDataType`](#module-ansys.grantami.backend.soap.FloatFunctionalGriddedDataType) + + + +#### *property* float_functional_series_data_value *: [FloatFunctionalSeriesDataType](#ansys.grantami.backend.soap.FloatFunctionalSeriesDataType.FloatFunctionalSeriesDataType)* + +Property float_functional_series_data_value is of type [`FloatFunctionalSeriesDataType`](#module-ansys.grantami.backend.soap.FloatFunctionalSeriesDataType). + +* **Return type:** + [`FloatFunctionalSeriesDataType`](#module-ansys.grantami.backend.soap.FloatFunctionalSeriesDataType) + + + +#### *property* hyperlink_data_value *: [HyperlinkDataType](#ansys.grantami.backend.soap.HyperlinkDataType.HyperlinkDataType)* + +Property hyperlink_data_value is of type [`HyperlinkDataType`](#module-ansys.grantami.backend.soap.HyperlinkDataType). + +* **Return type:** + [`HyperlinkDataType`](#module-ansys.grantami.backend.soap.HyperlinkDataType) + + + +#### *property* integer_data_value *: [IntegerDataType](#ansys.grantami.backend.soap.IntegerDataType.IntegerDataType)* + +Property integer_data_value is of type [`IntegerDataType`](#module-ansys.grantami.backend.soap.IntegerDataType). + +* **Return type:** + [`IntegerDataType`](#module-ansys.grantami.backend.soap.IntegerDataType) + + + +#### *property* logical_data_value *: [LogicalDataType](#ansys.grantami.backend.soap.LogicalDataType.LogicalDataType)* + +Property logical_data_value is of type [`LogicalDataType`](#module-ansys.grantami.backend.soap.LogicalDataType). + +* **Return type:** + [`LogicalDataType`](#module-ansys.grantami.backend.soap.LogicalDataType) + + + +#### *property* long_text_data_value *: [LongTextDataType](#ansys.grantami.backend.soap.LongTextDataType.LongTextDataType)* + +Property long_text_data_value is of type [`LongTextDataType`](#module-ansys.grantami.backend.soap.LongTextDataType). + +* **Return type:** + [`LongTextDataType`](#module-ansys.grantami.backend.soap.LongTextDataType) + + + +#### *property* picture_data_value *: [PictureDataType](#ansys.grantami.backend.soap.PictureDataType.PictureDataType)* + +Property picture_data_value is of type [`PictureDataType`](#module-ansys.grantami.backend.soap.PictureDataType). + +* **Return type:** + [`PictureDataType`](#module-ansys.grantami.backend.soap.PictureDataType) + + + +#### *property* point_data_value *: [PointDataType](#ansys.grantami.backend.soap.PointDataType.PointDataType)* + +Property point_data_value is of type [`PointDataType`](#module-ansys.grantami.backend.soap.PointDataType). + +* **Return type:** + [`PointDataType`](#module-ansys.grantami.backend.soap.PointDataType) + + + +#### *property* range_data_value *: [RangeDataType](#ansys.grantami.backend.soap.RangeDataType.RangeDataType)* + +Property range_data_value is of type [`RangeDataType`](#module-ansys.grantami.backend.soap.RangeDataType). + +* **Return type:** + [`RangeDataType`](#module-ansys.grantami.backend.soap.RangeDataType) + + + +#### *property* short_text_data_value *: [ShortTextDataType](#ansys.grantami.backend.soap.ShortTextDataType.ShortTextDataType)* + +Property short_text_data_value is of type [`ShortTextDataType`](#module-ansys.grantami.backend.soap.ShortTextDataType). + +* **Return type:** + [`ShortTextDataType`](#module-ansys.grantami.backend.soap.ShortTextDataType) + + + +#### *property* subsets_data_value *: [SubsetsDataType](#ansys.grantami.backend.soap.SubsetsDataType.SubsetsDataType)* + +Property subsets_data_value is of type [`SubsetsDataType`](#module-ansys.grantami.backend.soap.SubsetsDataType). + +* **Return type:** + [`SubsetsDataType`](#module-ansys.grantami.backend.soap.SubsetsDataType) + + + +#### *property* tabular_data_value *: [TabularDataType](#ansys.grantami.backend.soap.TabularDataType.TabularDataType)* + +Property tabular_data_value is of type [`TabularDataType`](#module-ansys.grantami.backend.soap.TabularDataType). + +* **Return type:** + [`TabularDataType`](#module-ansys.grantami.backend.soap.TabularDataType) + + + + + +### BetweenDateTimesSearchValue + + + +### *class* BetweenDateTimesSearchValue(high_end=None, low_end=None, tabular_column=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Search criterion to search for data between two times. +This criterion type is specific to DateTime Attributes. Both a low_end and a high_end value are +required. The date format is in XSD’s dateTime data type (YYYY-MM-DDThh:mm:ss). + +* **Parameters:** + * **high_end** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **low_end** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **tabular_column** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *property* high_end *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property high_end is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* low_end *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property low_end is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* tabular_column *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property tabular_column is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### BetweenSearchValue + + + +### *class* BetweenSearchValue(high_end=None, low_end=None, tabular_column=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Search criterion to search for data between two values. +Only Point, Range, and Integer attributes are supported by this search criteria. Both a low_end and +a high_end value are required. + +* **Parameters:** + * **high_end** ([`HighEndSearchValue`](#module-ansys.grantami.backend.soap.HighEndSearchValue)) + * **low_end** ([`LowEndSearchValue`](#module-ansys.grantami.backend.soap.LowEndSearchValue)) + * **tabular_column** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *property* high_end *: [HighEndSearchValue](#ansys.grantami.backend.soap.HighEndSearchValue.HighEndSearchValue)* + +Property high_end is of type [`HighEndSearchValue`](#module-ansys.grantami.backend.soap.HighEndSearchValue). + +* **Return type:** + [`HighEndSearchValue`](#module-ansys.grantami.backend.soap.HighEndSearchValue) + + + +#### *property* low_end *: [LowEndSearchValue](#ansys.grantami.backend.soap.LowEndSearchValue.LowEndSearchValue)* + +Property low_end is of type [`LowEndSearchValue`](#module-ansys.grantami.backend.soap.LowEndSearchValue). + +* **Return type:** + [`LowEndSearchValue`](#module-ansys.grantami.backend.soap.LowEndSearchValue) + + + +#### *property* tabular_column *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property tabular_column is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### BinaryDataSettings + + + +### *class* BinaryDataSettings(binary_data_representation=None, max_image_size=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Settings for exporting file and picture data. + +* **Parameters:** + * **binary_data_representation** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **max_image_size** ([`RasterSize`](#module-ansys.grantami.backend.soap.RasterSize)) + + + +#### *property* binary_data_representation *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property binary_data_representation is of type int. See [`GRANTA_Constants`](#module-ansys.grantami.backend.soap.GRANTA_Constants) for supported values. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* max_image_size *: [RasterSize](#ansys.grantami.backend.soap.RasterSize.RasterSize)* + +Property max_image_size is of type [`RasterSize`](#module-ansys.grantami.backend.soap.RasterSize). + +* **Return type:** + [`RasterSize`](#module-ansys.grantami.backend.soap.RasterSize) + + + +### BrowseService + + + + + +### *class* BrowseService(mi_session, retries=0) + +Bases: [`Service`](#ansys.grantami.backend.soap.Service.Service) + +The Browse service provides read-only operation for a Granta MI Server. + + + +#### get_associated_records(\_req) + +Returns all the Records, in a single target Table, that are associated with each of a given set of source Records, via Tabular Data links. These links can be in the forward or reverse direction. Note that, if there is more than one Tabular Attribute linking the source and target Tables, the Associated Records are the union of all those linked by each of the Tabular Attributes. + +* **Parameters:** + **\_req** ([`GetAssociatedRecordsRequest`](#module-ansys.grantami.backend.soap.GetAssociatedRecordsRequest) object) +* **Return type:** + [`GetAssociatedRecordsResponse`](#module-ansys.grantami.backend.soap.GetAssociatedRecordsResponse) object + + + +#### get_attribute_details(\_req) + +Returns detailed meta-information about given Attribute(s) in a Granta MI Database. Does not retrieve values of the Data; for that, use the DataExport service. + +* **Parameters:** + **\_req** ([`GetAttributeDetailsRequest`](#module-ansys.grantami.backend.soap.GetAttributeDetailsRequest) object) +* **Return type:** + [`GetAttributeDetailsResponse`](#module-ansys.grantami.backend.soap.GetAttributeDetailsResponse) object + + + +#### get_attribute_parameters(\_req) + +Gets detailed information about the Parameters that are declared to be usable with given Attribute(s) in a Granta MI Database. Can only be used with Functional Attributes or Multi-Valued Attributes. + +* **Parameters:** + **\_req** ([`GetAttributeParametersRequest`](#module-ansys.grantami.backend.soap.GetAttributeParametersRequest) object) +* **Return type:** + [`GetAttributeParametersResponse`](#module-ansys.grantami.backend.soap.GetAttributeParametersResponse) object + + + +#### get_child_nodes(\_req) + +Returns information about the child nodes of the given node in the node-tree of a Granta MI Table. + +* **Parameters:** + **\_req** ([`GetChildNodes`](#module-ansys.grantami.backend.soap.GetChildNodes) object) +* **Return type:** + [`GetChildNodesResponse`](#module-ansys.grantami.backend.soap.GetChildNodesResponse) object + + + +#### get_currencies() + +Returns the currencies available in the Granta MI Server. + +* **Return type:** + [`GetCurrenciesResponse`](#module-ansys.grantami.backend.soap.GetCurrenciesResponse) object + + + +#### get_database_parameters(\_req) + +List the parameter(s) in a Granta MI Database. + +* **Parameters:** + **\_req** ([`GetDatabaseParameters`](#module-ansys.grantami.backend.soap.GetDatabaseParameters) object) +* **Return type:** + [`GetDatabaseParametersResponse`](#module-ansys.grantami.backend.soap.GetDatabaseParametersResponse) object + + + +#### get_databases() + +List the databases available on the Granta MI Server. + +* **Return type:** + [`GetDatabasesResponse`](#module-ansys.grantami.backend.soap.GetDatabasesResponse) object + + + +#### get_datasheet_path(\_req) + +For each record reference gets the relative portion of an HTTP URL to a Granta MI datasheet, served by MI Viewer. + +* **Parameters:** + **\_req** ([`GetDatasheetPath`](#module-ansys.grantami.backend.soap.GetDatasheetPath) object) +* **Return type:** + [`GetDatasheetPathResponse`](#module-ansys.grantami.backend.soap.GetDatasheetPathResponse) object + + + +#### get_datasheet_path_parameterized(\_req) + +Gets information that may be used to construct an HTTP URL to a Granta MI datasheet, served by MI Viewer. + +* **Parameters:** + **\_req** ([`GetDatasheetPathParameterized`](#module-ansys.grantami.backend.soap.GetDatasheetPathParameterized) object) +* **Return type:** + [`GetDatasheetPathParameterizedResponse`](#module-ansys.grantami.backend.soap.GetDatasheetPathParameterizedResponse) object + + + +#### get_integration_profiles(\_req) + +List the profiles available on a Granta MI Database. + +* **Parameters:** + **\_req** ([`GetIntegrationProfiles`](#module-ansys.grantami.backend.soap.GetIntegrationProfiles) object) +* **Return type:** + [`GetIntegrationProfilesResponse`](#module-ansys.grantami.backend.soap.GetIntegrationProfilesResponse) object + + + +#### get_layouts(\_req) + +List the Layouts for an MI Database or for one Table in a Database. + +* **Parameters:** + **\_req** ([`GetLayouts`](#module-ansys.grantami.backend.soap.GetLayouts) object) +* **Return type:** + [`GetLayoutsResponse`](#module-ansys.grantami.backend.soap.GetLayoutsResponse) object + + + +#### get_linked_records(\_req) + +Returns the linked records for specified records, for one or more record link groups. + +* **Parameters:** + **\_req** ([`GetLinkedRecordsRequest`](#module-ansys.grantami.backend.soap.GetLinkedRecordsRequest) object) +* **Return type:** + [`GetLinkedRecordsResponse`](#module-ansys.grantami.backend.soap.GetLinkedRecordsResponse) object + + + +#### get_meta_attributes(\_req) + +Returns the Meta-Attributes of one or more parent Attributes in a Table of a Granta MI Database. + +* **Parameters:** + **\_req** ([`GetMetaAttributesRequest`](#module-ansys.grantami.backend.soap.GetMetaAttributesRequest) object) +* **Return type:** + [`GetMetaAttributesResponse`](#module-ansys.grantami.backend.soap.GetMetaAttributesResponse) object + + + +#### get_parameter_details(\_req) + +Returns detailed information about the given Parameter(s) in a Granta MI Database. + +* **Parameters:** + **\_req** ([`GetParameterDetailsRequest`](#module-ansys.grantami.backend.soap.GetParameterDetailsRequest) object) +* **Return type:** + [`GetParameterDetailsResponse`](#module-ansys.grantami.backend.soap.GetParameterDetailsResponse) object + + + +#### get_record_attributes(\_req) + +Returns information about which Attributes have Data, for given Record(s). Includes information about when Data was created and retired, in a Version-Controlled Table. Does not retrieve values of the Data; for that, use the DataExport or EngineeringData services. + +* **Parameters:** + **\_req** ([`GetRecordAttributesRequest`](#module-ansys.grantami.backend.soap.GetRecordAttributesRequest) object) +* **Return type:** + [`GetRecordAttributesResponse`](#module-ansys.grantami.backend.soap.GetRecordAttributesResponse) object + + + +#### get_record_link_groups(\_req) + +Gets details of Record Link Groups in a Granta MI Database. + +* **Parameters:** + **\_req** ([`GetRecordLinkGroups`](#module-ansys.grantami.backend.soap.GetRecordLinkGroups) object) +* **Return type:** + [`GetRecordLinkGroupsResponse`](#module-ansys.grantami.backend.soap.GetRecordLinkGroupsResponse) object + + + +#### get_record_versions(\_req) + +Returns version information about the records specified in the request object. + +* **Parameters:** + **\_req** ([`GetRecordVersionsRequest`](#module-ansys.grantami.backend.soap.GetRecordVersionsRequest) object) +* **Return type:** + [`GetRecordVersionsResponse`](#module-ansys.grantami.backend.soap.GetRecordVersionsResponse) object + + + +#### get_root_node(\_req) + +Returns information about the root node of a particular Table in a Granta MI Database. This can be passed to get_child_nodes operation to find the contents of the rest of the node-tree of the Table. + +* **Parameters:** + **\_req** ([`GetRootNode`](#module-ansys.grantami.backend.soap.GetRootNode) object) +* **Return type:** + [`GetRootNodeResponse`](#module-ansys.grantami.backend.soap.GetRootNodeResponse) object + + + +#### get_subsets(\_req) + +List the Subsets for a Granta MI Database or for one Table in a Database. + +* **Parameters:** + **\_req** ([`GetSubsetsRequest`](#module-ansys.grantami.backend.soap.GetSubsetsRequest) object) +* **Return type:** + [`GetSubsetsResponse`](#module-ansys.grantami.backend.soap.GetSubsetsResponse) object + + + +#### get_tables(\_req) + +List the tables contained in a particular Granta MI Database. + +* **Parameters:** + **\_req** ([`GetTables`](#module-ansys.grantami.backend.soap.GetTables) object) +* **Return type:** + [`GetTablesResponse`](#module-ansys.grantami.backend.soap.GetTablesResponse) object + + + +#### get_tree_records(\_req) + +Returns name, record type, and some tree information for the given record(s). Does not retrieve the tree children; for that, use the get_child_records operation. + +* **Parameters:** + **\_req** ([`GetTreeRecordsRequest`](#module-ansys.grantami.backend.soap.GetTreeRecordsRequest) object) +* **Return type:** + [`GetTreeRecordsResponse`](#module-ansys.grantami.backend.soap.GetTreeRecordsResponse) object + + + +#### get_unit_conversions(\_req) + +Gets all the unit conversions available for a specified unit or unit system. + +* **Parameters:** + **\_req** ([`GetUnitConversionsRequest`](#module-ansys.grantami.backend.soap.GetUnitConversionsRequest) object) +* **Return type:** + [`GetUnitConversionsResponse`](#module-ansys.grantami.backend.soap.GetUnitConversionsResponse) object + + + +#### get_unit_systems(\_req) + +Returns information about the unit systems known to a Granta MI Database + +* **Parameters:** + **\_req** ([`GetUnitSystems`](#module-ansys.grantami.backend.soap.GetUnitSystems) object) +* **Return type:** + [`GetUnitSystemsResponse`](#module-ansys.grantami.backend.soap.GetUnitSystemsResponse) object + + + +#### get_units(\_req) + +Returns information about the units known to one or more Granta MI Databases + +* **Parameters:** + **\_req** ([`GetUnits`](#module-ansys.grantami.backend.soap.GetUnits) object) +* **Return type:** + [`GetUnitsResponse`](#module-ansys.grantami.backend.soap.GetUnitsResponse) object + + + +#### resolve_references(\_req) + +Checks whether the specified Granta MI entities exist in the database and, if so, whether the current user has read permissions or write permissions for it. + +* **Parameters:** + **\_req** ([`ResolveReferencesRequest`](#module-ansys.grantami.backend.soap.ResolveReferencesRequest) object) +* **Return type:** + [`ResolveReferencesResponse`](#module-ansys.grantami.backend.soap.ResolveReferencesResponse) object + + + + + +### CategoryAttributeDetail + + + +### *class* CategoryAttributeDetail(about=None, attribute=None, axis_name=None, chartable=None, database_unit=None, default_threshold=None, discrete_values=None, help_info=None, identity=None, is_meta=None, is_multi_valued=None, is_read_only=None, is_required=None, is_searchable=None, name=None, order=None, revision_info=None, type_=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Gives the attribute details with a client read only and is required flag. + +* **Parameters:** + * **about** ([`NamedAttribute`](#module-ansys.grantami.backend.soap.NamedAttribute)) + * **attribute** ([`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference)) + * **axis_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **chartable** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **database_unit** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **default_threshold** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **discrete_values** ([*list*](https://docs.python.org/3/library/stdtypes.html#list) *of* [*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **help_info** ([`HelpInfo`](#module-ansys.grantami.backend.soap.HelpInfo)) + * **identity** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **is_meta** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **is_multi_valued** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **is_read_only** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **is_required** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **is_searchable** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **order** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **revision_info** ([`RevisionInfo`](#module-ansys.grantami.backend.soap.RevisionInfo)) + * **type** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *property* about *: [NamedAttribute](#ansys.grantami.backend.soap.NamedAttribute.NamedAttribute)* + +Property about is of type [`NamedAttribute`](#module-ansys.grantami.backend.soap.NamedAttribute). + +* **Return type:** + [`NamedAttribute`](#module-ansys.grantami.backend.soap.NamedAttribute) + + + +#### *property* attribute *: [AttributeReference](#ansys.grantami.backend.soap.AttributeReference.AttributeReference)* + +Property attribute is of type [`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference). + +* **Return type:** + [`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference) + + + +#### *property* axis_name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property axis_name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* chartable *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property chartable is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* database_unit *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property database_unit is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* default_threshold *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property default_threshold is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* discrete_values *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str)]* + +Property discrete_values is a list of str objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + [list](https://docs.python.org/3/library/stdtypes.html#list) of [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* help_info *: [HelpInfo](#ansys.grantami.backend.soap.HelpInfo.HelpInfo)* + +Property help_info is of type [`HelpInfo`](#module-ansys.grantami.backend.soap.HelpInfo). + +* **Return type:** + [`HelpInfo`](#module-ansys.grantami.backend.soap.HelpInfo) + + + +#### *property* identity *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property identity is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* is_meta *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property is_meta is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* is_multi_valued *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property is_multi_valued is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* is_read_only *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property is_read_only is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* is_required *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property is_required is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* is_searchable *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property is_searchable is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* order *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property order is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* revision_info *: [RevisionInfo](#ansys.grantami.backend.soap.RevisionInfo.RevisionInfo)* + +Property revision_info is of type [`RevisionInfo`](#module-ansys.grantami.backend.soap.RevisionInfo). + +* **Return type:** + [`RevisionInfo`](#module-ansys.grantami.backend.soap.RevisionInfo) + + + +#### *property* type_ *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property type_ is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### Constraint + + + +### *class* Constraint(label=None, parameter=None, parameter_value=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +A constraint on functional data. +For requests, both parameter and parameter value are required. + +* **Parameters:** + * **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **parameter** ([`ParameterReference`](#module-ansys.grantami.backend.soap.ParameterReference)) + * **parameter_value** ([`ParameterValue`](#module-ansys.grantami.backend.soap.ParameterValue)) + + + +#### *property* label *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property label is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* parameter *: [ParameterReference](#ansys.grantami.backend.soap.ParameterReference.ParameterReference)* + +Property parameter is of type [`ParameterReference`](#module-ansys.grantami.backend.soap.ParameterReference). + +* **Return type:** + [`ParameterReference`](#module-ansys.grantami.backend.soap.ParameterReference) + + + +#### *property* parameter_value *: [ParameterValue](#ansys.grantami.backend.soap.ParameterValue.ParameterValue)* + +Property parameter_value is of type [`ParameterValue`](#module-ansys.grantami.backend.soap.ParameterValue). + +* **Return type:** + [`ParameterValue`](#module-ansys.grantami.backend.soap.ParameterValue) + + + + + +### Constraints + + + +### *class* Constraints(constraints=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +A container of constraints. + +* **Parameters:** + **constraints** (list of [`Constraint`](#module-ansys.grantami.backend.soap.Constraint)) + + + +#### add_constraint(\_constraint) + +Appends \_constraint to constraints property on Constraints C-object. + +* **Parameters:** + **\_constraint** ([`Constraint`](#module-ansys.grantami.backend.soap.Constraint)) + + + +#### *property* constraints *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[Constraint](#ansys.grantami.backend.soap.Constraint.Constraint)]* + +Property constraints is a list of [`Constraint`](#module-ansys.grantami.backend.soap.Constraint) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`Constraint`](#module-ansys.grantami.backend.soap.Constraint) + + + + + +### ContainsAllSearchValue + + + +### *class* ContainsAllSearchValue(tabular_column=None, values=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Search criterion to search for discrete data types that contain all of the specified search values. +If the discrete values of the data include further values, it still passes. This criterion type is +specific to discrete attributes. + +* **Parameters:** + * **tabular_column** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **values** ([*list*](https://docs.python.org/3/library/stdtypes.html#list) *of* [*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### add_value(value) + +Appends value to values property on ContainsAllSearchValue C-object. + +* **Parameters:** + **value** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *property* tabular_column *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property tabular_column is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* values *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str)]* + +Property values is a list of str objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + [list](https://docs.python.org/3/library/stdtypes.html#list) of [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### ContainsAnySearchValue + + + +### *class* ContainsAnySearchValue(tabular_column=None, values=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Search criterion to search for discrete data types that contain any of the specified search values. +This criterion type is specific to discrete attributes. + +* **Parameters:** + * **tabular_column** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **values** ([*list*](https://docs.python.org/3/library/stdtypes.html#list) *of* [*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### add_value(value) + +Appends value to values property on ContainsAnySearchValue C-object. + +* **Parameters:** + **value** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *property* tabular_column *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property tabular_column is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* values *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str)]* + +Property values is a list of str objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + [list](https://docs.python.org/3/library/stdtypes.html#list) of [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### ContainsSearchValue + + + +### *class* ContainsSearchValue(tabular_column=None, value=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Search criterion to search for data that contains the specified search text value. +Search criterion applies to text, logical, and discrete attributes. For logicals, specify ‘true’ or +‘false’ as the text. + +* **Parameters:** + * **tabular_column** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **value** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *property* tabular_column *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property tabular_column is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* value *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property value is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### CriteriaSearch + + + +### *class* CriteriaSearch(db_key=None, parameter_values=None, populate_guids=None, record_filter=None, search_criteria=None, search_filter=None, search_mode=None, significant_figures=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +The input for the CriteriaSearch operation. +Both the db_key and search_criteria parameters are required. If no subsets are specified, only the +default subset will be searched. + +* **Parameters:** + * **db_key** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **parameter_values** (list of [`UnittedParameterValue`](#module-ansys.grantami.backend.soap.UnittedParameterValue)) + * **populate_guids** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **record_filter** ([`RecordFilter`](#module-ansys.grantami.backend.soap.RecordFilter)) + * **search_criteria** (list of [`RecordSearchCriterion`](#module-ansys.grantami.backend.soap.RecordSearchCriterion)) + * **search_filter** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **search_mode** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **significant_figures** ([*int*](https://docs.python.org/3/library/functions.html#int)) + + + +#### add_parameter_value(\_unittedParameterValue) + +Appends \_unittedParameterValue to parameterValues property on CriteriaSearch C-object. + +* **Parameters:** + **\_unittedParameterValue** ([`UnittedParameterValue`](#module-ansys.grantami.backend.soap.UnittedParameterValue)) + + + +#### add_search_criteria(\_recordSearchCriterion) + +Appends \_recordSearchCriterion to searchCriteria property on CriteriaSearch C-object. + +* **Parameters:** + **\_recordSearchCriterion** ([`RecordSearchCriterion`](#module-ansys.grantami.backend.soap.RecordSearchCriterion)) + + + +#### *property* db_key *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property db_key is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* parameter_values *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[UnittedParameterValue](#ansys.grantami.backend.soap.UnittedParameterValue.UnittedParameterValue)]* + +Property parameter_values is a list of [`UnittedParameterValue`](#module-ansys.grantami.backend.soap.UnittedParameterValue) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`UnittedParameterValue`](#module-ansys.grantami.backend.soap.UnittedParameterValue) + + + +#### *property* populate_guids *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property populate_guids is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* record_filter *: [RecordFilter](#ansys.grantami.backend.soap.RecordFilter.RecordFilter)* + +Property record_filter is of type [`RecordFilter`](#module-ansys.grantami.backend.soap.RecordFilter). + +* **Return type:** + [`RecordFilter`](#module-ansys.grantami.backend.soap.RecordFilter) + + + +#### *property* search_criteria *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[RecordSearchCriterion](#ansys.grantami.backend.soap.RecordSearchCriterion.RecordSearchCriterion)]* + +Property search_criteria is a list of [`RecordSearchCriterion`](#module-ansys.grantami.backend.soap.RecordSearchCriterion) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`RecordSearchCriterion`](#module-ansys.grantami.backend.soap.RecordSearchCriterion) + + + +#### *property* search_filter *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property search_filter is of type int. See [`GRANTA_Constants`](#module-ansys.grantami.backend.soap.GRANTA_Constants) for supported values. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* search_mode *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property search_mode is of type int. See [`GRANTA_Constants`](#module-ansys.grantami.backend.soap.GRANTA_Constants) for supported values. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* significant_figures *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property significant_figures is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + + + +### CurrencyDetail + + + +### *class* CurrencyDetail(code=None, factor=None, name=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Provides the currency code and name. +Currencies are uniquely identified by their ISO 4217 code, the currency name is also provided. + +* **Parameters:** + * **code** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **factor** ([*float*](https://docs.python.org/3/library/functions.html#float)) + * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *property* code *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property code is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* factor *: [float](https://docs.python.org/3/library/functions.html#float)* + +Property factor is of type float. + +* **Return type:** + [float](https://docs.python.org/3/library/functions.html#float) + + + +#### *property* name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +### DataExportService + + + + + +### *class* DataExportService(mi_session, retries=0) + +Bases: [`Service`](#ansys.grantami.backend.soap.Service.Service) + +The DataExport service retrieves and returns data from attributes of records in Granta MI Databases. + + + +#### get_record_attributes_by_ref(\_req) + +Retrieves the data values for the given attribute(s) and record(s) in a Granta MI Database. + +* **Parameters:** + **\_req** ([`GetRecordAttributesByRefRequest`](#module-ansys.grantami.backend.soap.GetRecordAttributesByRefRequest) object) +* **Return type:** + [`GetRecordAttributesByRefResponse`](#module-ansys.grantami.backend.soap.GetRecordAttributesByRefResponse) object + + + +### DataImportService + + + + + +### *class* DataImportService(mi_session, retries=0) + +Bases: [`Service`](#ansys.grantami.backend.soap.Service.Service) + +The DataImport service writes data to attributes of records in Granta MI Databases. + + + +#### delete_or_withdraw_if_latest_record_version(\_req) + +Deletes or withdraws the latest version of the specified record(s). In a version-controlled table, the latest version of a record can be seen by Write users in Edit mode of MI Viewer. This operation will revert (or delete) unreleased record versions, withdraw released versions, and skip withdrawn versions. In a non-version-controlled table, records will only have one version. This operation will delete specified records of this type. Note: this operation will only act on the latest record version. In the case where the specified record corresponds to a record version that is an earlier version, the operation will return a fault. + +* **Parameters:** + **\_req** ([`DeleteOrWithdrawIfLatestRecordVersionRequest`](#module-ansys.grantami.backend.soap.DeleteOrWithdrawIfLatestRecordVersionRequest) object) +* **Return type:** + [`DeleteOrWithdrawIfLatestRecordVersionResponse`](#module-ansys.grantami.backend.soap.DeleteOrWithdrawIfLatestRecordVersionResponse) object + + + +#### ensure_record_folder_paths(\_req) + +Checks whether given hierarchies of folders exist, creating them if not. Each hierarchy is specified as a sequence of tree names; where the folder needs to be created, this name is also used as the full name of the created folder. New folders will be assigned to their parents’ subsets; existing folders are not assigned or removed from any subsets. If a colour is specified, new folders will be of that colour; existing folders’ colours are never changed. Note: this operation can accept an arbitrary number of Record Folder paths to be ensured, but in practice there is a limit to the amount of changes that can be done in a single operation. + +* **Parameters:** + **\_req** ([`EnsureRecordFolderPathsRequest`](#module-ansys.grantami.backend.soap.EnsureRecordFolderPathsRequest) object) +* **Return type:** + [`EnsureRecordFolderPathsResponse`](#module-ansys.grantami.backend.soap.EnsureRecordFolderPathsResponse) object + + + +#### get_upload_addresses(\_req) + +Returns an address to which a datum can be uploaded, for each combination of given sets of records and attributes in a Granta MI database. Each address will be an HTTP or HTTPS URL. The upload service only supports a subset of all available Granta MI attribute types, but this operation will give an address for an attribute of any type. + +* **Parameters:** + **\_req** ([`GetUploadAddressesRequest`](#module-ansys.grantami.backend.soap.GetUploadAddressesRequest) object) +* **Return type:** + [`GetUploadAddressesResponse`](#module-ansys.grantami.backend.soap.GetUploadAddressesResponse) object + + + +#### modify_record_links(\_req) + +Adds or removes static Links between record(s) in a Granta MI Database. + +* **Parameters:** + **\_req** ([`ModifyRecordLinksRequest`](#module-ansys.grantami.backend.soap.ModifyRecordLinksRequest) object) +* **Return type:** + [`ModifyRecordLinksResponse`](#module-ansys.grantami.backend.soap.ModifyRecordLinksResponse) object + + + +#### set_record_attributes(\_req) + +Sets the data values for the given attribute(s) and record(s) in a Granta MI Database. This method will create any records or folders which do not already exist in the database (however, new folders should be created with ‘EnsureRecordFolderPaths’ instead). Note: This operation can accept an arbitrary number of attributes and records to be imported, but in practice there is a fairly low limit to the amount of data that can be imported in a single operation. Client code should perform large imports in small chunks. + +* **Parameters:** + **\_req** ([`SetRecordAttributesRequest`](#module-ansys.grantami.backend.soap.SetRecordAttributesRequest) object) +* **Return type:** + [`SetRecordAttributesResponse`](#module-ansys.grantami.backend.soap.SetRecordAttributesResponse) object + + + + + +### DatabaseDetail + + + +### *class* DatabaseDetail(db_key=None, author=None, company=None, volume_name=None, db_guid=None, db_version_guid=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Detailed meta-information about a Granta MI database. + +* **Parameters:** + * **db_key** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **author** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **company** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **volume_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **db_guid** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **db_version_guid** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *property* author *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property author is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* company *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property company is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* db_guid *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property db_guid is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* db_key *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property db_key is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* db_version_guid *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property db_version_guid is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* volume_name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property volume_name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### DatabaseRevision + + + +### *class* DatabaseRevision(revision_date=None, revision_note=None, username=None, has_revision_note=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Information about a specific database revision. Includes the author, the date and time, and the +transaction note (if present). + +* **Parameters:** + * **revision_date** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **revision_note** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **username** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **has_revision_note** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + + + +#### *property* has_revision_note *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property has_revision_note is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* revision_date *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property revision_date is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* revision_note *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property revision_note is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* username *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property username is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### DatabaseUnitSet + + + +### *class* DatabaseUnitSet(db_key=None, unit_symbols=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +An array of UnitSymbols for a specific database. + +* **Parameters:** + * **db_key** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **unit_symbols** (list of [`UnitSymbol`](#module-ansys.grantami.backend.soap.UnitSymbol)) + + + +#### *property* db_key *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property db_key is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* unit_symbols *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[UnitSymbol](#ansys.grantami.backend.soap.UnitSymbol.UnitSymbol)]* + +Property unit_symbols is a list of [`UnitSymbol`](#module-ansys.grantami.backend.soap.UnitSymbol) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`UnitSymbol`](#module-ansys.grantami.backend.soap.UnitSymbol) + + + + + +### DataRule + + + +### *class* DataRule(description=None, display_descriptions=None, display_names=None, name=None, regular_expression=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +A data validation rule that will be applied to the corresponding Short Text Attribute when importing +data. + +* **Parameters:** + * **description** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **display_descriptions** (list of [`DisplayName`](#module-ansys.grantami.backend.soap.DisplayName)) + * **display_names** (list of [`DisplayName`](#module-ansys.grantami.backend.soap.DisplayName)) + * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **regular_expression** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *property* description *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property description is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* display_descriptions *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[DisplayName](#ansys.grantami.backend.soap.DisplayName.DisplayName)]* + +Property display_descriptions is a list of [`DisplayName`](#module-ansys.grantami.backend.soap.DisplayName) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`DisplayName`](#module-ansys.grantami.backend.soap.DisplayName) + + + +#### *property* display_names *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[DisplayName](#ansys.grantami.backend.soap.DisplayName.DisplayName)]* + +Property display_names is a list of [`DisplayName`](#module-ansys.grantami.backend.soap.DisplayName) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`DisplayName`](#module-ansys.grantami.backend.soap.DisplayName) + + + +#### *property* name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* regular_expression *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property regular_expression is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### DatasheetPath + + + +### *class* DatasheetPath(url=None, record_reference=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Link to a record in a Granta MI database. +Includes a [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) and a URL for the record datasheet. + +* **Parameters:** + * **url** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **record_reference** ([`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference)) + + + +#### *property* record_reference *: [RecordReference](#ansys.grantami.backend.soap.RecordReference.RecordReference)* + +Property record_reference is of type [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference). + +* **Return type:** + [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) + + + +#### *property* url *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property url is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### DateDataType + + + +### *class* DateDataType(is_applicable=None, value=None, \_is_owner=True) + +Bases: [`IDataValue`](#ansys.grantami.backend.soap.IDataValue.IDataValue) + +Container of date data. The format is YYYY-MM-DD. + +* **Parameters:** + * **is_applicable** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **value** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *property* is_applicable *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property is_applicable is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* value *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property value is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### DateTimeDataType + + + +### *class* DateTimeDataType(is_applicable=None, value=None, \_is_owner=True) + +Bases: [`IDataValue`](#ansys.grantami.backend.soap.IDataValue.IDataValue) + +Container of datetime data. The format is YYYY-MM-DDThh:mm:ss and is compatible with ISO 8601. + +* **Parameters:** + * **is_applicable** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **value** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *property* is_applicable *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property is_applicable is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* value *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property value is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### DefaultParameterValue + + + +### *class* DefaultParameterValue(discrete_value=None, numeric_value=None, type_=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Type representing the default value of a parameter, may be overridden at the datum level, or +inherited from the attribute or the database default. + +* **Parameters:** + * **discrete_value** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **numeric_value** ([*float*](https://docs.python.org/3/library/functions.html#float)) + * **type** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *class* DefaultParameterValueType + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + + + +#### Discrete *= 2* + + + +#### Numeric *= 1* + + + +#### Unknown *= 0* + + + +#### *property* discrete_value *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property discrete_value is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* numeric_value *: [float](https://docs.python.org/3/library/functions.html#float)* + +Property numeric_value is of type float. + +* **Return type:** + [float](https://docs.python.org/3/library/functions.html#float) + + + +#### *property* type_ *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property type_ is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### DeleteOrWithdrawIfLatestRecordVersionRequest + + + +### *class* DeleteOrWithdrawIfLatestRecordVersionRequest(delete_or_withdraw_records=None, notes=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +DeleteOrWithdrawIfLatestRecordVersionRequest. Input for the DeleteOrWithdrawIfLatestRecordVersion +operation, containing the [`DeleteOrWithdrawRecord`](#module-ansys.grantami.backend.soap.DeleteOrWithdrawRecord) objects. + +* **Parameters:** + * **delete_or_withdraw_records** (list of [`DeleteOrWithdrawRecord`](#module-ansys.grantami.backend.soap.DeleteOrWithdrawRecord)) + * **notes** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### add_delete_or_withdraw_record(\_deleteOrWithdrawRecord) + +Appends \_deleteOrWithdrawRecord to deleteOrWithdrawRecords property on DeleteOrWithdrawIfLatestRecordVersionRequest C-object. + +* **Parameters:** + **\_deleteOrWithdrawRecord** ([`DeleteOrWithdrawRecord`](#module-ansys.grantami.backend.soap.DeleteOrWithdrawRecord)) + + + +#### *property* delete_or_withdraw_records *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[DeleteOrWithdrawRecord](#ansys.grantami.backend.soap.DeleteOrWithdrawRecord.DeleteOrWithdrawRecord)]* + +Property delete_or_withdraw_records is a list of [`DeleteOrWithdrawRecord`](#module-ansys.grantami.backend.soap.DeleteOrWithdrawRecord) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`DeleteOrWithdrawRecord`](#module-ansys.grantami.backend.soap.DeleteOrWithdrawRecord) + + + +#### *property* notes *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property notes is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### DeleteOrWithdrawIfLatestRecordVersionResponse + + + +### *class* DeleteOrWithdrawIfLatestRecordVersionResponse(c_obj) + +Bases: [`Response`](#ansys.grantami.backend.soap.Response.Response) + +DeleteOrWithdrawIfLatestRecordVersionResponse. Output of the DeleteOrWithdrawIfLatestRecordVersion +operation. + +* **Parameters:** + **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a DeleteOrWithdrawIfLatestRecordVersionResponse object. + + + + + +### DeleteOrWithdrawRecord + + + +### *class* DeleteOrWithdrawRecord(record_reference=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Record to be deleted or withdrawn. Contains a [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference). + +* **Parameters:** + **record_reference** ([`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference)) + + + +#### *property* record_reference *: [RecordReference](#ansys.grantami.backend.soap.RecordReference.RecordReference)* + +Property record_reference is of type [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference). + +* **Return type:** + [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) + + + + + +### DiscreteDataType + + + +### *class* DiscreteDataType(discrete_values=None, is_applicable=None, \_is_owner=True) + +Bases: [`IDataValue`](#ansys.grantami.backend.soap.IDataValue.IDataValue) + +Container of discrete data. + +* **Parameters:** + * **discrete_values** (list of [`DiscreteValue`](#module-ansys.grantami.backend.soap.DiscreteValue)) + * **is_applicable** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + + + +#### add_discrete_value(\_discreteValue) + +Appends \_discreteValue to discreteValues property on DiscreteDataType C-object. + +* **Parameters:** + **\_discreteValue** ([`DiscreteValue`](#module-ansys.grantami.backend.soap.DiscreteValue)) + + + +#### *property* discrete_values *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[DiscreteValue](#ansys.grantami.backend.soap.DiscreteValue.DiscreteValue)]* + +Property discrete_values is a list of [`DiscreteValue`](#module-ansys.grantami.backend.soap.DiscreteValue) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`DiscreteValue`](#module-ansys.grantami.backend.soap.DiscreteValue) + + + +#### *property* is_applicable *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property is_applicable is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + + + +### DiscreteFunctionalGriddedDataType + + + +### *class* DiscreteFunctionalGriddedDataType(default_x_axis_parameter=None, functional_data_parameter_settings=None, is_applicable=None, values=None, \_is_owner=True) + +Bases: [`IDataValue`](#ansys.grantami.backend.soap.IDataValue.IDataValue) + +A type to contain the values of discrete-valued functional gridded data. +This type is only valid for export. + +* **Parameters:** + * **default_x_axis_parameter** ([`ParameterInformation`](#module-ansys.grantami.backend.soap.ParameterInformation)) + * **functional_data_parameter_settings** (list of [`FunctionalDataParameterSettings`](#module-ansys.grantami.backend.soap.FunctionalDataParameterSettings)) + * **is_applicable** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **values** ([`DiscreteFunctionalValues`](#module-ansys.grantami.backend.soap.DiscreteFunctionalValues)) + + + +#### add_functional_data_parameter_settings(\_functionalDataParameterSettings) + +Appends \_functionalDataParameterSettings to functionalDataParameterSettings property on DiscreteFunctionalGriddedDataType C-object. + +* **Parameters:** + **\_functionalDataParameterSettings** ([`FunctionalDataParameterSettings`](#module-ansys.grantami.backend.soap.FunctionalDataParameterSettings)) + + + +#### *property* default_x_axis_parameter *: [ParameterInformation](#ansys.grantami.backend.soap.ParameterInformation.ParameterInformation)* + +Property default_x_axis_parameter is of type [`ParameterInformation`](#module-ansys.grantami.backend.soap.ParameterInformation). + +* **Return type:** + [`ParameterInformation`](#module-ansys.grantami.backend.soap.ParameterInformation) + + + +#### *property* functional_data_parameter_settings *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[FunctionalDataParameterSettings](#ansys.grantami.backend.soap.FunctionalDataParameterSettings.FunctionalDataParameterSettings)]* + +Property functional_data_parameter_settings is a list of [`FunctionalDataParameterSettings`](#module-ansys.grantami.backend.soap.FunctionalDataParameterSettings) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`FunctionalDataParameterSettings`](#module-ansys.grantami.backend.soap.FunctionalDataParameterSettings) + + + +#### *property* is_applicable *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property is_applicable is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* values *: [DiscreteFunctionalValues](#ansys.grantami.backend.soap.DiscreteFunctionalValues.DiscreteFunctionalValues)* + +Property values is of type [`DiscreteFunctionalValues`](#module-ansys.grantami.backend.soap.DiscreteFunctionalValues). + +* **Return type:** + [`DiscreteFunctionalValues`](#module-ansys.grantami.backend.soap.DiscreteFunctionalValues) + + + + + +### DiscreteFunctionalSeriesDataType + + + +### *class* DiscreteFunctionalSeriesDataType(functional_data_parameter_settings=None, graph=None, is_applicable=None, \_is_owner=True) + +Bases: [`IDataValue`](#ansys.grantami.backend.soap.IDataValue.IDataValue) + +A type to contain the values of discrete-valued functional series data. +This type is only valid for export. + +* **Parameters:** + * **functional_data_parameter_settings** (list of [`FunctionalDataParameterSettings`](#module-ansys.grantami.backend.soap.FunctionalDataParameterSettings)) + * **graph** ([`DiscreteFunctionalSeriesGraph`](#module-ansys.grantami.backend.soap.DiscreteFunctionalSeriesGraph)) + * **is_applicable** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + + + +#### add_functional_data_parameter_settings(\_functionalDataParameterSettings) + +Appends \_functionalDataParameterSettings to functionalDataParameterSettings property on DiscreteFunctionalSeriesDataType C-object. + +* **Parameters:** + **\_functionalDataParameterSettings** ([`FunctionalDataParameterSettings`](#module-ansys.grantami.backend.soap.FunctionalDataParameterSettings)) + + + +#### *property* functional_data_parameter_settings *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[FunctionalDataParameterSettings](#ansys.grantami.backend.soap.FunctionalDataParameterSettings.FunctionalDataParameterSettings)]* + +Property functional_data_parameter_settings is a list of [`FunctionalDataParameterSettings`](#module-ansys.grantami.backend.soap.FunctionalDataParameterSettings) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`FunctionalDataParameterSettings`](#module-ansys.grantami.backend.soap.FunctionalDataParameterSettings) + + + +#### *property* graph *: [DiscreteFunctionalSeriesGraph](#ansys.grantami.backend.soap.DiscreteFunctionalSeriesGraph.DiscreteFunctionalSeriesGraph)* + +Property graph is of type [`DiscreteFunctionalSeriesGraph`](#module-ansys.grantami.backend.soap.DiscreteFunctionalSeriesGraph). + +* **Return type:** + [`DiscreteFunctionalSeriesGraph`](#module-ansys.grantami.backend.soap.DiscreteFunctionalSeriesGraph) + + + +#### *property* is_applicable *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property is_applicable is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + + + +### DiscreteFunctionalSeriesGraph + + + +### *class* DiscreteFunctionalSeriesGraph(x_axis_parameter=None, hide_graph=None, series=None, \_is_owner=True) + +A type to contain a collection of [`DiscreteSeries`](#module-ansys.grantami.backend.soap.DiscreteSeries) objects that +contain the functional data. + +* **Parameters:** + * **x_axis_parameter** ([`ParameterInformation`](#module-ansys.grantami.backend.soap.ParameterInformation)) + * **hide_graph** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **series** (list of [`DiscreteSeries`](#module-ansys.grantami.backend.soap.DiscreteSeries)) + + + +#### add_series(\_discreteSeries) + +Appends \_discreteSeries to series property on DiscreteFunctionalSeriesGraph C-object. + +* **Parameters:** + **\_discreteSeries** ([`DiscreteSeries`](#module-ansys.grantami.backend.soap.DiscreteSeries)) + + + +#### *property* hide_graph *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property hide_graph is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* series *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[DiscreteSeries](#ansys.grantami.backend.soap.DiscreteSeries.DiscreteSeries)]* + +Property series is a list of [`DiscreteSeries`](#module-ansys.grantami.backend.soap.DiscreteSeries) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`DiscreteSeries`](#module-ansys.grantami.backend.soap.DiscreteSeries) + + + +#### *property* x_axis_parameter *: [ParameterInformation](#ansys.grantami.backend.soap.ParameterInformation.ParameterInformation)* + +Property x_axis_parameter is of type [`ParameterInformation`](#module-ansys.grantami.backend.soap.ParameterInformation). + +* **Return type:** + [`ParameterInformation`](#module-ansys.grantami.backend.soap.ParameterInformation) + + + + + +### DiscreteFunctionalValue + + + +### *class* DiscreteFunctionalValue(constraints=None, value=None, is_estimated=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +A single grid point in Gridded Discrete-Valued Functional Data, where the Y-axis value is a discrete +value. + +* **Parameters:** + * **constraints** ([`Constraints`](#module-ansys.grantami.backend.soap.Constraints)) + * **value** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **is_estimated** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + + + +#### *property* constraints *: [Constraints](#ansys.grantami.backend.soap.Constraints.Constraints)* + +Property constraints is of type [`Constraints`](#module-ansys.grantami.backend.soap.Constraints). + +* **Return type:** + [`Constraints`](#module-ansys.grantami.backend.soap.Constraints) + + + +#### *property* is_estimated *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property is_estimated is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* value *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property value is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### DiscreteFunctionalValues + + + +### *class* DiscreteFunctionalValues(values=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +A collection of [`DiscreteFunctionalValue`](#module-ansys.grantami.backend.soap.DiscreteFunctionalValue) objects. + +* **Parameters:** + **values** (list of [`DiscreteFunctionalValue`](#module-ansys.grantami.backend.soap.DiscreteFunctionalValue)) + + + +#### add_value(\_discreteFunctionalValue) + +Appends \_discreteFunctionalValue to values property on DiscreteFunctionalValues C-object. + +* **Parameters:** + **\_discreteFunctionalValue** ([`DiscreteFunctionalValue`](#module-ansys.grantami.backend.soap.DiscreteFunctionalValue)) + + + +#### *property* values *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[DiscreteFunctionalValue](#ansys.grantami.backend.soap.DiscreteFunctionalValue.DiscreteFunctionalValue)]* + +Property values is a list of [`DiscreteFunctionalValue`](#module-ansys.grantami.backend.soap.DiscreteFunctionalValue) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`DiscreteFunctionalValue`](#module-ansys.grantami.backend.soap.DiscreteFunctionalValue) + + + + + +### DiscreteSeries + + + +### *class* DiscreteSeries(xy_points=None, constraints=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Type for functional data which includes X-Y discrete data and any constraints. + +* **Parameters:** + * **xy_points** ([`XYDiscreteData`](#module-ansys.grantami.backend.soap.XYDiscreteData)) + * **constraints** ([`Constraints`](#module-ansys.grantami.backend.soap.Constraints)) + + + +#### *property* constraints *: [Constraints](#ansys.grantami.backend.soap.Constraints.Constraints)* + +Property constraints is of type [`Constraints`](#module-ansys.grantami.backend.soap.Constraints). + +* **Return type:** + [`Constraints`](#module-ansys.grantami.backend.soap.Constraints) + + + +#### *property* xy_points *: [XYDiscreteData](#ansys.grantami.backend.soap.XYDiscreteData.XYDiscreteData)* + +Property xy_points is of type [`XYDiscreteData`](#module-ansys.grantami.backend.soap.XYDiscreteData). + +* **Return type:** + [`XYDiscreteData`](#module-ansys.grantami.backend.soap.XYDiscreteData) + + + + + +### DiscreteValue + + + +### *class* DiscreteValue(order=None, value=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +The value of a discrete data type. +Contains an order and a value. + +* **Parameters:** + * **order** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **value** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *property* order *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property order is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* value *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property value is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### DisplayName + + + +### *class* DisplayName(language=None, translation=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +A language identifier and localized string for the display name of an object. + +* **Parameters:** + * **language** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **translation** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *property* language *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property language is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* translation *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property translation is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### DoesNotContainSearchValue + + + +### *class* DoesNotContainSearchValue(tabular_column=None, value=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Search criterion to search for discrete data types that contain none of the specified search values. +This criterion type is specific to discrete attributes. + +* **Parameters:** + * **tabular_column** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **value** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *property* tabular_column *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property tabular_column is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* value *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property value is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### DoesNotExistSearchValue + + + +### *class* DoesNotExistSearchValue(tabular_column=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Search criterion to search for attributes with no data. +All attribute types supported. + +* **Parameters:** + **tabular_column** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *property* tabular_column *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property tabular_column is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### EmptyDataType + + + +### *class* EmptyDataType(\_is_owner=True) + +Bases: [`IDataValue`](#ansys.grantami.backend.soap.IDataValue.IDataValue) + +A type that indicates that the [`TabularDataCell`](#module-ansys.grantami.backend.soap.TabularDataCell) is empty. +This type is specific to Tabular attributes, and can be used in update operations to clear the +contents of a [`TabularDataCell`](#module-ansys.grantami.backend.soap.TabularDataCell). + + + + + +### EmptyRestResponse + + + +### *class* EmptyRestResponse(c_obj) + +Bases: [`Response`](#ansys.grantami.backend.soap.Response.Response) + +A response from a REST service that contains no data. +This type contains only a [`ServiceLayerResponse`](#module-ansys.grantami.backend.soap.ServiceLayerResponse) object. + +* **Parameters:** + **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a EmptyRestResponse object. + + + +### EngineeringDataService + + + + + +### *class* EngineeringDataService(mi_session, retries=0) + +Bases: [`Service`](#ansys.grantami.backend.soap.Service.Service) + +The EngineeringData service provides custom data export operations for a Granta MI Server. + + + +#### export_record_data(\_req) + +Performs an FEA Export and returns the result as the response. + +* **Parameters:** + **\_req** ([`ExportRecordDataRequest`](#module-ansys.grantami.backend.soap.ExportRecordDataRequest) object) +* **Return type:** + [`ExportRecordDataResponse`](#module-ansys.grantami.backend.soap.ExportRecordDataResponse) object + + + +#### exporters_for_records(\_req) + +Returns the FEA Exporter configurations, known to the MI Server, filtering for their applicability to given Record(s) and optionally to particular situations. + +* **Parameters:** + **\_req** ([`ExportersForRecordsRequest`](#module-ansys.grantami.backend.soap.ExportersForRecordsRequest) object) +* **Return type:** + [`ExportersForRecordsResponse`](#module-ansys.grantami.backend.soap.ExportersForRecordsResponse) object + + + +#### get_available_exporters(\_req) + +Returns the FEA Exporter configurations known to the MI Server, optionally filtering for their applicability to particular situations. + +* **Parameters:** + **\_req** ([`GetAvailableExportersRequest`](#module-ansys.grantami.backend.soap.GetAvailableExportersRequest) object) +* **Return type:** + [`GetAvailableExportersResponse`](#module-ansys.grantami.backend.soap.GetAvailableExportersResponse) object + + + +#### get_exporter_parameters(\_req) + +Returns information about the MI Parameter Values that will need to be chosen, to run the specified Exporter on the specified Record(s). + +* **Parameters:** + **\_req** ([`GetExporterParametersRequest`](#module-ansys.grantami.backend.soap.GetExporterParametersRequest) object) +* **Return type:** + [`GetExporterParametersResponse`](#module-ansys.grantami.backend.soap.GetExporterParametersResponse) object + + + + + +### EnsureRecordFolderPathsRequest + + + +### *class* EnsureRecordFolderPathsRequest(folder_paths=None, import_error_mode=None, notes=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Input for the EnsureRecordFolderPaths operation, containing the folder paths to check and the import +error mode. + +* **Parameters:** + * **folder_paths** (list of [`RecordFolderPath`](#module-ansys.grantami.backend.soap.RecordFolderPath)) + * **import_error_mode** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **notes** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### add_folder_path(\_recordFolderPath) + +Appends \_recordFolderPath to folderPaths property on EnsureRecordFolderPathsRequest C-object. + +* **Parameters:** + **\_recordFolderPath** ([`RecordFolderPath`](#module-ansys.grantami.backend.soap.RecordFolderPath)) + + + +#### *property* folder_paths *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[RecordFolderPath](#ansys.grantami.backend.soap.RecordFolderPath.RecordFolderPath)]* + +Property folder_paths is a list of [`RecordFolderPath`](#module-ansys.grantami.backend.soap.RecordFolderPath) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`RecordFolderPath`](#module-ansys.grantami.backend.soap.RecordFolderPath) + + + +#### *property* import_error_mode *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property import_error_mode is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* notes *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property notes is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### EnsureRecordFolderPathsResponse + + + +### *class* EnsureRecordFolderPathsResponse(c_obj) + +Bases: [`Response`](#ansys.grantami.backend.soap.Response.Response) + +Output of the EnsureRecordFolderPaths operation. + +* **Parameters:** + **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a EnsureRecordFolderPathsResponse object. + + + +#### *property* path_leaves *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[PathLeaf](#ansys.grantami.backend.soap.PathLeaf.PathLeaf)]* + +Property path_leaves is a list of [`PathLeaf`](#module-ansys.grantami.backend.soap.PathLeaf) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`PathLeaf`](#module-ansys.grantami.backend.soap.PathLeaf) + + + + + +### EqualToSearchValue + + + +### *class* EqualToSearchValue(tabular_column=None, value=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Search criterion to search for short text values that exactly match the specified search value. +Applies to short text attributes only. + +* **Parameters:** + * **tabular_column** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **value** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *property* tabular_column *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property tabular_column is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* value *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property value is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### ExactlySearchValue + + + +### *class* ExactlySearchValue(tabular_column=None, value=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Search criterion to search for integer values that exactly match the specified search value. +Applies to integer attributes only. + +* **Parameters:** + * **tabular_column** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **value** ([*int*](https://docs.python.org/3/library/functions.html#int)) + + + +#### *property* tabular_column *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property tabular_column is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* value *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property value is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + + + +### ExistsSearchValue + + + +### *class* ExistsSearchValue(tabular_column=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Search criterion to search for attributes that contain data. +All attribute types supported. + +* **Parameters:** + **tabular_column** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *property* tabular_column *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property tabular_column is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### ExportRecordDataRequest + + + +### *class* ExportRecordDataRequest(attribute_references=None, exporter_key=None, filter=None, parameter_values=None, records=None, sig_figs=None, stop_before_id=None, stop_before_index=None, unit_conversion_context=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Input for the ExportRecordData operation. For this request to be valid, you must set the references +and the exporter key. The argument stop_before_index is 0-indexed. + +* **Parameters:** + * **attribute_references** (list of [`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference)) + * **exporter_key** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **filter** ([`RecordFilter`](#module-ansys.grantami.backend.soap.RecordFilter)) + * **parameter_values** (list of [`UnittedParameterValue`](#module-ansys.grantami.backend.soap.UnittedParameterValue)) + * **records** (list of [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference)) + * **sig_figs** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **stop_before_id** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **stop_before_index** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **unit_conversion_context** ([`UnitConversionContext`](#module-ansys.grantami.backend.soap.UnitConversionContext)) + + + +#### add_attribute_reference(\_attributeReference) + +Appends \_attributeReference to attributeReferences property on ExportRecordDataRequest C-object. + +* **Parameters:** + **\_attributeReference** ([`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference)) + + + +#### add_parameter_values(\_unittedParameterValue) + +Appends \_unittedParameterValue to parameterValues property on ExportRecordDataRequest C-object. + +* **Parameters:** + **\_unittedParameterValue** ([`UnittedParameterValue`](#module-ansys.grantami.backend.soap.UnittedParameterValue)) + + + +#### add_record(\_recordReference) + +Appends \_recordReference to records property on ExportRecordDataRequest C-object. + +* **Parameters:** + **\_recordReference** ([`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference)) + + + +#### *property* attribute_references *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[AttributeReference](#ansys.grantami.backend.soap.AttributeReference.AttributeReference)]* + +Property attribute_references is a list of [`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference) objects. If this property is not specified, the attributes from the exporter configuration are used. If this element is included and non-empty, the attributes specified are used. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference) + + + +#### *property* exporter_key *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property exporter_key is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* filter *: [RecordFilter](#ansys.grantami.backend.soap.RecordFilter.RecordFilter)* + +Property filter is of type [`RecordFilter`](#module-ansys.grantami.backend.soap.RecordFilter). If specified, this filters the records that can be included when traversing record links within Tabular Data. This filter is NOT applied to the explicit list of records passed to this operation. + +* **Return type:** + [`RecordFilter`](#module-ansys.grantami.backend.soap.RecordFilter) + + + +#### *property* parameter_values *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[UnittedParameterValue](#ansys.grantami.backend.soap.UnittedParameterValue.UnittedParameterValue)]* + +Property parameter_values is a list of [`UnittedParameterValue`](#module-ansys.grantami.backend.soap.UnittedParameterValue) objects. Parameter values to use for any parameterised Data in the export. Each Parameter can only have one value for all parameterised Attributes in an export. Note that the true Parameter names (or Standard Names) in the MI Database must be used; aliases defined in the exporter configuration will not be understood. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`UnittedParameterValue`](#module-ansys.grantami.backend.soap.UnittedParameterValue) + + + +#### *property* records *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[RecordReference](#ansys.grantami.backend.soap.RecordReference.RecordReference)]* + +Property records is a list of [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) + + + +#### *property* sig_figs *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property sig_figs is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* stop_before_id *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property stop_before_id is of type str. Stops the export process before the step specified by the identifier (for example, after the initial XML is generated but before conversion into the specified CAE format). Contact your MI Administrator if you require this feature. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* stop_before_index *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property stop_before_index is of type int. Stops the export process before the step specified by the index (for example, after the initial XML is generated but before conversion into the specified CAE format). Contact your MI Administrator if you require this feature. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* unit_conversion_context *: [UnitConversionContext](#ansys.grantami.backend.soap.UnitConversionContext.UnitConversionContext)* + +Property unit_conversion_context is of type [`UnitConversionContext`](#module-ansys.grantami.backend.soap.UnitConversionContext). + +* **Return type:** + [`UnitConversionContext`](#module-ansys.grantami.backend.soap.UnitConversionContext) + + + + + +### ExportRecordDataResponse + + + +### *class* ExportRecordDataResponse(c_obj) + +Bases: [`Response`](#ansys.grantami.backend.soap.Response.Response) + +Output for the ExportRecordData operation. + +* **Parameters:** + **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a ExportRecordDataResponse object. + + + +#### *property* text *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property text is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### ExportedAttribute + + + +### *class* ExportedAttribute(db_key=None, attribute_id=None, is_standard_name=None, name=None, partial_table_reference=None, preferred_x_axis_parameter=None, pseudo_attribute=None, specific_unit_conversion_context=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +A type that allows identification of a particular attribute in a Granta MI, and also specifies how +that Attribute should be exported. + +* **Parameters:** + * **db_key** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **attribute_id** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **is_standard_name** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **partial_table_reference** ([`PartialTableReference`](#module-ansys.grantami.backend.soap.PartialTableReference)) + * **preferred_x_axis_parameter** ([`ParameterReference`](#module-ansys.grantami.backend.soap.ParameterReference)) + * **pseudo_attribute** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **specific_unit_conversion_context** ([`SpecificUnitConversionContext`](#module-ansys.grantami.backend.soap.SpecificUnitConversionContext)) + + + +#### *property* attribute_id *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property attribute_id is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* db_key *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property db_key is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* is_standard_name *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property is_standard_name is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* partial_table_reference *: [PartialTableReference](#ansys.grantami.backend.soap.PartialTableReference.PartialTableReference)* + +Property partial_table_reference is of type [`PartialTableReference`](#module-ansys.grantami.backend.soap.PartialTableReference). + +* **Return type:** + [`PartialTableReference`](#module-ansys.grantami.backend.soap.PartialTableReference) + + + +#### *property* preferred_x_axis_parameter *: [ParameterReference](#ansys.grantami.backend.soap.ParameterReference.ParameterReference)* + +Property preferred_x_axis_parameter is of type [`ParameterReference`](#module-ansys.grantami.backend.soap.ParameterReference). + +* **Return type:** + [`ParameterReference`](#module-ansys.grantami.backend.soap.ParameterReference) + + + +#### *property* pseudo_attribute *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property pseudo_attribute is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* specific_unit_conversion_context *: [SpecificUnitConversionContext](#ansys.grantami.backend.soap.SpecificUnitConversionContext.SpecificUnitConversionContext)* + +Property specific_unit_conversion_context is of type [`SpecificUnitConversionContext`](#module-ansys.grantami.backend.soap.SpecificUnitConversionContext). + +* **Return type:** + [`SpecificUnitConversionContext`](#module-ansys.grantami.backend.soap.SpecificUnitConversionContext) + + + + + +### Exporter + + + +### *class* Exporter(absolute_units_optional=None, description=None, key=None, model=None, name=None, output_file=None, package=None, transforms=None, unit_systems=None, use_absolute_units=None, validated_ok=None, version=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Details of a particular FEA Exporter configuration, typically obtained from an Exporter +Configuration File (EXP file) on the MI Server. + +* **Parameters:** + * **absolute_units_optional** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **description** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **key** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **model** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **output_file** ([`ExporterOutputFile`](#module-ansys.grantami.backend.soap.ExporterOutputFile)) + * **package** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **transforms** (list of [`ExporterTransform`](#module-ansys.grantami.backend.soap.ExporterTransform)) + * **unit_systems** ([*list*](https://docs.python.org/3/library/stdtypes.html#list) *of* [*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **use_absolute_units** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **validated_ok** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **version** ([*int*](https://docs.python.org/3/library/functions.html#int)) + + + +#### *property* absolute_units_optional *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property absolute_units_optional is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* description *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property description is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* key *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property key is of type str. The key that uniquely identifies this Exporter. This value is generated by the MI Server at runtime and may change between runs. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* model *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property model is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* output_file *: [ExporterOutputFile](#ansys.grantami.backend.soap.ExporterOutputFile.ExporterOutputFile)* + +Property output_file is of type [`ExporterOutputFile`](#module-ansys.grantami.backend.soap.ExporterOutputFile). + +* **Return type:** + [`ExporterOutputFile`](#module-ansys.grantami.backend.soap.ExporterOutputFile) + + + +#### *property* package *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property package is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* transforms *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[ExporterTransform](#ansys.grantami.backend.soap.ExporterTransform.ExporterTransform)]* + +Property transforms is a list of [`ExporterTransform`](#module-ansys.grantami.backend.soap.ExporterTransform) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`ExporterTransform`](#module-ansys.grantami.backend.soap.ExporterTransform) + + + +#### *property* unit_systems *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str)]* + +Property unit_systems is a list of str objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + [list](https://docs.python.org/3/library/stdtypes.html#list) of [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* use_absolute_units *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property use_absolute_units is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* validated_ok *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property validated_ok is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* version *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property version is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + + + +### ExporterOutputFile + + + +### *class* ExporterOutputFile(convention=None, custom_file_name=None, encoding=None, extension=None, folder=None, include_bom=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Specifies how an output file should be named. All values have the same meaning as in the +[`Exporter`](#module-ansys.grantami.backend.soap.Exporter) configuration schema. It is up to the client to +adhere (or not) to this. + +* **Parameters:** + * **convention** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **custom_file_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **encoding** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **extension** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **folder** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **include_bom** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + + + +#### *class* ExporterFileNameConvention + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + + + +#### Custom *= 4* + + + +#### Default *= 0* + + + +#### RecordName *= 3* + + + +#### TableName *= 2* + + + +#### TreeName *= 1* + + + +#### *property* convention *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property convention is of type int. See [`ExporterOutputFile.ExporterFileNameConvention`](#ansys.grantami.backend.soap.ExporterOutputFile.ExporterOutputFile.ExporterFileNameConvention) for supported values. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* custom_file_name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property custom_file_name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* encoding *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property encoding is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* extension *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property extension is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* folder *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property folder is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* include_bom *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property include_bom is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + + + +### ExporterParameter + + + +### *class* ExporterParameter(id_=None, name=None, parameter_reference=None, unit=None, usage=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Information about a Parameter of Functional Data. + +* **Parameters:** + * **id** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **parameter_reference** ([`ParameterReference`](#module-ansys.grantami.backend.soap.ParameterReference)) + * **unit** ([`UnitInformation`](#module-ansys.grantami.backend.soap.UnitInformation)) + * **usage** ([*int*](https://docs.python.org/3/library/functions.html#int)) + + + +#### *class* Usage + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + + + +#### Unknown *= 0* + + + +#### fixed *= 2* + + + +#### free *= 1* + + + +#### unused *= 3* + + + +#### *property* id_ *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property id_ is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* parameter_reference *: [ParameterReference](#ansys.grantami.backend.soap.ParameterReference.ParameterReference)* + +Property parameter_reference is of type [`ParameterReference`](#module-ansys.grantami.backend.soap.ParameterReference). + +* **Return type:** + [`ParameterReference`](#module-ansys.grantami.backend.soap.ParameterReference) + + + +#### *property* unit *: [UnitInformation](#ansys.grantami.backend.soap.UnitInformation.UnitInformation)* + +Property unit is of type [`UnitInformation`](#module-ansys.grantami.backend.soap.UnitInformation). + +* **Return type:** + [`UnitInformation`](#module-ansys.grantami.backend.soap.UnitInformation) + + + +#### *property* usage *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property usage is of type int. See [`ExporterParameter.Usage`](#ansys.grantami.backend.soap.ExporterParameter.ExporterParameter.Usage) for supported values. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + + + +### ExporterPopulation + + + +### *class* ExporterPopulation(description=None, key=None, model=None, name=None, package=None, population_state=None, transforms=None, validated_ok=None, version=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Details of a particular FEA [`Exporter`](#module-ansys.grantami.backend.soap.Exporter) configuration, typically +obtained from an [`Exporter`](#module-ansys.grantami.backend.soap.Exporter) Configuration File (EXP file) on +the MI Server. + +* **Parameters:** + * **description** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **key** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **model** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **package** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **population_state** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **transforms** (list of [`ExporterTransform`](#module-ansys.grantami.backend.soap.ExporterTransform)) + * **validated_ok** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **version** ([*int*](https://docs.python.org/3/library/functions.html#int)) + + + +#### *class* PopulationState + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + + + +#### FullyPopulated *= 1* + + + +#### PartiallyPopulated *= 2* + + + +#### Unknown *= 0* + + + +#### *property* description *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property description is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* key *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property key is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* model *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property model is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* package *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property package is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* population_state *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property population_state is of type int. See [`ExporterPopulation.PopulationState`](#ansys.grantami.backend.soap.ExporterPopulation.ExporterPopulation.PopulationState) for supported values. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* transforms *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[ExporterTransform](#ansys.grantami.backend.soap.ExporterTransform.ExporterTransform)]* + +Property transforms is a list of [`ExporterTransform`](#module-ansys.grantami.backend.soap.ExporterTransform) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`ExporterTransform`](#module-ansys.grantami.backend.soap.ExporterTransform) + + + +#### *property* validated_ok *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property validated_ok is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* version *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property version is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + + + +### ExporterTransform + + + +### *class* ExporterTransform(id_=None, type_=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Contains a type and an ID for an [`Exporter`](#module-ansys.grantami.backend.soap.Exporter) Transform. + +* **Parameters:** + * **id** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **type** ([*int*](https://docs.python.org/3/library/functions.html#int)) + + + +#### *class* Type + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + + + +#### Unknown *= 0* + + + +#### XSLT *= 1* + + + +#### *property* id_ *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property id_ is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* type_ *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property type_ is of type int. See [`ExporterTransform.Type`](#ansys.grantami.backend.soap.ExporterTransform.ExporterTransform.Type) for supported values. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + + + +### ExportersForRecord + + + +### *class* ExportersForRecord(exporters=None, record=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +A type to contain a record and its associated exporters. + +* **Parameters:** + * **exporters** (list of [`ExporterPopulation`](#module-ansys.grantami.backend.soap.ExporterPopulation)) + * **record** ([`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference)) + + + +#### *property* exporters *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[ExporterPopulation](#ansys.grantami.backend.soap.ExporterPopulation.ExporterPopulation)]* + +Property exporters is a list of [`ExporterPopulation`](#module-ansys.grantami.backend.soap.ExporterPopulation) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`ExporterPopulation`](#module-ansys.grantami.backend.soap.ExporterPopulation) + + + +#### *property* record *: [RecordReference](#ansys.grantami.backend.soap.RecordReference.RecordReference)* + +Property record is of type [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference). + +* **Return type:** + [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) + + + + + +### ExportersForRecordsRequest + + + +### *class* ExportersForRecordsRequest(applicability_tag=None, model=None, package=None, package_and_model_required=None, records=None, specific_attribute_exporters_only=None, version_policy=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Input for the ExportersForRecords operation. + +* **Parameters:** + * **applicability_tag** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **model** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **package** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **package_and_model_required** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **records** (list of [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference)) + * **specific_attribute_exporters_only** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **version_policy** ([*int*](https://docs.python.org/3/library/functions.html#int)) + + + +#### add_record(\_recordReference) + +Appends \_recordReference to records property on ExportersForRecordsRequest C-object. + +* **Parameters:** + **\_recordReference** ([`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference)) + + + +#### *property* applicability_tag *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property applicability_tag is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* model *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property model is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* package *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property package is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* package_and_model_required *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property package_and_model_required is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* records *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[RecordReference](#ansys.grantami.backend.soap.RecordReference.RecordReference)]* + +Property records is a list of [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) + + + +#### *property* specific_attribute_exporters_only *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property specific_attribute_exporters_only is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* version_policy *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property version_policy is of type int. See [`GRANTA_Constants`](#module-ansys.grantami.backend.soap.GRANTA_Constants) for supported values. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + + + +### ExportersForRecordsResponse + + + +### *class* ExportersForRecordsResponse(c_obj) + +Bases: [`Response`](#ansys.grantami.backend.soap.Response.Response) + +Output from the ExportersForRecords operation. Contains a list of records and supported exporters. + +* **Parameters:** + **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a ExportersForRecordsResponse object. + + + +#### *property* records *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[ExportersForRecord](#ansys.grantami.backend.soap.ExportersForRecord.ExportersForRecord)]* + +Property records is a list of [`ExportersForRecord`](#module-ansys.grantami.backend.soap.ExportersForRecord) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`ExportersForRecord`](#module-ansys.grantami.backend.soap.ExportersForRecord) + + + + + +### FileDataType + + + +### *class* FileDataType(url=None, content_type=None, data=None, description=None, file_name=None, is_applicable=None, \_is_owner=True) + +Bases: [`IDataValue`](#ansys.grantami.backend.soap.IDataValue.IDataValue) + +A type representing a piece of File data in a Granta MI database. +The URL can be used to data export a file from a Granta MI database. For importing a file into a +Granta MI database, the values of ‘file_name’, file ‘content_type’ and file ‘data’ must be +specified, where ‘file_name’ is the name you want the file to appear as in Granta MI, the +‘content_type’ data is the MIME content type of the binary data, and ‘data’ is the contents of the +file you wish to import to Granta MI. + +* **Parameters:** + * **url** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **content_type** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **data** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **description** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **file_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **is_applicable** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + + + +#### modify_binary_data(binary_data) + +Modify the byte string data of the file. + +* **Parameters:** + **binary_data** ([*bytes*](https://docs.python.org/3/library/stdtypes.html#bytes)) + + + +#### read_binary_data() + +Return a byte string representation of this file. + +* **Return type:** + [bytes](https://docs.python.org/3/library/stdtypes.html#bytes) + + + +#### *property* content_type *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property content_type is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* data *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property data is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* description *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property description is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* file_name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property file_name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* is_applicable *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property is_applicable is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* url *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property url is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### FloatFunctionalGraph + + + +### *class* FloatFunctionalGraph(hide_graph=None, logarithmic_y_axis=None, series=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +A type to contain a collection of [`Series`](#module-ansys.grantami.backend.soap.Series) objects that contain +the functional data. + +* **Parameters:** + * **hide_graph** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **logarithmic_y_axis** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **series** (list of [`Series`](#module-ansys.grantami.backend.soap.Series)) + + + +#### add_series(\_series) + +Appends \_series to series property on FloatFunctionalGraph C-object. + +* **Parameters:** + **\_series** ([`Series`](#module-ansys.grantami.backend.soap.Series)) + + + +#### *property* hide_graph *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property hide_graph is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* logarithmic_y_axis *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property logarithmic_y_axis is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* series *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[Series](#ansys.grantami.backend.soap.Series.Series)]* + +Property series is a list of [`Series`](#module-ansys.grantami.backend.soap.Series) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`Series`](#module-ansys.grantami.backend.soap.Series) + + + + + +### FloatFunctionalGriddedDataType + + + +### *class* FloatFunctionalGriddedDataType(decoration=None, default_x_axis_parameter=None, is_applicable=None, unit_information=None, values=None, functional_data_parameter_settings=None, \_is_owner=True) + +Bases: [`IDataValue`](#ansys.grantami.backend.soap.IDataValue.IDataValue) + +A type to contain the values of float-valued functional gridded data. +For requests, Values and [`Parameters`](#module-ansys.grantami.backend.soap.Parameters) are required. + +* **Parameters:** + * **decoration** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **default_x_axis_parameter** ([`ParameterInformation`](#module-ansys.grantami.backend.soap.ParameterInformation)) + * **is_applicable** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **unit_information** ([`UnitInformation`](#module-ansys.grantami.backend.soap.UnitInformation)) + * **values** ([`FloatFunctionalValues`](#module-ansys.grantami.backend.soap.FloatFunctionalValues)) + * **functional_data_parameter_settings** (list of [`FunctionalDataParameterSettings`](#module-ansys.grantami.backend.soap.FunctionalDataParameterSettings)) + + + +#### add_functional_data_parameter_settings(\_functionalDataParameterSettings) + +Appends \_functionalDataParameterSettings to functionalDataParameterSettings property on FloatFunctionalGriddedDataType C-object. + +* **Parameters:** + **\_functionalDataParameterSettings** ([`FunctionalDataParameterSettings`](#module-ansys.grantami.backend.soap.FunctionalDataParameterSettings)) + + + +#### *property* decoration *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property decoration is of type int. See [`GRANTA_Constants`](#module-ansys.grantami.backend.soap.GRANTA_Constants) for supported values. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* default_x_axis_parameter *: [ParameterInformation](#ansys.grantami.backend.soap.ParameterInformation.ParameterInformation)* + +Property default_x_axis_parameter is of type [`ParameterInformation`](#module-ansys.grantami.backend.soap.ParameterInformation). + +* **Return type:** + [`ParameterInformation`](#module-ansys.grantami.backend.soap.ParameterInformation) + + + +#### *property* functional_data_parameter_settings *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[FunctionalDataParameterSettings](#ansys.grantami.backend.soap.FunctionalDataParameterSettings.FunctionalDataParameterSettings)]* + +Property functional_data_parameter_settings is a list of [`FunctionalDataParameterSettings`](#module-ansys.grantami.backend.soap.FunctionalDataParameterSettings) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`FunctionalDataParameterSettings`](#module-ansys.grantami.backend.soap.FunctionalDataParameterSettings) + + + +#### *property* is_applicable *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property is_applicable is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* unit_information *: [UnitInformation](#ansys.grantami.backend.soap.UnitInformation.UnitInformation)* + +Property unit_information is of type [`UnitInformation`](#module-ansys.grantami.backend.soap.UnitInformation). + +* **Return type:** + [`UnitInformation`](#module-ansys.grantami.backend.soap.UnitInformation) + + + +#### *property* values *: [FloatFunctionalValues](#ansys.grantami.backend.soap.FloatFunctionalValues.FloatFunctionalValues)* + +Property values is of type [`FloatFunctionalValues`](#module-ansys.grantami.backend.soap.FloatFunctionalValues). + +* **Return type:** + [`FloatFunctionalValues`](#module-ansys.grantami.backend.soap.FloatFunctionalValues) + + + + + +### FloatFunctionalPointValue + + + +### *class* FloatFunctionalPointValue(constraints=None, value=None, is_estimated=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +A single grid point in Gridded Float-Valued Functional Data, where the Y-axis value is a point. + +* **Parameters:** + * **constraints** ([`Constraints`](#module-ansys.grantami.backend.soap.Constraints)) + * **value** ([*float*](https://docs.python.org/3/library/functions.html#float)) + * **is_estimated** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + + + +#### *property* constraints *: [Constraints](#ansys.grantami.backend.soap.Constraints.Constraints)* + +Property constraints is of type [`Constraints`](#module-ansys.grantami.backend.soap.Constraints). + +* **Return type:** + [`Constraints`](#module-ansys.grantami.backend.soap.Constraints) + + + +#### *property* is_estimated *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property is_estimated is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* value *: [float](https://docs.python.org/3/library/functions.html#float)* + +Property value is of type float. + +* **Return type:** + [float](https://docs.python.org/3/library/functions.html#float) + + + + + +### FloatFunctionalRangeValue + + + +### *class* FloatFunctionalRangeValue(constraints=None, high_value=None, low_value=None, is_estimated=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +A single grid point in Gridded Float-Valued Functional Data, where the Y-axis value is a range. + +* **Parameters:** + * **constraints** ([`Constraints`](#module-ansys.grantami.backend.soap.Constraints)) + * **high_value** ([*float*](https://docs.python.org/3/library/functions.html#float)) + * **low_value** ([*float*](https://docs.python.org/3/library/functions.html#float)) + * **is_estimated** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + + + +#### *property* constraints *: [Constraints](#ansys.grantami.backend.soap.Constraints.Constraints)* + +Property constraints is of type [`Constraints`](#module-ansys.grantami.backend.soap.Constraints). + +* **Return type:** + [`Constraints`](#module-ansys.grantami.backend.soap.Constraints) + + + +#### *property* high_value *: [float](https://docs.python.org/3/library/functions.html#float)* + +Property high_value is of type float. + +* **Return type:** + [float](https://docs.python.org/3/library/functions.html#float) + + + +#### *property* is_estimated *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property is_estimated is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* low_value *: [float](https://docs.python.org/3/library/functions.html#float)* + +Property low_value is of type float. + +* **Return type:** + [float](https://docs.python.org/3/library/functions.html#float) + + + + + +### FloatFunctionalSeriesDataType + + + +### *class* FloatFunctionalSeriesDataType(graph=None, is_applicable=None, unit_information=None, functional_data_parameter_settings=None, \_is_owner=True) + +Bases: [`IDataValue`](#ansys.grantami.backend.soap.IDataValue.IDataValue) + +A type to contain the values of float-valued functional series data. +For requests Graph, and [`Parameters`](#module-ansys.grantami.backend.soap.Parameters) are required. + +* **Parameters:** + * **graph** ([`FloatFunctionalSeriesGraph`](#module-ansys.grantami.backend.soap.FloatFunctionalSeriesGraph)) + * **is_applicable** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **unit_information** ([`UnitInformation`](#module-ansys.grantami.backend.soap.UnitInformation)) + * **functional_data_parameter_settings** (list of [`FunctionalDataParameterSettings`](#module-ansys.grantami.backend.soap.FunctionalDataParameterSettings)) + + + +#### add_functional_data_parameter_settings(\_functionalDataParameterSettings) + +Appends \_functionalDataParameterSettings to functionalDataParameterSettings property on FloatFunctionalSeriesDataType C-object. + +* **Parameters:** + **\_functionalDataParameterSettings** ([`FunctionalDataParameterSettings`](#module-ansys.grantami.backend.soap.FunctionalDataParameterSettings)) + + + +#### *property* functional_data_parameter_settings *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[FunctionalDataParameterSettings](#ansys.grantami.backend.soap.FunctionalDataParameterSettings.FunctionalDataParameterSettings)]* + +Property functional_data_parameter_settings is a list of [`FunctionalDataParameterSettings`](#module-ansys.grantami.backend.soap.FunctionalDataParameterSettings) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`FunctionalDataParameterSettings`](#module-ansys.grantami.backend.soap.FunctionalDataParameterSettings) + + + +#### *property* graph *: [FloatFunctionalSeriesGraph](#ansys.grantami.backend.soap.FloatFunctionalSeriesGraph.FloatFunctionalSeriesGraph)* + +Property graph is of type [`FloatFunctionalSeriesGraph`](#module-ansys.grantami.backend.soap.FloatFunctionalSeriesGraph). + +* **Return type:** + [`FloatFunctionalSeriesGraph`](#module-ansys.grantami.backend.soap.FloatFunctionalSeriesGraph) + + + +#### *property* is_applicable *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property is_applicable is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* unit_information *: [UnitInformation](#ansys.grantami.backend.soap.UnitInformation.UnitInformation)* + +Property unit_information is of type [`UnitInformation`](#module-ansys.grantami.backend.soap.UnitInformation). + +* **Return type:** + [`UnitInformation`](#module-ansys.grantami.backend.soap.UnitInformation) + + + + + +### FloatFunctionalSeriesGraph + + + +### *class* FloatFunctionalSeriesGraph(x_axis_parameter=None, hide_graph=None, logarithmic_y_axis=None, series=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +A type a collection of [`Series`](#module-ansys.grantami.backend.soap.Series) objects that contain the data +functional data and parameter information for the graph x-axis. +For requests an x_axis_parameter is required. + +* **Parameters:** + * **x_axis_parameter** ([`ParameterInformation`](#module-ansys.grantami.backend.soap.ParameterInformation)) + * **hide_graph** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **logarithmic_y_axis** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **series** (list of [`Series`](#module-ansys.grantami.backend.soap.Series)) + + + +#### add_series(\_series) + +Appends \_series to series property on FloatFunctionalSeriesGraph C-object. + +* **Parameters:** + **\_series** ([`Series`](#module-ansys.grantami.backend.soap.Series)) + + + +#### *property* hide_graph *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property hide_graph is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* logarithmic_y_axis *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property logarithmic_y_axis is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* series *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[Series](#ansys.grantami.backend.soap.Series.Series)]* + +Property series is a list of [`Series`](#module-ansys.grantami.backend.soap.Series) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`Series`](#module-ansys.grantami.backend.soap.Series) + + + +#### *property* x_axis_parameter *: [ParameterInformation](#ansys.grantami.backend.soap.ParameterInformation.ParameterInformation)* + +Property x_axis_parameter is of type [`ParameterInformation`](#module-ansys.grantami.backend.soap.ParameterInformation). + +* **Return type:** + [`ParameterInformation`](#module-ansys.grantami.backend.soap.ParameterInformation) + + + + + +### FloatFunctionalValues + + + +### *class* FloatFunctionalValues(point_values=None, range_values=None, value_type=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +A collection of [`FloatFunctionalPointValue`](#module-ansys.grantami.backend.soap.FloatFunctionalPointValue) and +[`FloatFunctionalRangeValue`](#module-ansys.grantami.backend.soap.FloatFunctionalRangeValue) objects. + +* **Parameters:** + * **point_values** (list of [`FloatFunctionalPointValue`](#module-ansys.grantami.backend.soap.FloatFunctionalPointValue)) + * **range_values** (list of [`FloatFunctionalRangeValue`](#module-ansys.grantami.backend.soap.FloatFunctionalRangeValue)) + * **value_type** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### add_point_value(\_floatFunctionalPointValue) + +Appends \_floatFunctionalPointValue to pointValues property on FloatFunctionalValues C-object. + +* **Parameters:** + **\_floatFunctionalPointValue** ([`FloatFunctionalPointValue`](#module-ansys.grantami.backend.soap.FloatFunctionalPointValue)) + + + +#### add_range_value(\_floatFunctionalRangeValue) + +Appends \_floatFunctionalRangeValue to rangeValues property on FloatFunctionalValues C-object. + +* **Parameters:** + **\_floatFunctionalRangeValue** ([`FloatFunctionalRangeValue`](#module-ansys.grantami.backend.soap.FloatFunctionalRangeValue)) + + + +#### *property* point_values *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[FloatFunctionalPointValue](#ansys.grantami.backend.soap.FloatFunctionalPointValue.FloatFunctionalPointValue)]* + +Property point_values is a list of [`FloatFunctionalPointValue`](#module-ansys.grantami.backend.soap.FloatFunctionalPointValue) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`FloatFunctionalPointValue`](#module-ansys.grantami.backend.soap.FloatFunctionalPointValue) + + + +#### *property* range_values *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[FloatFunctionalRangeValue](#ansys.grantami.backend.soap.FloatFunctionalRangeValue.FloatFunctionalRangeValue)]* + +Property range_values is a list of [`FloatFunctionalRangeValue`](#module-ansys.grantami.backend.soap.FloatFunctionalRangeValue) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`FloatFunctionalRangeValue`](#module-ansys.grantami.backend.soap.FloatFunctionalRangeValue) + + + +#### *property* value_type *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property value_type is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### FunctionalDataParameterSettings + + + +### *class* FunctionalDataParameterSettings(datum_default_value=None, datum_interpolation_method=None, datum_scale_type=None, effective_default_value=None, effective_default_value_defined_at=None, effective_interpolation_method=None, effective_interpolation_method_defined_at=None, effective_scale_type=None, effective_scale_type_defined_at=None, has_datum_default_value=None, has_datum_interpolation_method=None, has_datum_scale_type=None, has_effective_default_value=None, parameter=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Information about the use of a parameter for a given Functional Data Attribute. + +* **Parameters:** + * **datum_default_value** ([`DefaultParameterValue`](#module-ansys.grantami.backend.soap.DefaultParameterValue)) + * **datum_interpolation_method** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **datum_scale_type** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **effective_default_value** ([`DefaultParameterValue`](#module-ansys.grantami.backend.soap.DefaultParameterValue)) + * **effective_default_value_defined_at** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **effective_interpolation_method** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **effective_interpolation_method_defined_at** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **effective_scale_type** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **effective_scale_type_defined_at** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **has_datum_default_value** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **has_datum_interpolation_method** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **has_datum_scale_type** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **has_effective_default_value** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **parameter** ([`ParameterInformation`](#module-ansys.grantami.backend.soap.ParameterInformation)) + + + +#### *class* DefinedAt + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + + + +#### Attribute *= 1* + + + +#### Datum *= 2* + + + +#### Parameter *= 0* + + + +#### *property* datum_default_value *: [DefaultParameterValue](#ansys.grantami.backend.soap.DefaultParameterValue.DefaultParameterValue)* + +Property datum_default_value is of type [`DefaultParameterValue`](#module-ansys.grantami.backend.soap.DefaultParameterValue). + +* **Return type:** + [`DefaultParameterValue`](#module-ansys.grantami.backend.soap.DefaultParameterValue) + + + +#### *property* datum_interpolation_method *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property datum_interpolation_method is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* datum_scale_type *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property datum_scale_type is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* effective_default_value *: [DefaultParameterValue](#ansys.grantami.backend.soap.DefaultParameterValue.DefaultParameterValue)* + +Property effective_default_value is of type [`DefaultParameterValue`](#module-ansys.grantami.backend.soap.DefaultParameterValue). + +* **Return type:** + [`DefaultParameterValue`](#module-ansys.grantami.backend.soap.DefaultParameterValue) + + + +#### *property* effective_default_value_defined_at *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property effective_default_value_defined_at is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* effective_interpolation_method *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property effective_interpolation_method is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* effective_interpolation_method_defined_at *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property effective_interpolation_method_defined_at is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* effective_scale_type *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property effective_scale_type is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* effective_scale_type_defined_at *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property effective_scale_type_defined_at is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* has_datum_default_value *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property has_datum_default_value is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* has_datum_interpolation_method *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property has_datum_interpolation_method is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* has_datum_scale_type *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property has_datum_scale_type is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* has_effective_default_value *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property has_effective_default_value is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* parameter *: [ParameterInformation](#ansys.grantami.backend.soap.ParameterInformation.ParameterInformation)* + +Property parameter is of type [`ParameterInformation`](#module-ansys.grantami.backend.soap.ParameterInformation). + +* **Return type:** + [`ParameterInformation`](#module-ansys.grantami.backend.soap.ParameterInformation) + + + + + +### FunctionalDataSettings + + + +### *class* FunctionalDataSettings(convert_grid_to_series=None, max_series=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Settings affecting the export of Functional Data. +If convert_grid_to_series is true, gridded Functional Data will be converted to series data, +allowing you to avoid the need to deal with the gridded data format. + +* **Parameters:** + * **convert_grid_to_series** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **max_series** ([*int*](https://docs.python.org/3/library/functions.html#int)) + + + +#### *property* convert_grid_to_series *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property convert_grid_to_series is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* max_series *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property max_series is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + + + +### GRANTA_Constants + + + +### *class* BinaryDataRepresentation + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + + + +#### Inline *= 0* + + + +#### URL *= 1* + + + +### *class* GraphDecoration + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + + + +#### Lines *= 0* + + + +#### LinesAndMarkers *= 2* + + + +#### Markers *= 1* + + + +### *class* ImportErrorMode + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + + + +#### Continue *= 'LogAndContinueWherePossible'* + + + +#### Fault *= 'FaultAndRollbackOnAnyError'* + + + +### *class* ImportTypes + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + + + +#### Copy *= 'Copy'* + + + +#### Create *= 'Create'* + + + +#### Update *= 'Update'* + + + +### *class* MinMaxType + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + + + +#### MMApproximate *= 1* + + + +#### MMNone *= 0* + + + +#### MMTrue *= 2* + + + +### *class* ParameterTypes + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + + + +#### Discrete *= 'Discrete'* + + + +#### Numeric *= 'Numeric'* + + + +### *class* RecordLinkCheckMode + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + + + +#### Forward *= 'CheckOnlyForwardLinks'* + + + +#### ForwardAndReverse *= 'CheckForwardAndReverseLinks'* + + + +### *class* RecordLinkGroupTypes + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + + + +#### CrossDatabase *= 'crossDatabase'* + + + +#### Dynamic *= 'dynamic'* + + + +#### Static *= 'static'* + + + +### *class* SearchMode + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + + + +#### Normal *= 0* + + + +#### ReadOnly *= 1* + + + +#### Unspecified *= 2* + + + +### *class* TablesFilter + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + + + +#### CoatingsTablesOnly *= 9* + + + +#### ElementsTablesOnly *= 13* + + + +#### EndOfLifeOptionsTablesOnly *= 7* + + + +#### EnergyConversionOptionsTablesOnly *= 8* + + + +#### InHouseTablesOnly *= 11* + + + +#### LegislationsTablesOnly *= 4* + + + +#### MaterialsTablesOnly *= 1* + + + +#### MobileUseTypesTablesOnly *= 18* + + + +#### NoFilter *= 0* + + + +#### PartsTablesOnly *= 10* + + + +#### ProcessesTablesOnly *= 2* + + + +#### ProducersTablesOnly *= 15* + + + +#### ReferenceTablesOnly *= 17* + + + +#### RegionsTablesOnly *= 6* + + + +#### SequenceSpecificationsTablesOnly *= 12* + + + +#### ShapeTablesOnly *= 16* + + + +#### SubstancesTablesOnly *= 3* + + + +#### TransportTypesTablesOnly *= 5* + + + +#### UniverseTablesOnly *= 14* + + + +### *class* TabularSummaryColumnRollupType + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + + + +#### Chart *= 10* + + + +#### CoefficientOfVariation *= 9* + + + +#### Count *= 6* + + + +#### CountDistinct *= 7* + + + +#### List *= 0* + + + +#### ListDistinct *= 8* + + + +#### Max *= 1* + + + +#### Mean *= 3* + + + +#### Min *= 2* + + + +#### StandardDeviation *= 4* + + + +#### Sum *= 5* + + + +### *class* UpdateSubsetsMode + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + + + +#### Append *= 1* + + + +#### Replace *= 2* + + + +### *class* VersionPolicy + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + + + +#### IncludeAll *= 1* + + + +#### LatestVersionPerName *= 2* + + + +#### NoPolicy *= 0* + + + + + +### GRANTA_Exceptions + + + +### *exception* GRANTA_Exception(expr, msg) + +Bases: [`Exception`](https://docs.python.org/3/library/exceptions.html#Exception) + +Exception raised when there are errors in input. + +* **Parameters:** + * **expr** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – Input expression in which the error occurred + * **msg** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – Explanation of the error + + + +### *exception* GRANTA_ServiceLayerError(sl_response, operation) + +Bases: [`Exception`](https://docs.python.org/3/library/exceptions.html#Exception) + +Exception raised when the Granta MI Service Layer returns an error. + +* **Parameters:** + * **sl_response** ([`ServiceLayerResponse`](#ansys.grantami.backend.soap.ServiceLayerResponse.ServiceLayerResponse)) – Request data causing this error + * **operation** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – Name of the operation from which this exception originated + + + +#### *property* data *: [ServiceLayerResponse](#ansys.grantami.backend.soap.ServiceLayerResponse.ServiceLayerResponse)* + +The raw ServiceLayerResponse object. + +* **Return type:** + [`ServiceLayerResponse`](#ansys.grantami.backend.soap.ServiceLayerResponse.ServiceLayerResponse) + + + +#### *property* message *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Error message received from the Service Layer if an error occurred while processing the request, or the HTTP +status message corresponding to the status code received. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* operation *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +The Operation invoked by this Service Layer message. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* request_xml *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Content of the XML request for this Service Layer message. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* response_code *: [int](https://docs.python.org/3/library/functions.html#int)* + +HTTP Status code received from the Service Layer. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* response_xml *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Content of the XML response for this Service Layer message. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### GRANTA_Logging + + + +### *class* GRANTA_Logging + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Implements some basic logging functionality. Tracked events are printed to the console. +: For comprehensive logging capabilities, use the Python ‘logging’ module. + + + +#### *property* core_logger *: [Logger](https://docs.python.org/3/library/logging.html#logging.Logger)* + + + +#### *property* http_logger *: [Logger](https://docs.python.org/3/library/logging.html#logging.Logger)* + + + +#### propagate *: [bool](https://docs.python.org/3/library/functions.html#bool)* *= True* + + + + + +### GRANTA_MISession + + + +### *class* GRANTA_MISession(url, username=None, password=None, domain=None, verbosity='ERROR', auto_logon=False, receive_timeout=300000, authorization=None, retries=0) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +The base object for the GRANTA_MIScripting toolkit. This creates a connection to a +Granta MI Server via a Granta MI Service Layer. + +Parameters username, password, domain, and auto_logon are optional - use either set_credentials or +use_auto_logon to specify the desired authentication method if these are omitted. + +* **Parameters:** + * **url** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – URL of your Granta MI Service Layer installation + * **username** ([`str`](https://docs.python.org/3/library/stdtypes.html#str), optional) – Your Granta MI username (for Basic authentication) + * **password** ([`str`](https://docs.python.org/3/library/stdtypes.html#str), optional) – Your Granta MI password (for Basic authentication) + * **domain** ([`str`](https://docs.python.org/3/library/stdtypes.html#str), optional) – Your Granta MI user domain (for Basic authentication) + * **verbosity** ([`str`](https://docs.python.org/3/library/stdtypes.html#str), {‘ERROR’, ‘WARNING’, ‘DEBUG’}) – Logging verbosity + * **auto_logon** ([`bool`](https://docs.python.org/3/library/functions.html#bool), default: False) – If set to True, this object will authenticate as the current Windows user + * **receive_timeout** ([*int*](https://docs.python.org/3/library/functions.html#int)) – Time in milliseconds to wait for a response before timing out + * **authorization** ([`OIDC`](#ansys.grantami.backend.soap.OIDC.OIDC) object) – Authorization plugin (for OpenID Connect authentication) + * **retries** ([`int`](https://docs.python.org/3/library/functions.html#int), default: 0) – The number of times to retry failing requests + +#### 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. + + + +#### test_connection() + +Raises a GRANTA_Exception if connection cannot be made + +For example if bad credentials are provided, or Granta MI Service Layer is unreachable + + + +#### *property* browse_service *: [BrowseService](#ansys.grantami.backend.soap.BrowseService.BrowseService)* + +Service providing schema browse operations. + +* **Return type:** + [`BrowseService`](#ansys.grantami.backend.soap.BrowseService.BrowseService) + + + +#### *property* data_export_service *: [DataExportService](#ansys.grantami.backend.soap.DataExportService.DataExportService)* + +Service providing data export operations. + +* **Return type:** + [`DataExportService`](#ansys.grantami.backend.soap.DataExportService.DataExportService) + + + +#### *property* data_import_service *: [DataImportService](#ansys.grantami.backend.soap.DataImportService.DataImportService)* + +Service providing data import operations. + +* **Return type:** + [`DataImportService`](#ansys.grantami.backend.soap.DataImportService.DataImportService) + + + +#### *property* engineering_data_service *: [EngineeringDataService](#ansys.grantami.backend.soap.EngineeringDataService.EngineeringDataService)* + +Service providing export operations for Finite Element Analysis material cards. + +* **Return type:** + [`EngineeringDataService`](#ansys.grantami.backend.soap.EngineeringDataService.EngineeringDataService) + + + +#### *property* record_manipulator_service *: [RecordManipulatorService](#ansys.grantami.backend.soap.RecordManipulatorService.RecordManipulatorService)* + +Service providing additional operations for record manipulation. + +* **Return type:** + [`RecordManipulatorService`](#ansys.grantami.backend.soap.RecordManipulatorService.RecordManipulatorService) + + + +#### *property* search_service *: [SearchService](#ansys.grantami.backend.soap.SearchService.SearchService)* + +Service providing record search operations. + +* **Return type:** + [`SearchService`](#ansys.grantami.backend.soap.SearchService.SearchService) + + + + + +### GetAssociatedRecordsRequest + + + +### *class* GetAssociatedRecordsRequest(attribute_references=None, link_direction=None, populate_guids=None, record_filter=None, record_references=None, table_reference=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Input for the get_associated_records operation. + +* **Parameters:** + * **attribute_references** (list of [`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference)) + * **link_direction** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **populate_guids** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **record_filter** ([`RecordFilter`](#module-ansys.grantami.backend.soap.RecordFilter)) + * **record_references** (list of [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference)) + * **table_reference** ([`TableReference`](#module-ansys.grantami.backend.soap.TableReference)) + + + +#### *class* AssociationLinkDirection + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + + + +#### Both *= 0* + + + +#### Forward *= 1* + + + +#### NONE *= -1* + + + +#### Reverse *= 2* + + + +#### add_attribute_reference(\_attributeReference) + +Appends \_attributeReference to attributeReferences property on GetAssociatedRecordsRequest C-object. + +* **Parameters:** + **\_attributeReference** ([`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference)) + + + +#### add_record_reference(\_recordReference) + +Appends \_recordReference to recordReferences property on GetAssociatedRecordsRequest C-object. + +* **Parameters:** + **\_recordReference** ([`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference)) + + + +#### *property* attribute_references *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[AttributeReference](#ansys.grantami.backend.soap.AttributeReference.AttributeReference)]* + +Property attribute_references is a list of [`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference) + + + +#### *property* link_direction *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property link_direction is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* populate_guids *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property populate_guids is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* record_filter *: [RecordFilter](#ansys.grantami.backend.soap.RecordFilter.RecordFilter)* + +Property record_filter is of type [`RecordFilter`](#module-ansys.grantami.backend.soap.RecordFilter). + +* **Return type:** + [`RecordFilter`](#module-ansys.grantami.backend.soap.RecordFilter) + + + +#### *property* record_references *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[RecordReference](#ansys.grantami.backend.soap.RecordReference.RecordReference)]* + +Property record_references is a list of [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) + + + +#### *property* table_reference *: [TableReference](#ansys.grantami.backend.soap.TableReference.TableReference)* + +Property table_reference is of type [`TableReference`](#module-ansys.grantami.backend.soap.TableReference). + +* **Return type:** + [`TableReference`](#module-ansys.grantami.backend.soap.TableReference) + + + + + +### GetAssociatedRecordsResponse + + + +### *class* GetAssociatedRecordsResponse(c_obj) + +Bases: [`Response`](#ansys.grantami.backend.soap.Response.Response) + +Output from the GetAssociatedRecords operation. +An array of [`AssociatedRecords`](#module-ansys.grantami.backend.soap.AssociatedRecords) objects. + +* **Parameters:** + **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a GetAssociatedRecordsResponse object. + + + +#### add_associated_records(\_associatedRecords) + +Appends \_associatedRecords to associatedRecords property on GetAssociatedRecordsResponse C-object. + +* **Parameters:** + **\_associatedRecords** ([`AssociatedRecords`](#module-ansys.grantami.backend.soap.AssociatedRecords)) + + + +#### *property* associated_records *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[AssociatedRecords](#ansys.grantami.backend.soap.AssociatedRecords.AssociatedRecords)]* + +Property associated_records is a list of [`AssociatedRecords`](#module-ansys.grantami.backend.soap.AssociatedRecords) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`AssociatedRecords`](#module-ansys.grantami.backend.soap.AssociatedRecords) + + + + + +### GetAttributeDetailsRequest + + + +### *class* GetAttributeDetailsRequest(attribute_references=None, min_max_calculation=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Input for the get_attribute_details operation. +For requests at least one [`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference) is required. + +* **Parameters:** + * **attribute_references** (list of [`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference)) + * **min_max_calculation** ([*int*](https://docs.python.org/3/library/functions.html#int)) + + + +#### add_attribute_reference(\_attributeReference) + +Appends \_attributeReference to attributeReferences property on GetAttributeDetailsRequest C-object. + +* **Parameters:** + **\_attributeReference** ([`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference)) + + + +#### *property* attribute_references *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[AttributeReference](#ansys.grantami.backend.soap.AttributeReference.AttributeReference)]* + +Property attribute_references is a list of [`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference) + + + +#### *property* min_max_calculation *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property min_max_calculation is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + + + +### GetAttributeDetailsResponse + + + +### *class* GetAttributeDetailsResponse(c_obj) + +Bases: [`Response`](#ansys.grantami.backend.soap.Response.Response) + +Output from the get_attribute_details operation. +Includes an array of [`AttributeDetail`](#module-ansys.grantami.backend.soap.AttributeDetail) objects and a +[`ServiceLayerResponse`](#module-ansys.grantami.backend.soap.ServiceLayerResponse) object. + +* **Parameters:** + **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a GetAttributeDetailsResponse object. + + + +#### add_attribute_details(\_attributeDetail) + +Appends \_attributeDetail to attributeDetails property on GetAttributeDetailsResponse C-object. + +* **Parameters:** + **\_attributeDetail** ([`AttributeDetail`](#module-ansys.grantami.backend.soap.AttributeDetail)) + + + +#### *property* attribute_details *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[AttributeDetail](#ansys.grantami.backend.soap.AttributeDetail.AttributeDetail)]* + +Property attribute_details is a list of [`AttributeDetail`](#module-ansys.grantami.backend.soap.AttributeDetail) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`AttributeDetail`](#module-ansys.grantami.backend.soap.AttributeDetail) + + + + + +### GetAttributeParametersRequest + + + +### *class* GetAttributeParametersRequest(attribute_references=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Input for the get_attribute_parameters operation. +For requests, at least one [`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference) is required. + +* **Parameters:** + **attribute_references** (list of [`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference)) + + + +#### add_attribute_reference(\_attributeReference) + +Appends \_attributeReference to attributeReferences property on GetAttributeParametersRequest C-object. + +* **Parameters:** + **\_attributeReference** ([`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference)) + + + +#### *property* attribute_references *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[AttributeReference](#ansys.grantami.backend.soap.AttributeReference.AttributeReference)]* + +Property attribute_references is a list of [`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference) + + + + + +### GetAttributeParametersResponse + + + +### *class* GetAttributeParametersResponse(c_obj) + +Bases: [`Response`](#ansys.grantami.backend.soap.Response.Response) + +Output from the get_attribute_parameters operation. +Includes an array of [`ParameterDetail`](#module-ansys.grantami.backend.soap.ParameterDetail) objects and a +[`ServiceLayerResponse`](#module-ansys.grantami.backend.soap.ServiceLayerResponse) object. + +* **Parameters:** + **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a GetAttributeParametersResponse object. + + + +#### *property* attribute_parameters *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[ParameterDetail](#ansys.grantami.backend.soap.ParameterDetail.ParameterDetail)]* + +Property attribute_parameters is a list of [`ParameterDetail`](#module-ansys.grantami.backend.soap.ParameterDetail) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`ParameterDetail`](#module-ansys.grantami.backend.soap.ParameterDetail) + + + + + +### GetAvailableExportersRequest + + + +### *class* GetAvailableExportersRequest(db_key=None, applicability_tag=None, match_db=None, model=None, package=None, partial_table_reference=None, version_policy=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Input for the get_available_exporters operation. + +* **Parameters:** + * **db_key** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **applicability_tag** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **match_db** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **model** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **package** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **partial_table_reference** ([`PartialTableReference`](#module-ansys.grantami.backend.soap.PartialTableReference)) + * **version_policy** ([*int*](https://docs.python.org/3/library/functions.html#int)) + + + +#### *property* applicability_tag *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property applicability_tag is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* db_key *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property db_key is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* match_db *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property match_db is of type bool. If true, we check that the exporter config Table element is in a Database element for the right db_key. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* model *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property model is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* package *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property package is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* partial_table_reference *: [PartialTableReference](#ansys.grantami.backend.soap.PartialTableReference.PartialTableReference)* + +Property partial_table_reference is of type [`PartialTableReference`](#module-ansys.grantami.backend.soap.PartialTableReference). + +* **Return type:** + [`PartialTableReference`](#module-ansys.grantami.backend.soap.PartialTableReference) + + + +#### *property* version_policy *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property version_policy is of type int. See [`GRANTA_Constants`](#module-ansys.grantami.backend.soap.GRANTA_Constants) for supported values. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + + + +### GetAvailableExportersResponse + + + +### *class* GetAvailableExportersResponse(c_obj) + +Bases: [`Response`](#ansys.grantami.backend.soap.Response.Response) + +Output from the get_available_exporters operation. Contains a list of exporters. + +* **Parameters:** + **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a GetAvailableExportersResponse object. + + + +#### *property* exporters *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[Exporter](#ansys.grantami.backend.soap.Exporter.Exporter)]* + +Property exporters is a list of [`Exporter`](#module-ansys.grantami.backend.soap.Exporter) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`Exporter`](#module-ansys.grantami.backend.soap.Exporter) + + + + + +### GetChildNodes + + + +### *class* GetChildNodes(exclude_withdrawn=None, parent=None, populate_guids=None, record_filter=None, recurse=None, recurse_max_depth=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Input for the get_child_nodes operation. +A [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) for the record you wish to find the children +of is required. + +* **Parameters:** + * **exclude_withdrawn** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **parent** ([`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference)) + * **populate_guids** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **record_filter** ([`RecordFilter`](#module-ansys.grantami.backend.soap.RecordFilter)) + * **recurse** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **recurse_max_depth** ([*int*](https://docs.python.org/3/library/functions.html#int)) + + + +#### *property* exclude_withdrawn *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property exclude_withdrawn is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* parent *: [RecordReference](#ansys.grantami.backend.soap.RecordReference.RecordReference)* + +Property parent is of type [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference). + +* **Return type:** + [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) + + + +#### *property* populate_guids *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property populate_guids is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* record_filter *: [RecordFilter](#ansys.grantami.backend.soap.RecordFilter.RecordFilter)* + +Property record_filter is of type [`RecordFilter`](#module-ansys.grantami.backend.soap.RecordFilter). + +* **Return type:** + [`RecordFilter`](#module-ansys.grantami.backend.soap.RecordFilter) + + + +#### *property* recurse *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property recurse is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* recurse_max_depth *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property recurse_max_depth is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + + + +### GetChildNodesResponse + + + +### *class* GetChildNodesResponse(c_obj) + +Bases: [`Response`](#ansys.grantami.backend.soap.Response.Response) + +Response for the get_child_nodes operation. +Includes an array of [`TreeRecord`](#module-ansys.grantami.backend.soap.TreeRecord) objects and a +[`ServiceLayerResponse`](#module-ansys.grantami.backend.soap.ServiceLayerResponse) object. + +* **Parameters:** + **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a GetChildNodesResponse object. + + + +#### add_tree_record(\_treeRecord) + +Appends \_treeRecord to treeRecords property on GetChildNodesResponse C-object. + +* **Parameters:** + **\_treeRecord** ([`TreeRecord`](#module-ansys.grantami.backend.soap.TreeRecord)) + + + +#### *property* tree_records *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[TreeRecord](#ansys.grantami.backend.soap.TreeRecord.TreeRecord)]* + +Property tree_records is a list of [`TreeRecord`](#module-ansys.grantami.backend.soap.TreeRecord) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`TreeRecord`](#module-ansys.grantami.backend.soap.TreeRecord) + + + + + +### GetCurrenciesResponse + + + +### *class* GetCurrenciesResponse(c_obj) + +Bases: [`Response`](#ansys.grantami.backend.soap.Response.Response) + +Response for the get_currencies operation. +Includes an array of [`CurrencyDetail`](#module-ansys.grantami.backend.soap.CurrencyDetail) objects and a +[`ServiceLayerResponse`](#module-ansys.grantami.backend.soap.ServiceLayerResponse) object. + +* **Parameters:** + **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a GetCurrenciesResponse object. + + + +#### *property* currencies *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[CurrencyDetail](#ansys.grantami.backend.soap.CurrencyDetail.CurrencyDetail)]* + +Property currencies is a list of [`CurrencyDetail`](#module-ansys.grantami.backend.soap.CurrencyDetail) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`CurrencyDetail`](#module-ansys.grantami.backend.soap.CurrencyDetail) + + + + + +### GetDatabaseParameters + + + +### *class* GetDatabaseParameters(db_key=None, require_standard_names=None, use_standard_names_where_possible=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Input for the get_database_parameters operation. +Requires a db_key to be set. The parameters require_standard_names and +use_standard_names_where_possible both default to false. + +* **Parameters:** + * **db_key** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **require_standard_names** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **use_standard_names_where_possible** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + + + +#### *property* db_key *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property db_key is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* require_standard_names *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property require_standard_names is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* use_standard_names_where_possible *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property use_standard_names_where_possible is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + + + +### GetDatabaseParametersResponse + + + +### *class* GetDatabaseParametersResponse(c_obj) + +Bases: [`Response`](#ansys.grantami.backend.soap.Response.Response) + +Output from the get_database_parameters operation. +Includes an array of [`ParameterDetail`](#module-ansys.grantami.backend.soap.ParameterDetail) objects and a +[`ServiceLayerResponse`](#module-ansys.grantami.backend.soap.ServiceLayerResponse) object. + +* **Parameters:** + **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a GetDatabaseParametersResponse object. + + + +#### add_parameter_detail(\_parameterDetail) + +Appends \_parameterDetail to parameterDetails property on GetDatabaseParametersResponse C-object. + +* **Parameters:** + **\_parameterDetail** ([`ParameterDetail`](#module-ansys.grantami.backend.soap.ParameterDetail)) + + + +#### *property* parameter_details *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[ParameterDetail](#ansys.grantami.backend.soap.ParameterDetail.ParameterDetail)]* + +Property parameter_details is a list of [`ParameterDetail`](#module-ansys.grantami.backend.soap.ParameterDetail) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`ParameterDetail`](#module-ansys.grantami.backend.soap.ParameterDetail) + + + + + +### GetDatabasesResponse + + + +### *class* GetDatabasesResponse(c_obj) + +Bases: [`Response`](#ansys.grantami.backend.soap.Response.Response) + +Output from the get_databases operation. +Includes an array of [`DatabaseDetail`](#module-ansys.grantami.backend.soap.DatabaseDetail) objects and a +[`ServiceLayerResponse`](#module-ansys.grantami.backend.soap.ServiceLayerResponse) object. + +* **Parameters:** + **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a GetDatabasesResponse object. + + + +#### add_database(\_databaseDetail) + +Appends \_databaseDetail to databases property on GetDatabasesResponse C-object. + +* **Parameters:** + **\_databaseDetail** ([`DatabaseDetail`](#module-ansys.grantami.backend.soap.DatabaseDetail)) + + + +#### *property* databases *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[DatabaseDetail](#ansys.grantami.backend.soap.DatabaseDetail.DatabaseDetail)]* + +Property databases is a list of [`DatabaseDetail`](#module-ansys.grantami.backend.soap.DatabaseDetail) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`DatabaseDetail`](#module-ansys.grantami.backend.soap.DatabaseDetail) + + + + + +### GetDatasheetPath + + + +### *class* GetDatasheetPath(datasheet_type=None, record_references=None, unit_conversion_context=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Input for the get_datasheet_path operation. +Requires at least one [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) to be provided. The +parameters unit_conversion_context and datasheet_type are optional. datasheet_type defaults to +‘Datasheet’. + +* **Parameters:** + * **datasheet_type** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **record_references** (list of [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference)) + * **unit_conversion_context** ([`UnitConversionContext`](#module-ansys.grantami.backend.soap.UnitConversionContext)) + + + +#### add_record_reference(\_recordReference) + +Appends \_recordReference to recordReferences property on GetDatasheetPath C-object. + +* **Parameters:** + **\_recordReference** ([`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference)) + + + +#### *property* datasheet_type *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property datasheet_type is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* record_references *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[RecordReference](#ansys.grantami.backend.soap.RecordReference.RecordReference)]* + +Property record_references is a list of [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) + + + +#### *property* unit_conversion_context *: [UnitConversionContext](#ansys.grantami.backend.soap.UnitConversionContext.UnitConversionContext)* + +Property unit_conversion_context is of type [`UnitConversionContext`](#module-ansys.grantami.backend.soap.UnitConversionContext). + +* **Return type:** + [`UnitConversionContext`](#module-ansys.grantami.backend.soap.UnitConversionContext) + + + + + +### GetDatasheetPathParameterized + + + +### *class* GetDatasheetPathParameterized(db_key=None, datasheet_type=None, unit_conversion_context=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Input for the get_datasheet_path_parameterized operation. +Requires a db_key to be set. The parameters unit_conversion_context and datasheet_type are optional. +datasheet_type defaults to ‘Datasheet’. + +* **Parameters:** + * **db_key** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **datasheet_type** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **unit_conversion_context** ([`UnitConversionContext`](#module-ansys.grantami.backend.soap.UnitConversionContext)) + + + +#### *property* datasheet_type *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property datasheet_type is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* db_key *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property db_key is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* unit_conversion_context *: [UnitConversionContext](#ansys.grantami.backend.soap.UnitConversionContext.UnitConversionContext)* + +Property unit_conversion_context is of type [`UnitConversionContext`](#module-ansys.grantami.backend.soap.UnitConversionContext). + +* **Return type:** + [`UnitConversionContext`](#module-ansys.grantami.backend.soap.UnitConversionContext) + + + + + +### GetDatasheetPathParameterizedResponse + + + +### *class* GetDatasheetPathParameterizedResponse(c_obj) + +Bases: [`Response`](#ansys.grantami.backend.soap.Response.Response) + +Output from the get_datasheet_path_parametrized operation. +Includes an array of DatasheetPathParameterized objects and a +[`ServiceLayerResponse`](#module-ansys.grantami.backend.soap.ServiceLayerResponse) object. + +* **Parameters:** + **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a GetDatasheetPathParameterizedResponse object. + + + +#### *property* currency_query *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property currency_query is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* db_key_query *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property db_key_query is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* record_history_identity_query_name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property record_history_identity_query_name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* unit_system_query *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property unit_system_query is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* url *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property url is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### GetDatasheetPathResponse + + + +### *class* GetDatasheetPathResponse(c_obj) + +Bases: [`Response`](#ansys.grantami.backend.soap.Response.Response) + +Output from the get_datasheet_path operation. +Includes an array of [`DatasheetPath`](#module-ansys.grantami.backend.soap.DatasheetPath) objects and a +[`ServiceLayerResponse`](#module-ansys.grantami.backend.soap.ServiceLayerResponse) object. + +* **Parameters:** + **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a GetDatasheetPathResponse object. + + + +#### *property* datasheet_paths *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[DatasheetPath](#ansys.grantami.backend.soap.DatasheetPath.DatasheetPath)]* + +Property datasheet_paths is a list of [`DatasheetPath`](#module-ansys.grantami.backend.soap.DatasheetPath) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`DatasheetPath`](#module-ansys.grantami.backend.soap.DatasheetPath) + + + + + +### GetExporterParametersRequest + + + +### *class* GetExporterParametersRequest(exporter_key=None, populate_guids=None, records=None, unit_conversion_context=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Input for the get_exporter_parameters operation. + +* **Parameters:** + * **exporter_key** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **populate_guids** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **records** (list of [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference)) + * **unit_conversion_context** ([`UnitConversionContext`](#module-ansys.grantami.backend.soap.UnitConversionContext)) + + + +#### add_record(\_recordReference) + +Appends \_recordReference to records property on GetExporterParametersRequest C-object. + +* **Parameters:** + **\_recordReference** ([`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference)) + + + +#### *property* exporter_key *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property exporter_key is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* populate_guids *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property populate_guids is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* records *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[RecordReference](#ansys.grantami.backend.soap.RecordReference.RecordReference)]* + +Property records is a list of [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) + + + +#### *property* unit_conversion_context *: [UnitConversionContext](#ansys.grantami.backend.soap.UnitConversionContext.UnitConversionContext)* + +Property unit_conversion_context is of type [`UnitConversionContext`](#module-ansys.grantami.backend.soap.UnitConversionContext). + +* **Return type:** + [`UnitConversionContext`](#module-ansys.grantami.backend.soap.UnitConversionContext) + + + + + +### GetExporterParametersResponse + + + +### *class* GetExporterParametersResponse(c_obj) + +Bases: [`Response`](#ansys.grantami.backend.soap.Response.Response) + +Output from the get_exporter_parameters operation. Contains a list of records and details for +exporting their attributes. + +* **Parameters:** + **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a GetExporterParametersResponse object. + + + +#### *property* records *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[RecordExporterParameters](#ansys.grantami.backend.soap.RecordExporterParameters.RecordExporterParameters)]* + +Property records is a list of [`RecordExporterParameters`](#module-ansys.grantami.backend.soap.RecordExporterParameters) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`RecordExporterParameters`](#module-ansys.grantami.backend.soap.RecordExporterParameters) + + + + + +### GetIntegrationProfiles + + + +### *class* GetIntegrationProfiles(databases=None, depth=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Input for the get_integration_profiles operation. + +* **Parameters:** + * **databases** ([*list*](https://docs.python.org/3/library/stdtypes.html#list) *of* [*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **depth** ([*int*](https://docs.python.org/3/library/functions.html#int)) + + + +#### *class* Depth + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + + + +#### Databases *= 1* + + + +#### Profiles *= 0* + + + +#### Tables *= 2* + + + +#### add_database(value) + +Appends value to databases property on GetIntegrationProfiles C-object. + +* **Parameters:** + **value** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *property* databases *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str)]* + +Property databases is a list of str objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + [list](https://docs.python.org/3/library/stdtypes.html#list) of [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* depth *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property depth is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + + + +### GetIntegrationProfilesResponse + + + +### *class* GetIntegrationProfilesResponse(c_obj) + +Bases: [`Response`](#ansys.grantami.backend.soap.Response.Response) + +Output from get_integration_profiles operation. +Includes an array of [`IntegrationProfileDetail`](#module-ansys.grantami.backend.soap.IntegrationProfileDetail) objects and a +[`ServiceLayerResponse`](#module-ansys.grantami.backend.soap.ServiceLayerResponse). + +* **Parameters:** + **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a GetIntegrationProfilesResponse object. + + + +#### *property* profile_details *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[IntegrationProfileDetail](#ansys.grantami.backend.soap.IntegrationProfileDetail.IntegrationProfileDetail)]* + +Property profile_details is a list of [`IntegrationProfileDetail`](#module-ansys.grantami.backend.soap.IntegrationProfileDetail) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`IntegrationProfileDetail`](#module-ansys.grantami.backend.soap.IntegrationProfileDetail) + + + + + +### GetLayouts + + + +### *class* GetLayouts(applicability_tag=None, layouts=None, min_max_calculation=None, table=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Input for the get_layouts operation. +Includes a table reference or list of layouts to retrieve. + +* **Parameters:** + * **applicability_tag** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **layouts** (list of [`LayoutReference`](#module-ansys.grantami.backend.soap.LayoutReference)) + * **min_max_calculation** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **table** ([`TableReference`](#module-ansys.grantami.backend.soap.TableReference)) + + + +#### add_layout(\_layoutReference) + +Appends \_layoutReference to layouts property on GetLayouts C-object. + +* **Parameters:** + **\_layoutReference** ([`LayoutReference`](#module-ansys.grantami.backend.soap.LayoutReference)) + + + +#### *property* applicability_tag *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property applicability_tag is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* layouts *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[LayoutReference](#ansys.grantami.backend.soap.LayoutReference.LayoutReference)]* + +Property layouts is a list of [`LayoutReference`](#module-ansys.grantami.backend.soap.LayoutReference) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`LayoutReference`](#module-ansys.grantami.backend.soap.LayoutReference) + + + +#### *property* min_max_calculation *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property min_max_calculation is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* table *: [TableReference](#ansys.grantami.backend.soap.TableReference.TableReference)* + +Property table is of type [`TableReference`](#module-ansys.grantami.backend.soap.TableReference). + +* **Return type:** + [`TableReference`](#module-ansys.grantami.backend.soap.TableReference) + + + + + +### GetLayoutsResponse + + + +### *class* GetLayoutsResponse(c_obj) + +Bases: [`Response`](#ansys.grantami.backend.soap.Response.Response) + +Output from the get_layouts operation. +Includes a list of layouts retrieved. + +* **Parameters:** + **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a GetLayoutsResponse object. + + + +#### add_layout_detail(\_layoutDetail) + +Appends \_layoutDetail to layoutDetails property on GetLayoutsResponse C-object. + +* **Parameters:** + **\_layoutDetail** ([`LayoutDetail`](#module-ansys.grantami.backend.soap.LayoutDetail)) + + + +#### *property* layout_details *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[LayoutDetail](#ansys.grantami.backend.soap.LayoutDetail.LayoutDetail)]* + +Property layout_details is a list of [`LayoutDetail`](#module-ansys.grantami.backend.soap.LayoutDetail) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`LayoutDetail`](#module-ansys.grantami.backend.soap.LayoutDetail) + + + + + +### GetLinkedRecordsRequest + + + +### *class* GetLinkedRecordsRequest(direct_links_only=None, populate_guids=None, record_filter=None, record_link_groups=None, record_references=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Input for the get_linked_records operation. + +* **Parameters:** + * **direct_links_only** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **populate_guids** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **record_filter** ([`RecordFilter`](#module-ansys.grantami.backend.soap.RecordFilter)) + * **record_link_groups** (list of [`RecordLinkGroupReference`](#module-ansys.grantami.backend.soap.RecordLinkGroupReference)) + * **record_references** (list of [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference)) + + + +#### add_record_link_group(\_recordLinkGroupReference) + +Appends \_recordLinkGroupReference to recordLinkGroups property on GetLinkedRecordsRequest C-object. + +* **Parameters:** + **\_recordLinkGroupReference** ([`RecordLinkGroupReference`](#module-ansys.grantami.backend.soap.RecordLinkGroupReference)) + + + +#### add_record_reference(\_recordReference) + +Appends \_recordReference to recordReferences property on GetLinkedRecordsRequest C-object. + +* **Parameters:** + **\_recordReference** ([`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference)) + + + +#### *property* direct_links_only *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property direct_links_only is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* populate_guids *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property populate_guids is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* record_filter *: [RecordFilter](#ansys.grantami.backend.soap.RecordFilter.RecordFilter)* + +Property record_filter is of type [`RecordFilter`](#module-ansys.grantami.backend.soap.RecordFilter). + +* **Return type:** + [`RecordFilter`](#module-ansys.grantami.backend.soap.RecordFilter) + + + +#### *property* record_link_groups *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[RecordLinkGroupReference](#ansys.grantami.backend.soap.RecordLinkGroupReference.RecordLinkGroupReference)]* + +Property record_link_groups is a list of [`RecordLinkGroupReference`](#module-ansys.grantami.backend.soap.RecordLinkGroupReference) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`RecordLinkGroupReference`](#module-ansys.grantami.backend.soap.RecordLinkGroupReference) + + + +#### *property* record_references *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[RecordReference](#ansys.grantami.backend.soap.RecordReference.RecordReference)]* + +Property record_references is a list of [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) + + + + + +### GetLinkedRecordsResponse + + + +### *class* GetLinkedRecordsResponse(c_obj) + +Bases: [`Response`](#ansys.grantami.backend.soap.Response.Response) + +Output from the get_linked_records operation. +Includes an array of [`SourceRecord`](#module-ansys.grantami.backend.soap.SourceRecord) objects and a +[`ServiceLayerResponse`](#module-ansys.grantami.backend.soap.ServiceLayerResponse) object. + +* **Parameters:** + **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a GetLinkedRecordsResponse object. + + + +#### *property* source_records *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[SourceRecord](#ansys.grantami.backend.soap.SourceRecord.SourceRecord)]* + +Property source_records is a list of [`SourceRecord`](#module-ansys.grantami.backend.soap.SourceRecord) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`SourceRecord`](#module-ansys.grantami.backend.soap.SourceRecord) + + + + + +### GetMetaAttributesRequest + + + +### *class* GetMetaAttributesRequest(attribute_references=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Input for the get_meta_attributes operation. + +* **Parameters:** + **attribute_references** (list of [`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference)) + + + +#### add_attribute_reference(\_attributeReference) + +Appends \_attributeReference to attributeReferences property on GetMetaAttributesRequest C-object. + +* **Parameters:** + **\_attributeReference** ([`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference)) + + + +#### *property* attribute_references *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[AttributeReference](#ansys.grantami.backend.soap.AttributeReference.AttributeReference)]* + +Property attribute_references is a list of [`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference) + + + + + +### GetMetaAttributesResponse + + + +### *class* GetMetaAttributesResponse(c_obj) + +Bases: [`Response`](#ansys.grantami.backend.soap.Response.Response) + +Output from the get_meta_attributes operation. Includes an array of +[`AttributeMetaAttributes`](#module-ansys.grantami.backend.soap.AttributeMetaAttributes) objects and a +[`ServiceLayerResponse`](#module-ansys.grantami.backend.soap.ServiceLayerResponse) object. + +* **Parameters:** + **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a GetMetaAttributesResponse object. + + + +#### *property* attributes *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[AttributeMetaAttributes](#ansys.grantami.backend.soap.AttributeMetaAttributes.AttributeMetaAttributes)]* + +Property attributes is a list of [`AttributeMetaAttributes`](#module-ansys.grantami.backend.soap.AttributeMetaAttributes) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`AttributeMetaAttributes`](#module-ansys.grantami.backend.soap.AttributeMetaAttributes) + + + + + +### GetParameterDetailsRequest + + + +### *class* GetParameterDetailsRequest(attribute=None, parameter_references=None, record_reference=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Input for the get_parameter_details operation. + +* **Parameters:** + * **attribute** ([`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference)) + * **parameter_references** (list of [`ParameterReference`](#module-ansys.grantami.backend.soap.ParameterReference)) + * **record_reference** ([`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference)) + + + +#### add_parameter_reference(\_parameterReference) + +Appends \_parameterReference to parameterReferences property on GetParameterDetailsRequest C-object. + +* **Parameters:** + **\_parameterReference** ([`ParameterReference`](#module-ansys.grantami.backend.soap.ParameterReference)) + + + +#### *property* attribute *: [AttributeReference](#ansys.grantami.backend.soap.AttributeReference.AttributeReference)* + +Property attribute is of type [`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference). + +* **Return type:** + [`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference) + + + +#### *property* parameter_references *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[ParameterReference](#ansys.grantami.backend.soap.ParameterReference.ParameterReference)]* + +Property parameter_references is a list of [`ParameterReference`](#module-ansys.grantami.backend.soap.ParameterReference) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`ParameterReference`](#module-ansys.grantami.backend.soap.ParameterReference) + + + +#### *property* record_reference *: [RecordReference](#ansys.grantami.backend.soap.RecordReference.RecordReference)* + +Property record_reference is of type [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference). + +* **Return type:** + [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) + + + + + +### GetParameterDetailsResponse + + + +### *class* GetParameterDetailsResponse(c_obj) + +Bases: [`Response`](#ansys.grantami.backend.soap.Response.Response) + +Output from the get_parameter_details operation. +Includes an array of [`ParameterDetail`](#module-ansys.grantami.backend.soap.ParameterDetail) objects and a +[`ServiceLayerResponse`](#module-ansys.grantami.backend.soap.ServiceLayerResponse) object. + +* **Parameters:** + **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a GetParameterDetailsResponse object. + + + +#### *property* attribute_parameters *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[ParameterDetail](#ansys.grantami.backend.soap.ParameterDetail.ParameterDetail)]* + +Property attribute_parameters is a list of [`ParameterDetail`](#module-ansys.grantami.backend.soap.ParameterDetail) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`ParameterDetail`](#module-ansys.grantami.backend.soap.ParameterDetail) + + + + + +### GetRecordAttributesByRefRequest + + + +### *class* GetRecordAttributesByRefRequest(attribute_references=None, binary_data=None, direct_links_only=None, exported_attributes=None, functional_data_settings=None, populate_guids=None, record_filter=None, record_references=None, unit_conversion_context=None, use_fallback=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Input for the get_record_attributes_by_ref operation. +For requests, at least one [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) and at least one +[`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference) is required. + +* **Parameters:** + * **attribute_references** (list of [`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference)) + * **binary_data** ([`BinaryDataSettings`](#module-ansys.grantami.backend.soap.BinaryDataSettings)) + * **direct_links_only** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **exported_attributes** (list of [`ExportedAttribute`](#module-ansys.grantami.backend.soap.ExportedAttribute)) + * **functional_data_settings** ([`FunctionalDataSettings`](#module-ansys.grantami.backend.soap.FunctionalDataSettings)) + * **populate_guids** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **record_filter** ([`RecordFilter`](#module-ansys.grantami.backend.soap.RecordFilter)) + * **record_references** (list of [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference)) + * **unit_conversion_context** ([`UnitConversionContext`](#module-ansys.grantami.backend.soap.UnitConversionContext)) + * **use_fallback** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + + + +#### add_attribute_reference(\_attributeReference) + +Appends \_attributeReference to attributeReferences property on GetRecordAttributesByRefRequest C-object. + +* **Parameters:** + **\_attributeReference** ([`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference)) + + + +#### add_exported_attribute(\_exportedAttribute) + +Appends \_exportedAttribute to exportedAttributes property on GetRecordAttributesByRefRequest C-object. + +* **Parameters:** + **\_exportedAttribute** ([`ExportedAttribute`](#module-ansys.grantami.backend.soap.ExportedAttribute)) + + + +#### add_record_reference(\_recordReference) + +Appends \_recordReference to recordReferences property on GetRecordAttributesByRefRequest C-object. + +* **Parameters:** + **\_recordReference** ([`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference)) + + + +#### *property* attribute_references *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[AttributeReference](#ansys.grantami.backend.soap.AttributeReference.AttributeReference)]* + +Property attribute_references is a list of [`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference) + + + +#### *property* binary_data *: [BinaryDataSettings](#ansys.grantami.backend.soap.BinaryDataSettings.BinaryDataSettings)* + +Property binary_data is of type [`BinaryDataSettings`](#module-ansys.grantami.backend.soap.BinaryDataSettings). + +* **Return type:** + [`BinaryDataSettings`](#module-ansys.grantami.backend.soap.BinaryDataSettings) + + + +#### *property* direct_links_only *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property direct_links_only is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* exported_attributes *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[ExportedAttribute](#ansys.grantami.backend.soap.ExportedAttribute.ExportedAttribute)]* + +Property exported_attributes is a list of [`ExportedAttribute`](#module-ansys.grantami.backend.soap.ExportedAttribute) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`ExportedAttribute`](#module-ansys.grantami.backend.soap.ExportedAttribute) + + + +#### *property* functional_data_settings *: [FunctionalDataSettings](#ansys.grantami.backend.soap.FunctionalDataSettings.FunctionalDataSettings)* + +Property functional_data_settings is of type [`FunctionalDataSettings`](#module-ansys.grantami.backend.soap.FunctionalDataSettings). + +* **Return type:** + [`FunctionalDataSettings`](#module-ansys.grantami.backend.soap.FunctionalDataSettings) + + + +#### *property* populate_guids *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property populate_guids is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* record_filter *: [RecordFilter](#ansys.grantami.backend.soap.RecordFilter.RecordFilter)* + +Property record_filter is of type [`RecordFilter`](#module-ansys.grantami.backend.soap.RecordFilter). + +* **Return type:** + [`RecordFilter`](#module-ansys.grantami.backend.soap.RecordFilter) + + + +#### *property* record_references *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[RecordReference](#ansys.grantami.backend.soap.RecordReference.RecordReference)]* + +Property record_references is a list of [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) + + + +#### *property* unit_conversion_context *: [UnitConversionContext](#ansys.grantami.backend.soap.UnitConversionContext.UnitConversionContext)* + +Property unit_conversion_context is of type [`UnitConversionContext`](#module-ansys.grantami.backend.soap.UnitConversionContext). + +* **Return type:** + [`UnitConversionContext`](#module-ansys.grantami.backend.soap.UnitConversionContext) + + + +#### *property* use_fallback *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property use_fallback is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + + + +### GetRecordAttributesByRefResponse + + + +### *class* GetRecordAttributesByRefResponse(c_obj) + +Bases: [`Response`](#ansys.grantami.backend.soap.Response.Response) + +Output from the get_record_attributes_by_ref operation. +Includes an array of [`RecordData`](#module-ansys.grantami.backend.soap.RecordData) objects and a +[`ServiceLayerResponse`](#module-ansys.grantami.backend.soap.ServiceLayerResponse) object. + +* **Parameters:** + **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a GetRecordAttributesByRefResponse object. + + + +#### add_record_data(\_recordData) + +Appends \_recordData to recordData property on GetRecordAttributesByRefResponse C-object. + +* **Parameters:** + **\_recordData** ([`RecordData`](#module-ansys.grantami.backend.soap.RecordData)) + + + +#### *property* record_data *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[RecordData](#ansys.grantami.backend.soap.RecordData.RecordData)]* + +Property record_data is a list of [`RecordData`](#module-ansys.grantami.backend.soap.RecordData) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`RecordData`](#module-ansys.grantami.backend.soap.RecordData) + + + + + +### GetRecordAttributesRequest + + + +### *class* GetRecordAttributesRequest(include_empty=None, include_meta=None, include_param_details=None, min_max_calculation=None, record_references=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Input for the get_record_attributes operation. + +* **Parameters:** + * **include_empty** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **include_meta** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **include_param_details** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **min_max_calculation** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **record_references** (list of [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference)) + + + +#### add_record_reference(\_recordReference) + +Appends \_recordReference to recordReferences property on GetRecordAttributesRequest C-object. + +* **Parameters:** + **\_recordReference** ([`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference)) + + + +#### *property* include_empty *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property include_empty is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* include_meta *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property include_meta is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* include_param_details *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property include_param_details is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* min_max_calculation *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property min_max_calculation is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* record_references *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[RecordReference](#ansys.grantami.backend.soap.RecordReference.RecordReference)]* + +Property record_references is a list of [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) + + + + + +### GetRecordAttributesResponse + + + +### *class* GetRecordAttributesResponse(c_obj) + +Bases: [`Response`](#ansys.grantami.backend.soap.Response.Response) + +Output from the get_record_attributes operation. +Includes an array of [`RecordAttribute`](#module-ansys.grantami.backend.soap.RecordAttribute) objects and a +[`ServiceLayerResponse`](#module-ansys.grantami.backend.soap.ServiceLayerResponse) object. + +* **Parameters:** + **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a GetRecordAttributesResponse object. + + + +#### add_record_attribute(\_recordAttribute) + +Appends \_recordAttribute to recordAttributes property on GetRecordAttributesResponse C-object. + +* **Parameters:** + **\_recordAttribute** ([`RecordAttribute`](#module-ansys.grantami.backend.soap.RecordAttribute)) + + + +#### *property* record_attributes *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[RecordAttribute](#ansys.grantami.backend.soap.RecordAttribute.RecordAttribute)]* + +Property record_attributes is a list of [`RecordAttribute`](#module-ansys.grantami.backend.soap.RecordAttribute) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`RecordAttribute`](#module-ansys.grantami.backend.soap.RecordAttribute) + + + + + +### GetRecordLinkGroups + + + +### *class* GetRecordLinkGroups(db_key=None, record_link_groups=None, standard_names_only=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Returns details of Record Link Groups in a Granta MI Database. + +* **Parameters:** + * **db_key** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **record_link_groups** (list of [`RecordLinkGroupReference`](#module-ansys.grantami.backend.soap.RecordLinkGroupReference)) + * **standard_names_only** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + + + +#### add_record_link_group(\_recordLinkGroupReference) + +Appends \_recordLinkGroupReference to recordLinkGroups property on GetRecordLinkGroups C-object. + +* **Parameters:** + **\_recordLinkGroupReference** ([`RecordLinkGroupReference`](#module-ansys.grantami.backend.soap.RecordLinkGroupReference)) + + + +#### *property* db_key *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property db_key is of type str. When this is provided, details of all Record Link Groups in the specified Granta MI Database will be returned. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* record_link_groups *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[RecordLinkGroupReference](#ansys.grantami.backend.soap.RecordLinkGroupReference.RecordLinkGroupReference)]* + +Property record_link_groups is a list of [`RecordLinkGroupReference`](#module-ansys.grantami.backend.soap.RecordLinkGroupReference) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`RecordLinkGroupReference`](#module-ansys.grantami.backend.soap.RecordLinkGroupReference) + + + +#### *property* standard_names_only *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property standard_names_only is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + + + +### GetRecordLinkGroupsResponse + + + +### *class* GetRecordLinkGroupsResponse(c_obj) + +Bases: [`Response`](#ansys.grantami.backend.soap.Response.Response) + +Output from the get_record_link_groups operation. + +* **Parameters:** + **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a GetRecordLinkGroupsResponse object. + + + +#### *property* record_link_groups *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[RecordLinkGroupDetail](#ansys.grantami.backend.soap.RecordLinkGroupDetail.RecordLinkGroupDetail)]* + +Property record_link_groups is a list of [`RecordLinkGroupDetail`](#module-ansys.grantami.backend.soap.RecordLinkGroupDetail) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`RecordLinkGroupDetail`](#module-ansys.grantami.backend.soap.RecordLinkGroupDetail) + + + + + +### GetRecordVersionsRequest + + + +### *class* GetRecordVersionsRequest(records=None, versions=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Input for the get_record_versions operation. + +* **Parameters:** + * **records** (list of [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference)) + * **versions** ([*int*](https://docs.python.org/3/library/functions.html#int)) + + + +#### *class* VersionSelector + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + + + +#### All *= 3* + + + +#### AllReleased *= 2* + + + +#### Latest *= 1* + + + +#### LatestRead *= 0* + + + +#### add_record(\_recordReference) + +Appends \_recordReference to records property on GetRecordVersionsRequest C-object. + +* **Parameters:** + **\_recordReference** ([`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference)) + + + +#### *property* records *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[RecordReference](#ansys.grantami.backend.soap.RecordReference.RecordReference)]* + +Property records is a list of [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) + + + +#### *property* versions *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property versions is of type int. See [`GetRecordVersionsRequest.VersionSelector`](#ansys.grantami.backend.soap.GetRecordVersionsRequest.GetRecordVersionsRequest.VersionSelector) for supported values. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + + + +### GetRecordVersionsResponse + + + +### *class* GetRecordVersionsResponse(c_obj) + +Bases: [`Response`](#ansys.grantami.backend.soap.Response.Response) + +Output from the get_record_versions operation. Contains a list of version states. + +* **Parameters:** + **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a GetRecordVersionsResponse object. + + + +#### *property* record_states *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[RecordVersionState](#ansys.grantami.backend.soap.RecordVersionState.RecordVersionState)]* + +Property record_states is a list of [`RecordVersionState`](#module-ansys.grantami.backend.soap.RecordVersionState) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`RecordVersionState`](#module-ansys.grantami.backend.soap.RecordVersionState) + + + + + +### GetRootNode + + + +### *class* GetRootNode(table=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Input to the get_root_node operation. +Requires a [`TableReference`](#module-ansys.grantami.backend.soap.TableReference) . + +* **Parameters:** + **table** ([`TableReference`](#module-ansys.grantami.backend.soap.TableReference)) + + + +#### *property* table *: [TableReference](#ansys.grantami.backend.soap.TableReference.TableReference)* + +Property table is of type [`TableReference`](#module-ansys.grantami.backend.soap.TableReference). + +* **Return type:** + [`TableReference`](#module-ansys.grantami.backend.soap.TableReference) + + + + + +### GetRootNodeResponse + + + +### *class* GetRootNodeResponse(c_obj) + +Bases: [`Response`](#ansys.grantami.backend.soap.Response.Response) + +Output from the get_root_node operation. +Includes a [`TreeRecord`](#module-ansys.grantami.backend.soap.TreeRecord) object and a +[`ServiceLayerResponse`](#module-ansys.grantami.backend.soap.ServiceLayerResponse) object. + +* **Parameters:** + **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a GetRootNodeResponse object. + + + +#### *property* root_node *: [TreeRecord](#ansys.grantami.backend.soap.TreeRecord.TreeRecord)* + +Property root_node is of type [`TreeRecord`](#module-ansys.grantami.backend.soap.TreeRecord). + +* **Return type:** + [`TreeRecord`](#module-ansys.grantami.backend.soap.TreeRecord) + + + + + +### GetSubsetsRequest + + + +### *class* GetSubsetsRequest(subset_references=None, table=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Input to the get_subsets operation. +Requires a [`TableReference`](#module-ansys.grantami.backend.soap.TableReference) . + +* **Parameters:** + * **subset_references** (list of [`SubsetReference`](#module-ansys.grantami.backend.soap.SubsetReference)) + * **table** ([`TableReference`](#module-ansys.grantami.backend.soap.TableReference)) + + + +#### add_subset_reference(\_subsetReference) + +Appends \_subsetReference to subsetReferences property on GetSubsetsRequest C-object. + +* **Parameters:** + **\_subsetReference** ([`SubsetReference`](#module-ansys.grantami.backend.soap.SubsetReference)) + + + +#### *property* subset_references *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[SubsetReference](#ansys.grantami.backend.soap.SubsetReference.SubsetReference)]* + +Property subset_references is a list of [`SubsetReference`](#module-ansys.grantami.backend.soap.SubsetReference) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`SubsetReference`](#module-ansys.grantami.backend.soap.SubsetReference) + + + +#### *property* table *: [TableReference](#ansys.grantami.backend.soap.TableReference.TableReference)* + +Property table is of type [`TableReference`](#module-ansys.grantami.backend.soap.TableReference). + +* **Return type:** + [`TableReference`](#module-ansys.grantami.backend.soap.TableReference) + + + + + +### GetSubsetsResponse + + + +### *class* GetSubsetsResponse(c_obj) + +Bases: [`Response`](#ansys.grantami.backend.soap.Response.Response) + +Output from the get_subsets operation. +Includes an array of SubsetDetails objects and a +[`ServiceLayerResponse`](#module-ansys.grantami.backend.soap.ServiceLayerResponse) object. + +* **Parameters:** + **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a GetSubsetsResponse object. + + + +#### *property* subset_details *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[SubsetDetail](#ansys.grantami.backend.soap.SubsetDetail.SubsetDetail)]* + +Property subset_details is a list of [`SubsetDetail`](#module-ansys.grantami.backend.soap.SubsetDetail) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`SubsetDetail`](#module-ansys.grantami.backend.soap.SubsetDetail) + + + + + +### GetTables + + + +### *class* GetTables(db_key=None, attribute_selectors=None, table_filter=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Input to the get_tables operation. +Requires a db_key to be set. + +* **Parameters:** + * **db_key** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **attribute_selectors** ([*list*](https://docs.python.org/3/library/stdtypes.html#list) *of* [*int*](https://docs.python.org/3/library/functions.html#int)) + * **table_filter** ([*int*](https://docs.python.org/3/library/functions.html#int)) + + + +#### *class* AttributeSelector + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + + + +#### MetaAttributes *= 2* + + + +#### NONE *= 0* + + + +#### NonMetaAttributes *= 1* + + + +#### StandardAttributes *= 3* + + + +#### add_attribute_selector(value) + +Appends value to attributeSelectors property on GetTables C-object. + +* **Parameters:** + **value** ([*int*](https://docs.python.org/3/library/functions.html#int)) + + + +#### *property* attribute_selectors *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[int](https://docs.python.org/3/library/functions.html#int)]* + +Property attribute_selectors is a list of int objects. See [`GetTables.AttributeSelector`](#ansys.grantami.backend.soap.GetTables.GetTables.AttributeSelector) for supported values. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + [list](https://docs.python.org/3/library/stdtypes.html#list) of [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* db_key *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property db_key is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* table_filter *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property table_filter is of type int. See [`GRANTA_Constants`](#module-ansys.grantami.backend.soap.GRANTA_Constants) for supported values. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + + + +### GetTablesResponse + + + +### *class* GetTablesResponse(c_obj) + +Bases: [`Response`](#ansys.grantami.backend.soap.Response.Response) + +Output from the get_tables operation. +Includes an array of [`TableDetail`](#module-ansys.grantami.backend.soap.TableDetail) objects and a +[`ServiceLayerResponse`](#module-ansys.grantami.backend.soap.ServiceLayerResponse) object. + +* **Parameters:** + **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a GetTablesResponse object. + + + +#### add_table_detail(\_tableDetail) + +Appends \_tableDetail to tableDetails property on GetTablesResponse C-object. + +* **Parameters:** + **\_tableDetail** ([`TableDetail`](#module-ansys.grantami.backend.soap.TableDetail)) + + + +#### *property* table_details *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[TableDetail](#ansys.grantami.backend.soap.TableDetail.TableDetail)]* + +Property table_details is a list of [`TableDetail`](#module-ansys.grantami.backend.soap.TableDetail) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`TableDetail`](#module-ansys.grantami.backend.soap.TableDetail) + + + + + +### GetTreeRecordsRequest + + + +### *class* GetTreeRecordsRequest(records=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Input to the get_tree_records operation. +Requires at least one [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference). + +* **Parameters:** + **records** (list of [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference)) + + + +#### add_record(\_recordReference) + +Appends \_recordReference to records property on GetTreeRecordsRequest C-object. + +* **Parameters:** + **\_recordReference** ([`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference)) + + + +#### *property* records *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[RecordReference](#ansys.grantami.backend.soap.RecordReference.RecordReference)]* + +Property records is a list of [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) + + + + + +### GetTreeRecordsResponse + + + +### *class* GetTreeRecordsResponse(c_obj) + +Bases: [`Response`](#ansys.grantami.backend.soap.Response.Response) + +Output to the get_tree_records operation. +Includes an array of [`TreeRecord`](#module-ansys.grantami.backend.soap.TreeRecord) objects and a +[`ServiceLayerResponse`](#module-ansys.grantami.backend.soap.ServiceLayerResponse) object. + +* **Parameters:** + **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a GetTreeRecordsResponse object. + + + +#### add_tree_record(\_treeRecord) + +Appends \_treeRecord to treeRecords property on GetTreeRecordsResponse C-object. + +* **Parameters:** + **\_treeRecord** ([`TreeRecord`](#module-ansys.grantami.backend.soap.TreeRecord)) + + + +#### *property* tree_records *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[TreeRecord](#ansys.grantami.backend.soap.TreeRecord.TreeRecord)]* + +Property tree_records is a list of [`TreeRecord`](#module-ansys.grantami.backend.soap.TreeRecord) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`TreeRecord`](#module-ansys.grantami.backend.soap.TreeRecord) + + + + + +### GetUnitConversionsRequest + + + +### *class* GetUnitConversionsRequest(db_key=None, source_currency=None, target_currency=None, unit_conversion_contexts=None, unit_symbols=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Input for the get_unit_conversions operation. + +* **Parameters:** + * **db_key** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **source_currency** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **target_currency** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **unit_conversion_contexts** (list of [`UnitConversionContext`](#module-ansys.grantami.backend.soap.UnitConversionContext)) + * **unit_symbols** ([*list*](https://docs.python.org/3/library/stdtypes.html#list) *of* [*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### add_unit_conversion_context(\_unitConversionContext) + +Appends \_unitConversionContext to unitConversionContexts property on GetUnitConversionsRequest C-object. + +* **Parameters:** + **\_unitConversionContext** ([`UnitConversionContext`](#module-ansys.grantami.backend.soap.UnitConversionContext)) + + + +#### add_unit_symbol(value) + +Appends value to unitSymbols property on GetUnitConversionsRequest C-object. + +* **Parameters:** + **value** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *property* db_key *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property db_key is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* source_currency *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property source_currency is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* target_currency *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property target_currency is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* unit_conversion_contexts *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[UnitConversionContext](#ansys.grantami.backend.soap.UnitConversionContext.UnitConversionContext)]* + +Property unit_conversion_contexts is a list of [`UnitConversionContext`](#module-ansys.grantami.backend.soap.UnitConversionContext) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`UnitConversionContext`](#module-ansys.grantami.backend.soap.UnitConversionContext) + + + +#### *property* unit_symbols *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str)]* + +Property unit_symbols is a list of str objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + [list](https://docs.python.org/3/library/stdtypes.html#list) of [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### GetUnitConversionsResponse + + + +### *class* GetUnitConversionsResponse(c_obj) + +Bases: [`Response`](#ansys.grantami.backend.soap.Response.Response) + +Output from the get_unit_conversions operation. + +* **Parameters:** + **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a GetUnitConversionsResponse object. + + + +#### *property* db_key *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property db_key is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* source_units *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[SourceUnitConversionSet](#ansys.grantami.backend.soap.SourceUnitConversionSet.SourceUnitConversionSet)]* + +Property source_units is a list of [`SourceUnitConversionSet`](#module-ansys.grantami.backend.soap.SourceUnitConversionSet) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`SourceUnitConversionSet`](#module-ansys.grantami.backend.soap.SourceUnitConversionSet) + + + +#### *property* unit_conversion_contexts *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[UnitConversionContextConversionSet](#ansys.grantami.backend.soap.UnitConversionContextConversionSet.UnitConversionContextConversionSet)]* + +Property unit_conversion_contexts is a list of [`UnitConversionContextConversionSet`](#module-ansys.grantami.backend.soap.UnitConversionContextConversionSet) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`UnitConversionContextConversionSet`](#module-ansys.grantami.backend.soap.UnitConversionContextConversionSet) + + + + + +### GetUnits + + + +### *class* GetUnits(db_key=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +A type for requesting the units known to specific Granta MI databases. +A DBKey must be specified. + +* **Parameters:** + **db_key** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *property* db_key *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property db_key is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### GetUnitsResponse + + + +### *class* GetUnitsResponse(c_obj) + +Bases: [`Response`](#ansys.grantami.backend.soap.Response.Response) + +The output of a get_units request. +Contains an array of DatabaseUnitSets for the specified databases. + +* **Parameters:** + **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a GetUnitsResponse object. + + + +#### *property* database_unit_sets *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[DatabaseUnitSet](#ansys.grantami.backend.soap.DatabaseUnitSet.DatabaseUnitSet)]* + +Property database_unit_sets is a list of [`DatabaseUnitSet`](#module-ansys.grantami.backend.soap.DatabaseUnitSet) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`DatabaseUnitSet`](#module-ansys.grantami.backend.soap.DatabaseUnitSet) + + + + + +### GetUnitSystems + + + +### *class* GetUnitSystems(db_key=None, exclude_currencies=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +A type for requesting the unit systems on a particular Granta MI database. +A db_key must be specified. + +* **Parameters:** + * **db_key** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **exclude_currencies** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + + + +#### *property* db_key *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property db_key is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* exclude_currencies *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property exclude_currencies is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + + + +### GetUnitSystemsResponse + + + +### *class* GetUnitSystemsResponse(c_obj) + +Bases: [`Response`](#ansys.grantami.backend.soap.Response.Response) + +The output of a get_unit_systems requests. +Contains an array of unit systems for the specified database. + +* **Parameters:** + **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a GetUnitSystemsResponse object. + + + +#### *property* db_key *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property db_key is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* unit_systems *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[UnitSystemDetail](#ansys.grantami.backend.soap.UnitSystemDetail.UnitSystemDetail)]* + +Property unit_systems is a list of [`UnitSystemDetail`](#module-ansys.grantami.backend.soap.UnitSystemDetail) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`UnitSystemDetail`](#module-ansys.grantami.backend.soap.UnitSystemDetail) + + + + + +### GetUploadAddressesRequest + + + +### *class* GetUploadAddressesRequest(attribute_references=None, record_references=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Input to the get_upload_addresses operation. +Contains a list of records and attributes to get the upload URL addresses of. + +* **Parameters:** + * **attribute_references** (list of [`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference)) + * **record_references** (list of [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference)) + + + +#### add_attribute_reference(\_attributeReference) + +Appends \_attributeReference to attributeReferences property on GetUploadAddressesRequest C-object. + +* **Parameters:** + **\_attributeReference** ([`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference)) + + + +#### add_record_reference(\_recordReference) + +Appends \_recordReference to recordReferences property on GetUploadAddressesRequest C-object. + +* **Parameters:** + **\_recordReference** ([`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference)) + + + +#### *property* attribute_references *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[AttributeReference](#ansys.grantami.backend.soap.AttributeReference.AttributeReference)]* + +Property attribute_references is a list of [`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference) + + + +#### *property* record_references *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[RecordReference](#ansys.grantami.backend.soap.RecordReference.RecordReference)]* + +Property record_references is a list of [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) + + + + + +### GetUploadAddressesResponse + + + +### *class* GetUploadAddressesResponse(c_obj) + +Bases: [`Response`](#ansys.grantami.backend.soap.Response.Response) + +Output from the get_upload_addresses operation. +Contains a list of [`RecordWithAttributeAddresses`](#module-ansys.grantami.backend.soap.RecordWithAttributeAddresses) objects for +each record in the [`GetUploadAddressesRequest`](#module-ansys.grantami.backend.soap.GetUploadAddressesRequest). + +* **Parameters:** + **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a GetUploadAddressesResponse object. + + + +#### *property* records_with_attribute_addresses *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[RecordWithAttributeAddresses](#ansys.grantami.backend.soap.RecordWithAttributeAddresses.RecordWithAttributeAddresses)]* + +Property records_with_attribute_addresses is a list of [`RecordWithAttributeAddresses`](#module-ansys.grantami.backend.soap.RecordWithAttributeAddresses) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`RecordWithAttributeAddresses`](#module-ansys.grantami.backend.soap.RecordWithAttributeAddresses) + + + + + +### GraphDomain + + + +### *class* GraphDomain(parameter_domains=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +A type to contain choices of fixed parameter values. +A value must be chosen for each parameter, within the given constraints. + +* **Parameters:** + **parameter_domains** (list of [`ParameterDomain`](#module-ansys.grantami.backend.soap.ParameterDomain)) + + + +#### *property* parameter_domains *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[ParameterDomain](#ansys.grantami.backend.soap.ParameterDomain.ParameterDomain)]* + +Property parameter_domains is a list of [`ParameterDomain`](#module-ansys.grantami.backend.soap.ParameterDomain) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`ParameterDomain`](#module-ansys.grantami.backend.soap.ParameterDomain) + + + + + +### GreaterThanSearchValue + + + +### *class* GreaterThanSearchValue(tabular_column=None, unit=None, value=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Search criterion to search for data greater than a specified value. +Criterion passes if data value is above a given value. Point, range, and integer attributes are +supported. + +* **Parameters:** + * **tabular_column** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **unit** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **value** ([*float*](https://docs.python.org/3/library/functions.html#float)) + + + +#### *property* tabular_column *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property tabular_column is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* unit *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property unit is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* value *: [float](https://docs.python.org/3/library/functions.html#float)* + +Property value is of type float. + +* **Return type:** + [float](https://docs.python.org/3/library/functions.html#float) + + + + + +### HelpInfo + + + +### *class* HelpInfo(database_help=None, help_uri=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Type describing how to obtain detailed Help information for an entity in a Granta MI database. + +* **Parameters:** + * **database_help** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **help_uri** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *property* database_help *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property database_help is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* help_uri *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property help_uri is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### HighEndSearchValue + + + +### *class* HighEndSearchValue(unit=None, value=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Upper limit for the [`BetweenSearchValue`](#module-ansys.grantami.backend.soap.BetweenSearchValue) search criterion. +Requires a double value and an optional unit. + +* **Parameters:** + * **unit** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **value** ([*float*](https://docs.python.org/3/library/functions.html#float)) + + + +#### *property* unit *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property unit is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* value *: [float](https://docs.python.org/3/library/functions.html#float)* + +Property value is of type float. + +* **Return type:** + [float](https://docs.python.org/3/library/functions.html#float) + + + + + +### HyperlinkDataType + + + +### *class* HyperlinkDataType(description=None, hyperlink_display=None, is_applicable=None, value=None, \_is_owner=True) + +Bases: [`IDataValue`](#ansys.grantami.backend.soap.IDataValue.IDataValue) + +A type to contain a HyperLink string value. + +* **Parameters:** + * **description** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **hyperlink_display** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **is_applicable** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **value** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *class* HyperlinkDisplay + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + + + +#### Content *= 2* + + + +#### New *= 0* + + + +#### Top *= 1* + + + +#### *property* description *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property description is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* hyperlink_display *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property hyperlink_display is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* is_applicable *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property is_applicable is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* value *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property value is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### IDataValue + + + +### *class* IDataValue + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Base class for data values in Granta MI. + +You should not interact directly with this class. + + + + + +### ImportAttributeValue + + + +### *class* ImportAttributeValue(attribute_reference=None, date_data_value=None, discrete_data_value=None, file_data_value=None, hyperlink_data_value=None, integer_data_value=None, logical_data_value=None, long_text_data_value=None, picture_data_value=None, point_data_value=None, range_data_value=None, short_text_data_value=None, tabular_data_value=None, float_functional_gridded_data_value=None, float_functional_series_data_value=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +An [`AttributeValue`](#module-ansys.grantami.backend.soap.AttributeValue) to import to a Granta MI database. +Requires a [`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference) and an attribute value for the +data type you wish to upload. Supports: PointDataType, RangeDataType, +FloatFunctionalSeriesDataType, FloatFunctionalGriddedDataType, ShortTextDataType, +LongTextDataType, DiscreteDataType, IntegerDataType, LogicalDataType, HyperlinkDataType, and +[`FileDataType`](#module-ansys.grantami.backend.soap.FileDataType). + +* **Parameters:** + * **attribute_reference** ([`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference)) + * **date_data_value** ([`DateDataType`](#module-ansys.grantami.backend.soap.DateDataType)) + * **discrete_data_value** ([`DiscreteDataType`](#module-ansys.grantami.backend.soap.DiscreteDataType)) + * **file_data_value** ([`FileDataType`](#module-ansys.grantami.backend.soap.FileDataType)) + * **hyperlink_data_value** ([`HyperlinkDataType`](#module-ansys.grantami.backend.soap.HyperlinkDataType)) + * **integer_data_value** ([`IntegerDataType`](#module-ansys.grantami.backend.soap.IntegerDataType)) + * **logical_data_value** ([`LogicalDataType`](#module-ansys.grantami.backend.soap.LogicalDataType)) + * **long_text_data_value** ([`LongTextDataType`](#module-ansys.grantami.backend.soap.LongTextDataType)) + * **picture_data_value** ([`PictureDataType`](#module-ansys.grantami.backend.soap.PictureDataType)) + * **point_data_value** ([`PointDataType`](#module-ansys.grantami.backend.soap.PointDataType)) + * **range_data_value** ([`RangeDataType`](#module-ansys.grantami.backend.soap.RangeDataType)) + * **short_text_data_value** ([`ShortTextDataType`](#module-ansys.grantami.backend.soap.ShortTextDataType)) + * **tabular_data_value** ([`TabularDataImportType`](#module-ansys.grantami.backend.soap.TabularDataImportType)) + * **float_functional_gridded_data_value** ([`FloatFunctionalGriddedDataType`](#module-ansys.grantami.backend.soap.FloatFunctionalGriddedDataType)) + * **float_functional_series_data_value** ([`FloatFunctionalSeriesDataType`](#module-ansys.grantami.backend.soap.FloatFunctionalSeriesDataType)) + + + +#### *property* attribute_reference *: [AttributeReference](#ansys.grantami.backend.soap.AttributeReference.AttributeReference)* + +Property attribute_reference is of type [`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference). + +* **Return type:** + [`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference) + + + +#### *property* date_data_value *: [DateDataType](#ansys.grantami.backend.soap.DateDataType.DateDataType)* + +Property date_data_value is of type [`DateDataType`](#module-ansys.grantami.backend.soap.DateDataType). + +* **Return type:** + [`DateDataType`](#module-ansys.grantami.backend.soap.DateDataType) + + + +#### *property* discrete_data_value *: [DiscreteDataType](#ansys.grantami.backend.soap.DiscreteDataType.DiscreteDataType)* + +Property discrete_data_value is of type [`DiscreteDataType`](#module-ansys.grantami.backend.soap.DiscreteDataType). + +* **Return type:** + [`DiscreteDataType`](#module-ansys.grantami.backend.soap.DiscreteDataType) + + + +#### *property* file_data_value *: [FileDataType](#ansys.grantami.backend.soap.FileDataType.FileDataType)* + +Property file_data_value is of type [`FileDataType`](#module-ansys.grantami.backend.soap.FileDataType). + +* **Return type:** + [`FileDataType`](#module-ansys.grantami.backend.soap.FileDataType) + + + +#### *property* float_functional_gridded_data_value *: [FloatFunctionalGriddedDataType](#ansys.grantami.backend.soap.FloatFunctionalGriddedDataType.FloatFunctionalGriddedDataType)* + +Property float_functional_gridded_data_value is of type [`FloatFunctionalGriddedDataType`](#module-ansys.grantami.backend.soap.FloatFunctionalGriddedDataType). + +* **Return type:** + [`FloatFunctionalGriddedDataType`](#module-ansys.grantami.backend.soap.FloatFunctionalGriddedDataType) + + + +#### *property* float_functional_series_data_value *: [FloatFunctionalSeriesDataType](#ansys.grantami.backend.soap.FloatFunctionalSeriesDataType.FloatFunctionalSeriesDataType)* + +Property float_functional_series_data_value is of type [`FloatFunctionalSeriesDataType`](#module-ansys.grantami.backend.soap.FloatFunctionalSeriesDataType). + +* **Return type:** + [`FloatFunctionalSeriesDataType`](#module-ansys.grantami.backend.soap.FloatFunctionalSeriesDataType) + + + +#### *property* hyperlink_data_value *: [HyperlinkDataType](#ansys.grantami.backend.soap.HyperlinkDataType.HyperlinkDataType)* + +Property hyperlink_data_value is of type [`HyperlinkDataType`](#module-ansys.grantami.backend.soap.HyperlinkDataType). + +* **Return type:** + [`HyperlinkDataType`](#module-ansys.grantami.backend.soap.HyperlinkDataType) + + + +#### *property* integer_data_value *: [IntegerDataType](#ansys.grantami.backend.soap.IntegerDataType.IntegerDataType)* + +Property integer_data_value is of type [`IntegerDataType`](#module-ansys.grantami.backend.soap.IntegerDataType). + +* **Return type:** + [`IntegerDataType`](#module-ansys.grantami.backend.soap.IntegerDataType) + + + +#### *property* logical_data_value *: [LogicalDataType](#ansys.grantami.backend.soap.LogicalDataType.LogicalDataType)* + +Property logical_data_value is of type [`LogicalDataType`](#module-ansys.grantami.backend.soap.LogicalDataType). + +* **Return type:** + [`LogicalDataType`](#module-ansys.grantami.backend.soap.LogicalDataType) + + + +#### *property* long_text_data_value *: [LongTextDataType](#ansys.grantami.backend.soap.LongTextDataType.LongTextDataType)* + +Property long_text_data_value is of type [`LongTextDataType`](#module-ansys.grantami.backend.soap.LongTextDataType). + +* **Return type:** + [`LongTextDataType`](#module-ansys.grantami.backend.soap.LongTextDataType) + + + +#### *property* picture_data_value *: [PictureDataType](#ansys.grantami.backend.soap.PictureDataType.PictureDataType)* + +Property picture_data_value is of type [`PictureDataType`](#module-ansys.grantami.backend.soap.PictureDataType). + +* **Return type:** + [`PictureDataType`](#module-ansys.grantami.backend.soap.PictureDataType) + + + +#### *property* point_data_value *: [PointDataType](#ansys.grantami.backend.soap.PointDataType.PointDataType)* + +Property point_data_value is of type [`PointDataType`](#module-ansys.grantami.backend.soap.PointDataType). + +* **Return type:** + [`PointDataType`](#module-ansys.grantami.backend.soap.PointDataType) + + + +#### *property* range_data_value *: [RangeDataType](#ansys.grantami.backend.soap.RangeDataType.RangeDataType)* + +Property range_data_value is of type [`RangeDataType`](#module-ansys.grantami.backend.soap.RangeDataType). + +* **Return type:** + [`RangeDataType`](#module-ansys.grantami.backend.soap.RangeDataType) + + + +#### *property* short_text_data_value *: [ShortTextDataType](#ansys.grantami.backend.soap.ShortTextDataType.ShortTextDataType)* + +Property short_text_data_value is of type [`ShortTextDataType`](#module-ansys.grantami.backend.soap.ShortTextDataType). + +* **Return type:** + [`ShortTextDataType`](#module-ansys.grantami.backend.soap.ShortTextDataType) + + + +#### *property* tabular_data_value *: [TabularDataImportType](#ansys.grantami.backend.soap.TabularDataImportType.TabularDataImportType)* + +Property tabular_data_value is of type [`TabularDataImportType`](#module-ansys.grantami.backend.soap.TabularDataImportType). + +* **Return type:** + [`TabularDataImportType`](#module-ansys.grantami.backend.soap.TabularDataImportType) + + + + + +### ImportRecord + + + +### *class* ImportRecord(copy_destination_parent=None, existing_record=None, import_attribute_values=None, import_record_mode=None, is_folder=None, record_name=None, release_record=None, subset_references=None, update_subsets_mode=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +A record for importing to the Granta MI database. +The ‘import_record_mode’ property specifies whether a record should be created, copied, or updated. +The accepted values are ‘Create’, ‘Update’, and ‘Copy’. If import_record_mode is ‘Create’, set +‘existing_record’ to the parent record under which the new record is to be created. If +import_record_mode is ‘Update’, set ‘existing_record’, to the target record to be changed. If +import_record_mode is ‘Copy’, set ‘existing_record’ to be the source data for the operation, and +use ‘copy_destination_parent’ to specify where the record copy should appear. For versioned +databases, set release_record to specify whether the new or updated record should be released. Use +‘subset_references’ to define the Subsets the imported record belongs to (subsets will not be +inherited from the parent). ‘is_folder’ will have no effect if ‘import_record_mode’ is set to +‘Update’. + +* **Parameters:** + * **copy_destination_parent** ([`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference)) + * **existing_record** ([`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference)) + * **import_attribute_values** (list of [`ImportAttributeValue`](#module-ansys.grantami.backend.soap.ImportAttributeValue)) + * **import_record_mode** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **is_folder** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **record_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **release_record** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **subset_references** (list of [`SubsetReference`](#module-ansys.grantami.backend.soap.SubsetReference)) + * **update_subsets_mode** ([*int*](https://docs.python.org/3/library/functions.html#int)) + + + +#### add_import_attribute_value(\_importAttributeValue) + +Appends \_importAttributeValue to importAttributeValues property on ImportRecord C-object. + +* **Parameters:** + **\_importAttributeValue** ([`ImportAttributeValue`](#module-ansys.grantami.backend.soap.ImportAttributeValue)) + + + +#### add_subset_reference(\_subsetReference) + +Appends \_subsetReference to subsetReferences property on ImportRecord C-object. + +* **Parameters:** + **\_subsetReference** ([`SubsetReference`](#module-ansys.grantami.backend.soap.SubsetReference)) + + + +#### *property* copy_destination_parent *: [RecordReference](#ansys.grantami.backend.soap.RecordReference.RecordReference)* + +Property copy_destination_parent is of type [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference). + +* **Return type:** + [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) + + + +#### *property* existing_record *: [RecordReference](#ansys.grantami.backend.soap.RecordReference.RecordReference)* + +Property existing_record is of type [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference). + +* **Return type:** + [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) + + + +#### *property* import_attribute_values *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[ImportAttributeValue](#ansys.grantami.backend.soap.ImportAttributeValue.ImportAttributeValue)]* + +Property import_attribute_values is a list of [`ImportAttributeValue`](#module-ansys.grantami.backend.soap.ImportAttributeValue) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`ImportAttributeValue`](#module-ansys.grantami.backend.soap.ImportAttributeValue) + + + +#### *property* import_record_mode *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property import_record_mode is of type str. See [`GRANTA_Constants`](#module-ansys.grantami.backend.soap.GRANTA_Constants) for supported values. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* is_folder *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property is_folder is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* record_name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property record_name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* release_record *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property release_record is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* subset_references *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[SubsetReference](#ansys.grantami.backend.soap.SubsetReference.SubsetReference)]* + +Property subset_references is a list of [`SubsetReference`](#module-ansys.grantami.backend.soap.SubsetReference) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`SubsetReference`](#module-ansys.grantami.backend.soap.SubsetReference) + + + +#### *property* update_subsets_mode *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property update_subsets_mode is of type int. See [`GRANTA_Constants`](#module-ansys.grantami.backend.soap.GRANTA_Constants) for supported values. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + + + +### IntegerDataType + + + +### *class* IntegerDataType(is_applicable=None, value=None, \_is_owner=True) + +Bases: [`IDataValue`](#ansys.grantami.backend.soap.IDataValue.IDataValue) + +A type to contain an integer data type. + +* **Parameters:** + * **is_applicable** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **value** ([*int*](https://docs.python.org/3/library/functions.html#int)) + + + +#### *property* is_applicable *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property is_applicable is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* value *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property value is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + + + +### IntegrationDatabase + + + +### *class* IntegrationDatabase(db_key=None, author=None, company=None, integration_tables=None, volume_name=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Represents a database within an Integration Profile. + +* **Parameters:** + * **db_key** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **author** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **company** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **integration_tables** (list of [`TableDetail`](#module-ansys.grantami.backend.soap.TableDetail)) + * **volume_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *property* author *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property author is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* company *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property company is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* db_key *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property db_key is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* integration_tables *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[TableDetail](#ansys.grantami.backend.soap.TableDetail.TableDetail)]* + +Property integration_tables is a list of [`TableDetail`](#module-ansys.grantami.backend.soap.TableDetail) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`TableDetail`](#module-ansys.grantami.backend.soap.TableDetail) + + + +#### *property* volume_name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property volume_name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### IntegrationProfileDetail + + + +### *class* IntegrationProfileDetail(description=None, group_name=None, integration_databases=None, name=None, profile=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Detailed information about an Integration Profile. + +* **Parameters:** + * **description** ([`RichText`](#module-ansys.grantami.backend.soap.RichText)) + * **group_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **integration_databases** (list of [`IntegrationDatabase`](#module-ansys.grantami.backend.soap.IntegrationDatabase)) + * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **profile** ([`IntegrationProfileReference`](#module-ansys.grantami.backend.soap.IntegrationProfileReference)) + + + +#### *property* description *: [RichText](#ansys.grantami.backend.soap.RichText.RichText)* + +Property description is of type [`RichText`](#module-ansys.grantami.backend.soap.RichText). + +* **Return type:** + [`RichText`](#module-ansys.grantami.backend.soap.RichText) + + + +#### *property* group_name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property group_name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* integration_databases *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[IntegrationDatabase](#ansys.grantami.backend.soap.IntegrationDatabase.IntegrationDatabase)]* + +Property integration_databases is a list of [`IntegrationDatabase`](#module-ansys.grantami.backend.soap.IntegrationDatabase) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`IntegrationDatabase`](#module-ansys.grantami.backend.soap.IntegrationDatabase) + + + +#### *property* name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* profile *: [IntegrationProfileReference](#ansys.grantami.backend.soap.IntegrationProfileReference.IntegrationProfileReference)* + +Property profile is of type [`IntegrationProfileReference`](#module-ansys.grantami.backend.soap.IntegrationProfileReference). + +* **Return type:** + [`IntegrationProfileReference`](#module-ansys.grantami.backend.soap.IntegrationProfileReference) + + + + + +### IntegrationProfileReference + + + +### *class* IntegrationProfileReference(key=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Contains the key for an Integration Profile. + +* **Parameters:** + **key** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *property* key *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property key is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### LayoutDetail + + + +### *class* LayoutDetail(attribute_categories=None, layout=None, name=None, table=None, display_names=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Detailed meta-information about a Layout in a Granta MI database. + +* **Parameters:** + * **attribute_categories** (list of [`AttributeCategory`](#module-ansys.grantami.backend.soap.AttributeCategory)) + * **layout** ([`LayoutReference`](#module-ansys.grantami.backend.soap.LayoutReference)) + * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **table** ([`TableReference`](#module-ansys.grantami.backend.soap.TableReference)) + * **display_names** (list of [`DisplayName`](#module-ansys.grantami.backend.soap.DisplayName)) + + + +#### add_attribute_category(\_attributeCategory) + +Appends \_attributeCategory to attributeCategories property on LayoutDetail C-object. + +* **Parameters:** + **\_attributeCategory** ([`AttributeCategory`](#module-ansys.grantami.backend.soap.AttributeCategory)) + + + +#### *property* attribute_categories *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[AttributeCategory](#ansys.grantami.backend.soap.AttributeCategory.AttributeCategory)]* + +Property attribute_categories is a list of [`AttributeCategory`](#module-ansys.grantami.backend.soap.AttributeCategory) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`AttributeCategory`](#module-ansys.grantami.backend.soap.AttributeCategory) + + + +#### *property* display_names *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[DisplayName](#ansys.grantami.backend.soap.DisplayName.DisplayName)]* + +Property display_names is a list of [`DisplayName`](#module-ansys.grantami.backend.soap.DisplayName) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`DisplayName`](#module-ansys.grantami.backend.soap.DisplayName) + + + +#### *property* layout *: [LayoutReference](#ansys.grantami.backend.soap.LayoutReference.LayoutReference)* + +Property layout is of type [`LayoutReference`](#module-ansys.grantami.backend.soap.LayoutReference). + +* **Return type:** + [`LayoutReference`](#module-ansys.grantami.backend.soap.LayoutReference) + + + +#### *property* name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* table *: [TableReference](#ansys.grantami.backend.soap.TableReference.TableReference)* + +Property table is of type [`TableReference`](#module-ansys.grantami.backend.soap.TableReference). + +* **Return type:** + [`TableReference`](#module-ansys.grantami.backend.soap.TableReference) + + + + + +### LayoutReference + + + +### *class* LayoutReference(db_key=None, layout_identity=None, name=None, partial_table_reference=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +A type that allows identification of a particular Layout in a Granta MI database. + +* **Parameters:** + * **db_key** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **layout_identity** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **partial_table_reference** ([`PartialTableReference`](#module-ansys.grantami.backend.soap.PartialTableReference)) + + + +#### *property* db_key *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property db_key is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* layout_identity *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property layout_identity is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* partial_table_reference *: [PartialTableReference](#ansys.grantami.backend.soap.PartialTableReference.PartialTableReference)* + +Property partial_table_reference is of type [`PartialTableReference`](#module-ansys.grantami.backend.soap.PartialTableReference). + +* **Return type:** + [`PartialTableReference`](#module-ansys.grantami.backend.soap.PartialTableReference) + + + + + +### LessThanSearchValue + + + +### *class* LessThanSearchValue(tabular_column=None, unit=None, value=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Search criterion to search for data less than a specified value. +Criterion passes if data value is less than a given value. Point, range, and integer attributes are +supported. + +* **Parameters:** + * **tabular_column** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **unit** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **value** ([*float*](https://docs.python.org/3/library/functions.html#float)) + + + +#### *property* tabular_column *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property tabular_column is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* unit *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property unit is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* value *: [float](https://docs.python.org/3/library/functions.html#float)* + +Property value is of type float. + +* **Return type:** + [float](https://docs.python.org/3/library/functions.html#float) + + + + + +### LinkAllCombinations + + + +### *class* LinkAllCombinations(node_name=None, source_records=None, target_records=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +For each given source record, add links to all the given target records. Silently skip any links +that already exist. + +* **Parameters:** + * **node_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **source_records** (list of [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference)) + * **target_records** (list of [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference)) + + + +#### add_source_record(\_recordReference) + +Appends \_recordReference to sourceRecords property on LinkAllCombinations C-object. + +* **Parameters:** + **\_recordReference** ([`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference)) + + + +#### add_target_record(\_recordReference) + +Appends \_recordReference to targetRecords property on LinkAllCombinations C-object. + +* **Parameters:** + **\_recordReference** ([`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference)) + + + +#### *property* node_name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property node_name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* source_records *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[RecordReference](#ansys.grantami.backend.soap.RecordReference.RecordReference)]* + +Property source_records is a list of [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) + + + +#### *property* target_records *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[RecordReference](#ansys.grantami.backend.soap.RecordReference.RecordReference)]* + +Property target_records is a list of [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) + + + + + +### LinkRecords + + + +### *class* LinkRecords(node_name=None, source_records=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +For each given source record, add links to the target records specified for that source record. +Silently skip any links that already exist. + +* **Parameters:** + * **node_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **source_records** (list of [`NotatedTargetedSourceRecord`](#module-ansys.grantami.backend.soap.NotatedTargetedSourceRecord)) + + + +#### add_source_record(\_notatedTargetedSourceRecord) + +Appends \_notatedTargetedSourceRecord to sourceRecords property on LinkRecords C-object. + +* **Parameters:** + **\_notatedTargetedSourceRecord** ([`NotatedTargetedSourceRecord`](#module-ansys.grantami.backend.soap.NotatedTargetedSourceRecord)) + + + +#### *property* node_name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property node_name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* source_records *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[NotatedTargetedSourceRecord](#ansys.grantami.backend.soap.NotatedTargetedSourceRecord.NotatedTargetedSourceRecord)]* + +Property source_records is a list of [`NotatedTargetedSourceRecord`](#module-ansys.grantami.backend.soap.NotatedTargetedSourceRecord) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`NotatedTargetedSourceRecord`](#module-ansys.grantami.backend.soap.NotatedTargetedSourceRecord) + + + + + +### LinkedRecordsDataType + + + +### *class* LinkedRecordsDataType(node_name=None, record_link_groups=None, type_string=None, \_is_owner=True) + +Bases: [`IDataValue`](#ansys.grantami.backend.soap.IDataValue.IDataValue) + +A type representing a list of linked Records. + +* **Parameters:** + * **node_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **record_link_groups** (list of [`RecordLinkGroup`](#module-ansys.grantami.backend.soap.RecordLinkGroup)) + * **type_string** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *property* node_name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property node_name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* record_link_groups *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[RecordLinkGroup](#ansys.grantami.backend.soap.RecordLinkGroup.RecordLinkGroup)]* + +Property record_link_groups is a list of [`RecordLinkGroup`](#module-ansys.grantami.backend.soap.RecordLinkGroup) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`RecordLinkGroup`](#module-ansys.grantami.backend.soap.RecordLinkGroup) + + + +#### *property* type_string *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property type_string is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### ListDataType + + + +### *class* ListDataType(items=None, \_is_owner=True) + +Bases: [`IDataValue`](#ansys.grantami.backend.soap.IDataValue.IDataValue) + +A list of values within a Cell in Tabular Data. + +* **Parameters:** + **items** (list of [`ListItem`](#module-ansys.grantami.backend.soap.ListItem)) + + + +#### *property* items *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[ListItem](#ansys.grantami.backend.soap.ListItem.ListItem)]* + +Property items is a list of [`ListItem`](#module-ansys.grantami.backend.soap.ListItem) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`ListItem`](#module-ansys.grantami.backend.soap.ListItem) + + + + + +### ListItem + + + +### *class* ListItem(data_type=None, date_data_value=None, discrete_data_value=None, file_data_value=None, hyperlink_data_value=None, integer_data_value=None, logical_data_value=None, long_text_data_value=None, picture_data_value=None, point_data_value=None, range_data_value=None, short_text_data_value=None, source_record_reference=None, float_functional_gridded_data_value=None, float_functional_series_data_value=None, discrete_functional_gridded_data_value=None, discrete_functional_series_data_value=None, empty_data_value=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +An item in a List data value. + +* **Parameters:** + * **data_type** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **date_data_value** ([`DateDataType`](#module-ansys.grantami.backend.soap.DateDataType)) + * **discrete_data_value** ([`DiscreteDataType`](#module-ansys.grantami.backend.soap.DiscreteDataType)) + * **file_data_value** ([`FileDataType`](#module-ansys.grantami.backend.soap.FileDataType)) + * **hyperlink_data_value** ([`HyperlinkDataType`](#module-ansys.grantami.backend.soap.HyperlinkDataType)) + * **integer_data_value** ([`IntegerDataType`](#module-ansys.grantami.backend.soap.IntegerDataType)) + * **logical_data_value** ([`LogicalDataType`](#module-ansys.grantami.backend.soap.LogicalDataType)) + * **long_text_data_value** ([`LongTextDataType`](#module-ansys.grantami.backend.soap.LongTextDataType)) + * **picture_data_value** ([`PictureDataType`](#module-ansys.grantami.backend.soap.PictureDataType)) + * **point_data_value** ([`PointDataType`](#module-ansys.grantami.backend.soap.PointDataType)) + * **range_data_value** ([`RangeDataType`](#module-ansys.grantami.backend.soap.RangeDataType)) + * **short_text_data_value** ([`ShortTextDataType`](#module-ansys.grantami.backend.soap.ShortTextDataType)) + * **source_record_reference** ([`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference)) + * **float_functional_gridded_data_value** ([`FloatFunctionalGriddedDataType`](#module-ansys.grantami.backend.soap.FloatFunctionalGriddedDataType)) + * **float_functional_series_data_value** ([`FloatFunctionalSeriesDataType`](#module-ansys.grantami.backend.soap.FloatFunctionalSeriesDataType)) + * **discrete_functional_gridded_data_value** ([`DiscreteFunctionalGriddedDataType`](#module-ansys.grantami.backend.soap.DiscreteFunctionalGriddedDataType)) + * **discrete_functional_series_data_value** ([`DiscreteFunctionalSeriesDataType`](#module-ansys.grantami.backend.soap.DiscreteFunctionalSeriesDataType)) + * **empty_data_value** ([`EmptyDataType`](#module-ansys.grantami.backend.soap.EmptyDataType)) + + + +#### *property* data_type *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property data_type is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* date_data_value *: [DateDataType](#ansys.grantami.backend.soap.DateDataType.DateDataType)* + +Property date_data_value is of type [`DateDataType`](#module-ansys.grantami.backend.soap.DateDataType). + +* **Return type:** + [`DateDataType`](#module-ansys.grantami.backend.soap.DateDataType) + + + +#### *property* discrete_data_value *: [DiscreteDataType](#ansys.grantami.backend.soap.DiscreteDataType.DiscreteDataType)* + +Property discrete_data_value is of type [`DiscreteDataType`](#module-ansys.grantami.backend.soap.DiscreteDataType). + +* **Return type:** + [`DiscreteDataType`](#module-ansys.grantami.backend.soap.DiscreteDataType) + + + +#### *property* discrete_functional_gridded_data_value *: [DiscreteFunctionalGriddedDataType](#ansys.grantami.backend.soap.DiscreteFunctionalGriddedDataType.DiscreteFunctionalGriddedDataType)* + +Property discrete_functional_gridded_data_value is of type [`DiscreteFunctionalGriddedDataType`](#module-ansys.grantami.backend.soap.DiscreteFunctionalGriddedDataType). + +* **Return type:** + [`DiscreteFunctionalGriddedDataType`](#module-ansys.grantami.backend.soap.DiscreteFunctionalGriddedDataType) + + + +#### *property* discrete_functional_series_data_value *: [DiscreteFunctionalSeriesDataType](#ansys.grantami.backend.soap.DiscreteFunctionalSeriesDataType.DiscreteFunctionalSeriesDataType)* + +Property discrete_functional_series_data_value is of type [`DiscreteFunctionalSeriesDataType`](#module-ansys.grantami.backend.soap.DiscreteFunctionalSeriesDataType). + +* **Return type:** + [`DiscreteFunctionalSeriesDataType`](#module-ansys.grantami.backend.soap.DiscreteFunctionalSeriesDataType) + + + +#### *property* empty_data_value *: [EmptyDataType](#ansys.grantami.backend.soap.EmptyDataType.EmptyDataType)* + +Property empty_data_value is of type [`EmptyDataType`](#module-ansys.grantami.backend.soap.EmptyDataType). + +* **Return type:** + [`EmptyDataType`](#module-ansys.grantami.backend.soap.EmptyDataType) + + + +#### *property* file_data_value *: [FileDataType](#ansys.grantami.backend.soap.FileDataType.FileDataType)* + +Property file_data_value is of type [`FileDataType`](#module-ansys.grantami.backend.soap.FileDataType). + +* **Return type:** + [`FileDataType`](#module-ansys.grantami.backend.soap.FileDataType) + + + +#### *property* float_functional_gridded_data_value *: [FloatFunctionalGriddedDataType](#ansys.grantami.backend.soap.FloatFunctionalGriddedDataType.FloatFunctionalGriddedDataType)* + +Property float_functional_gridded_data_value is of type [`FloatFunctionalGriddedDataType`](#module-ansys.grantami.backend.soap.FloatFunctionalGriddedDataType). + +* **Return type:** + [`FloatFunctionalGriddedDataType`](#module-ansys.grantami.backend.soap.FloatFunctionalGriddedDataType) + + + +#### *property* float_functional_series_data_value *: [FloatFunctionalSeriesDataType](#ansys.grantami.backend.soap.FloatFunctionalSeriesDataType.FloatFunctionalSeriesDataType)* + +Property float_functional_series_data_value is of type [`FloatFunctionalSeriesDataType`](#module-ansys.grantami.backend.soap.FloatFunctionalSeriesDataType). + +* **Return type:** + [`FloatFunctionalSeriesDataType`](#module-ansys.grantami.backend.soap.FloatFunctionalSeriesDataType) + + + +#### *property* hyperlink_data_value *: [HyperlinkDataType](#ansys.grantami.backend.soap.HyperlinkDataType.HyperlinkDataType)* + +Property hyperlink_data_value is of type [`HyperlinkDataType`](#module-ansys.grantami.backend.soap.HyperlinkDataType). + +* **Return type:** + [`HyperlinkDataType`](#module-ansys.grantami.backend.soap.HyperlinkDataType) + + + +#### *property* integer_data_value *: [IntegerDataType](#ansys.grantami.backend.soap.IntegerDataType.IntegerDataType)* + +Property integer_data_value is of type [`IntegerDataType`](#module-ansys.grantami.backend.soap.IntegerDataType). + +* **Return type:** + [`IntegerDataType`](#module-ansys.grantami.backend.soap.IntegerDataType) + + + +#### *property* logical_data_value *: [LogicalDataType](#ansys.grantami.backend.soap.LogicalDataType.LogicalDataType)* + +Property logical_data_value is of type [`LogicalDataType`](#module-ansys.grantami.backend.soap.LogicalDataType). + +* **Return type:** + [`LogicalDataType`](#module-ansys.grantami.backend.soap.LogicalDataType) + + + +#### *property* long_text_data_value *: [LongTextDataType](#ansys.grantami.backend.soap.LongTextDataType.LongTextDataType)* + +Property long_text_data_value is of type [`LongTextDataType`](#module-ansys.grantami.backend.soap.LongTextDataType). + +* **Return type:** + [`LongTextDataType`](#module-ansys.grantami.backend.soap.LongTextDataType) + + + +#### *property* picture_data_value *: [PictureDataType](#ansys.grantami.backend.soap.PictureDataType.PictureDataType)* + +Property picture_data_value is of type [`PictureDataType`](#module-ansys.grantami.backend.soap.PictureDataType). + +* **Return type:** + [`PictureDataType`](#module-ansys.grantami.backend.soap.PictureDataType) + + + +#### *property* point_data_value *: [PointDataType](#ansys.grantami.backend.soap.PointDataType.PointDataType)* + +Property point_data_value is of type [`PointDataType`](#module-ansys.grantami.backend.soap.PointDataType). + +* **Return type:** + [`PointDataType`](#module-ansys.grantami.backend.soap.PointDataType) + + + +#### *property* range_data_value *: [RangeDataType](#ansys.grantami.backend.soap.RangeDataType.RangeDataType)* + +Property range_data_value is of type [`RangeDataType`](#module-ansys.grantami.backend.soap.RangeDataType). + +* **Return type:** + [`RangeDataType`](#module-ansys.grantami.backend.soap.RangeDataType) + + + +#### *property* short_text_data_value *: [ShortTextDataType](#ansys.grantami.backend.soap.ShortTextDataType.ShortTextDataType)* + +Property short_text_data_value is of type [`ShortTextDataType`](#module-ansys.grantami.backend.soap.ShortTextDataType). + +* **Return type:** + [`ShortTextDataType`](#module-ansys.grantami.backend.soap.ShortTextDataType) + + + +#### *property* source_record_reference *: [RecordReference](#ansys.grantami.backend.soap.RecordReference.RecordReference)* + +Property source_record_reference is of type [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference). + +* **Return type:** + [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) + + + + + +### LogicalDataType + + + +### *class* LogicalDataType(is_applicable=None, value=None, \_is_owner=True) + +Bases: [`IDataValue`](#ansys.grantami.backend.soap.IDataValue.IDataValue) + +A type to contain a logical data type. + +* **Parameters:** + * **is_applicable** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **value** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + + + +#### *property* is_applicable *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property is_applicable is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* value *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property value is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + + + +### LongTextDataType + + + +### *class* LongTextDataType(is_applicable=None, value=None, \_is_owner=True) + +Bases: [`IDataValue`](#ansys.grantami.backend.soap.IDataValue.IDataValue) + +A type to contain a long text data type. + +* **Parameters:** + * **is_applicable** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **value** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *property* is_applicable *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property is_applicable is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* value *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property value is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### LookupValue + + + +### *class* LookupValue(attribute_reference=None, attribute_value=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Object containing an [`AttributeValue`](#module-ansys.grantami.backend.soap.AttributeValue) and +[`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference) object that uniquely identify a record in +a table. + +* **Parameters:** + * **attribute_reference** ([`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference)) + * **attribute_value** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *property* attribute_reference *: [AttributeReference](#ansys.grantami.backend.soap.AttributeReference.AttributeReference)* + +Property attribute_reference is of type [`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference). + +* **Return type:** + [`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference) + + + +#### *property* attribute_value *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property attribute_value is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### LowEndSearchValue + + + +### *class* LowEndSearchValue(unit=None, value=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Lower limit for the [`BetweenSearchValue`](#module-ansys.grantami.backend.soap.BetweenSearchValue) search criterion. + +* **Parameters:** + * **unit** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **value** ([*float*](https://docs.python.org/3/library/functions.html#float)) + + + +#### *property* unit *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property unit is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* value *: [float](https://docs.python.org/3/library/functions.html#float)* + +Property value is of type float. + +* **Return type:** + [float](https://docs.python.org/3/library/functions.html#float) + + + + + +### MIEntityResolution + + + +### *class* MIEntityResolution(can_write=None, entity_reference=None, resolved=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Represents whether the entity referred to by the reference property can actually be resolved to an +MI entity, and if that entity can be resolved whether or not it is writable. + +* **Parameters:** + * **can_write** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **entity_reference** ([`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference)) + * **resolved** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + + + +#### *class* CanWrite + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + + + +#### No *= 1* + + + +#### NotSupported *= 2* + + + +#### Yes *= 0* + + + +#### *property* can_write *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property can_write is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* entity_reference *: [RecordReference](#ansys.grantami.backend.soap.RecordReference.RecordReference)* + +Property entity_reference is of type [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference). + +* **Return type:** + [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) + + + +#### *property* resolved *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property resolved is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + + + +### MIParameterValue + + + +### *class* MIParameterValue(revision_info=None, value=None, value_name=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +A named value of a Parameter in a Granta MI Database. + +* **Parameters:** + * **revision_info** ([`RevisionInfo`](#module-ansys.grantami.backend.soap.RevisionInfo)) + * **value** ([*float*](https://docs.python.org/3/library/functions.html#float)) + * **value_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *property* revision_info *: [RevisionInfo](#ansys.grantami.backend.soap.RevisionInfo.RevisionInfo)* + +Property revision_info is of type [`RevisionInfo`](#module-ansys.grantami.backend.soap.RevisionInfo). + +* **Return type:** + [`RevisionInfo`](#module-ansys.grantami.backend.soap.RevisionInfo) + + + +#### *property* value *: [float](https://docs.python.org/3/library/functions.html#float)* + +Property value is of type float. + +* **Return type:** + [float](https://docs.python.org/3/library/functions.html#float) + + + +#### *property* value_name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property value_name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### MISession + + + +### *class* MISession(url='', verbosity=1) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +A connection to a Granta MI Server. Don’t create this class directly, instead see +[`GRANTA_MISession`](#ansys.grantami.backend.soap.GRANTA_MISession.GRANTA_MISession) + +* **Parameters:** + * **url** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – URL to access the Granta MI Service Layer + * **verbosity** ([`str`](https://docs.python.org/3/library/stdtypes.html#str), {1, 2, 3}) – Logging verbosity, accepted values are: 1 - “ERROR”, 2 - “WARNING”, or 3 - “DEBUG” + + + +#### connection_is_valid() + +Indicates whether the connection was successful. + +* **Returns:** + * **is_valid** (*bool*) – Whether the connection test succeeded + * **description** (*str*) – Description of the test outcome +* **Return type:** + [*Tuple*](https://docs.python.org/3/library/typing.html#typing.Tuple)[[bool](https://docs.python.org/3/library/functions.html#bool), [str](https://docs.python.org/3/library/stdtypes.html#str)] + + + +#### set_authorization(auth) + +Use Open ID Connect to authenticate to the Granta MI Service Layer + +* **Parameters:** + **auth** ([`OIDC`](#ansys.grantami.backend.soap.OIDC.OIDC)) + + + +#### set_credentials(domain, username, password) + +Use the provided credentials to authenticate with the Granta MI Service Layer. + +The Granta MI Service Layer must be configured to allow Basic authentication, or the MI Scripting Toolkit +session must be created on Windows, and NTLM authentication must be enabled. + +* **Parameters:** + * **username** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – Granta MI username + * **password** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – Granta MI password + * **domain** ([`str`](https://docs.python.org/3/library/stdtypes.html#str), optional) – Granta MI user domain + + + +#### set_receive_timeout(timeout) + +Sets time in milliseconds to wait for a response before timing out. + +* **Parameters:** + **timeout** ([*int*](https://docs.python.org/3/library/functions.html#int)) – Timeout (in milliseconds) + + + +#### test_connection() + +Raises an exception if a request to the Granta MI Service Layer does not respond or responds with an error. + +* **Raises:** + [**GRANTA_Exception**](#ansys.grantami.backend.soap.GRANTA_Exceptions.GRANTA_Exception) – If the connection test failed + + + +#### use_auto_logon() + +Use the Windows credentials of the current user to authenticate to the Granta MI Service Layer. + + + +#### *property* act_as_read_user *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Forces the session to operate with READ permissions, even if the user has higher privileges. + +If the user authenticates with a role that has additional privileges the session will behave as though they +have only read permissions. This prevents writing to the database and affects which versions of records are +visible for version controlled databases. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + + + +### MinMax + + + +### *class* MinMax(max_value=None, min_value=None, units=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +The minimum and maximum data values for a specified numerical attribute, calculated from all records +you have read permissions for in a database. + +* **Parameters:** + * **max_value** ([`MinMaxValue`](#module-ansys.grantami.backend.soap.MinMaxValue)) + * **min_value** ([`MinMaxValue`](#module-ansys.grantami.backend.soap.MinMaxValue)) + * **units** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *property* max_value *: [MinMaxValue](#ansys.grantami.backend.soap.MinMaxValue.MinMaxValue)* + +Property max_value is of type [`MinMaxValue`](#module-ansys.grantami.backend.soap.MinMaxValue). + +* **Return type:** + [`MinMaxValue`](#module-ansys.grantami.backend.soap.MinMaxValue) + + + +#### *property* min_value *: [MinMaxValue](#ansys.grantami.backend.soap.MinMaxValue.MinMaxValue)* + +Property min_value is of type [`MinMaxValue`](#module-ansys.grantami.backend.soap.MinMaxValue). + +* **Return type:** + [`MinMaxValue`](#module-ansys.grantami.backend.soap.MinMaxValue) + + + +#### *property* units *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property units is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### MinMaxValue + + + +### *class* MinMaxValue(date_time=None, double=None, integer=None, type_=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +A type that represents the minimum or maximum data value for a numerical attribute in a database. + +* **Parameters:** + * **date_time** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **double** ([*float*](https://docs.python.org/3/library/functions.html#float)) + * **integer** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **type** ([*int*](https://docs.python.org/3/library/functions.html#int)) + + + +#### *class* Type + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + + + +#### DateType *= 0* + + + +#### DoubleType *= 1* + + + +#### ERROR *= -1* + + + +#### IntegerType *= 2* + + + +#### NotANumber *= 3* + + + +#### *property* date_time *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property date_time is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* double *: [float](https://docs.python.org/3/library/functions.html#float)* + +Property double is of type float. + +* **Return type:** + [float](https://docs.python.org/3/library/functions.html#float) + + + +#### *property* integer *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property integer is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* type_ *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property type_ is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + + + +### ModifyRecordLinksRequest + + + +### *class* ModifyRecordLinksRequest(import_error_mode=None, record_link_check_mode=None, record_link_group_reference=None, record_link_modifications=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Input to the modify_record_links operation. +Requires a [`RecordLinkGroupReference`](#module-ansys.grantami.backend.soap.RecordLinkGroupReference) to the record link group +you wish to modify and a [`RecordLinkModifications`](#module-ansys.grantami.backend.soap.RecordLinkModifications) object, +which contains the modifications you wish to make to the record link group. The ‘import_error_mode’ +property defines how to handle errors which occur during linking and can take the following values: +‘FaultAndRollbackOnAnyError’, which stops the linking request when an error occurs and attempts to +roll back to the state before the request was issued; or ‘LogAndContinueWherePossible’, which will +log non-fatal errors and attempt to continue with the linking request. The ‘record_link_check_mode’ +property defines how to check the status of existing links and takes the following values: +‘CheckOnlyForwardLinks’, which checks for link only in the forward direction and is quicker than +checking both directions; or ‘CheckForwardAndReverseLinks’, which is slower but safer as it checks +for both forward and backward links. + +* **Parameters:** + * **import_error_mode** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **record_link_check_mode** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **record_link_group_reference** ([`RecordLinkGroupReference`](#module-ansys.grantami.backend.soap.RecordLinkGroupReference)) + * **record_link_modifications** ([`RecordLinkModifications`](#module-ansys.grantami.backend.soap.RecordLinkModifications)) + + + +#### *property* import_error_mode *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property import_error_mode is of type str. See [`GRANTA_Constants`](#module-ansys.grantami.backend.soap.GRANTA_Constants) for supported values. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* record_link_check_mode *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property record_link_check_mode is of type str. See [`GRANTA_Constants`](#module-ansys.grantami.backend.soap.GRANTA_Constants) for supported values. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* record_link_group_reference *: [RecordLinkGroupReference](#ansys.grantami.backend.soap.RecordLinkGroupReference.RecordLinkGroupReference)* + +Property record_link_group_reference is of type [`RecordLinkGroupReference`](#module-ansys.grantami.backend.soap.RecordLinkGroupReference). + +* **Return type:** + [`RecordLinkGroupReference`](#module-ansys.grantami.backend.soap.RecordLinkGroupReference) + + + +#### *property* record_link_modifications *: [RecordLinkModifications](#ansys.grantami.backend.soap.RecordLinkModifications.RecordLinkModifications)* + +Property record_link_modifications is of type [`RecordLinkModifications`](#module-ansys.grantami.backend.soap.RecordLinkModifications). + +* **Return type:** + [`RecordLinkModifications`](#module-ansys.grantami.backend.soap.RecordLinkModifications) + + + + + +### ModifyRecordLinksResponse + + + +### *class* ModifyRecordLinksResponse(c_obj) + +Bases: [`Response`](#ansys.grantami.backend.soap.Response.Response) + +The response from a modify_record_links request. + +* **Parameters:** + **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a ModifyRecordLinksResponse object. + + + +#### *property* record_link_changes *: [RecordLinkChanges](#ansys.grantami.backend.soap.RecordLinkChanges.RecordLinkChanges)* + +Property record_link_changes is of type [`RecordLinkChanges`](#module-ansys.grantami.backend.soap.RecordLinkChanges). + +* **Return type:** + [`RecordLinkChanges`](#module-ansys.grantami.backend.soap.RecordLinkChanges) + + + + + +### NamedAttribute + + + +### *class* NamedAttribute(about=None, attribute=None, is_meta=None, name=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Name information about an Attribute in a Granta MI database. + +* **Parameters:** + * **about** ([`NamedAttribute`](#module-ansys.grantami.backend.soap.NamedAttribute)) + * **attribute** ([`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference)) + * **is_meta** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *property* about *: [NamedAttribute](#ansys.grantami.backend.soap.NamedAttribute.NamedAttribute)* + +Property about is of type [`NamedAttribute`](#module-ansys.grantami.backend.soap.NamedAttribute). Only populated if ‘is_meta’ is True. + +* **Return type:** + [`NamedAttribute`](#module-ansys.grantami.backend.soap.NamedAttribute) + + + +#### *property* attribute *: [AttributeReference](#ansys.grantami.backend.soap.AttributeReference.AttributeReference)* + +Property attribute is of type [`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference). + +* **Return type:** + [`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference) + + + +#### *property* is_meta *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property is_meta is of type bool. If this is True, the ‘about’ property may have additional information about the related parent attribute. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### NamedLayout + + + +### *class* NamedLayout(layout=None, name=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +A layout in a Granta MI database. + +* **Parameters:** + * **layout** ([`LayoutReference`](#module-ansys.grantami.backend.soap.LayoutReference)) + * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *property* layout *: [LayoutReference](#ansys.grantami.backend.soap.LayoutReference.LayoutReference)* + +Property layout is of type [`LayoutReference`](#module-ansys.grantami.backend.soap.LayoutReference). + +* **Return type:** + [`LayoutReference`](#module-ansys.grantami.backend.soap.LayoutReference) + + + +#### *property* name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### NamedRecord + + + +### *class* NamedRecord(long_name=None, record_reference=None, short_name=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +A [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) with the short and long name of the record. + +* **Parameters:** + * **long_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **record_reference** ([`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference)) + * **short_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *property* long_name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property long_name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* record_reference *: [RecordReference](#ansys.grantami.backend.soap.RecordReference.RecordReference)* + +Property record_reference is of type [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference). + +* **Return type:** + [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) + + + +#### *property* short_name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property short_name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### NamedSubset + + + +### *class* NamedSubset(name=None, subset=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +A [`SubsetReference`](#module-ansys.grantami.backend.soap.SubsetReference) with the subset name. + +* **Parameters:** + * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **subset** ([`SubsetReference`](#module-ansys.grantami.backend.soap.SubsetReference)) + + + +#### *property* name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* subset *: [SubsetReference](#ansys.grantami.backend.soap.SubsetReference.SubsetReference)* + +Property subset is of type [`SubsetReference`](#module-ansys.grantami.backend.soap.SubsetReference). + +* **Return type:** + [`SubsetReference`](#module-ansys.grantami.backend.soap.SubsetReference) + + + + + +### NamedTargetedSourceRecord + + + +### *class* NamedTargetedSourceRecord(record=None, target_records=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +A named record used for modifying record links. + +* **Parameters:** + * **record** ([`NamedRecord`](#module-ansys.grantami.backend.soap.NamedRecord)) + * **target_records** (list of [`NamedRecord`](#module-ansys.grantami.backend.soap.NamedRecord)) + + + +#### add_target_records(\_namedRecord) + +Appends \_namedRecord to targetRecords property on NamedTargetedSourceRecord C-object. + +* **Parameters:** + **\_namedRecord** ([`NamedRecord`](#module-ansys.grantami.backend.soap.NamedRecord)) + + + +#### *property* record *: [NamedRecord](#ansys.grantami.backend.soap.NamedRecord.NamedRecord)* + +Property record is of type [`NamedRecord`](#module-ansys.grantami.backend.soap.NamedRecord). + +* **Return type:** + [`NamedRecord`](#module-ansys.grantami.backend.soap.NamedRecord) + + + +#### *property* target_records *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[NamedRecord](#ansys.grantami.backend.soap.NamedRecord.NamedRecord)]* + +Property target_records is a list of [`NamedRecord`](#module-ansys.grantami.backend.soap.NamedRecord) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`NamedRecord`](#module-ansys.grantami.backend.soap.NamedRecord) + + + + + +### NotatedTargetRecord + + + +### *class* NotatedTargetRecord(notes=None, record=None, reverse_notes=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +A [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) of the record you wish to link to and notes +on the record link. +Requires a [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference). Notes on the link and the reverse +link are optional. + +* **Parameters:** + * **notes** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **record** ([`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference)) + * **reverse_notes** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *property* notes *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property notes is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* record *: [RecordReference](#ansys.grantami.backend.soap.RecordReference.RecordReference)* + +Property record is of type [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference). + +* **Return type:** + [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) + + + +#### *property* reverse_notes *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property reverse_notes is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### NotatedTargetedSourceRecord + + + +### *class* NotatedTargetedSourceRecord(source_record=None, target_records=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +A [`NamedRecord`](#module-ansys.grantami.backend.soap.NamedRecord) to link from and container of +[`NamedRecord`](#module-ansys.grantami.backend.soap.NamedRecord) of the records to link to. +Requires a source [`NamedRecord`](#module-ansys.grantami.backend.soap.NamedRecord). Can set zero to many target +[`NamedRecord`](#module-ansys.grantami.backend.soap.NamedRecord) objects you wish to link to. + +* **Parameters:** + * **source_record** ([`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference)) + * **target_records** (list of [`NotatedTargetRecord`](#module-ansys.grantami.backend.soap.NotatedTargetRecord)) + + + +#### add_target_record(\_notatedTargetRecord) + +Appends \_notatedTargetRecord to targetRecords property on NotatedTargetedSourceRecord C-object. + +* **Parameters:** + **\_notatedTargetRecord** ([`NotatedTargetRecord`](#module-ansys.grantami.backend.soap.NotatedTargetRecord)) + + + +#### *property* source_record *: [RecordReference](#ansys.grantami.backend.soap.RecordReference.RecordReference)* + +Property source_record is of type [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference). + +* **Return type:** + [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) + + + +#### *property* target_records *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[NotatedTargetRecord](#ansys.grantami.backend.soap.NotatedTargetRecord.NotatedTargetRecord)]* + +Property target_records is a list of [`NotatedTargetRecord`](#module-ansys.grantami.backend.soap.NotatedTargetRecord) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`NotatedTargetRecord`](#module-ansys.grantami.backend.soap.NotatedTargetRecord) + + + + + +### OIDC + + + +### *class* OIDC(access_token=None, refresh_token=None, authorize_timeout=None) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +An object to allow authorization using OpenID Connect. Contact Ansys Granta Technical Support for information +on supported identity providers, and for configuration and setup documentation. + +If neither `access_token` nor `refresh_token` are provided then call [`authorize_with_authorization_code_flow()`](#ansys.grantami.backend.soap.OIDC.OIDC.authorize_with_authorization_code_flow) or +[`authorize_with_device_code_flow()`](#ansys.grantami.backend.soap.OIDC.OIDC.authorize_with_device_code_flow) for interactive login with the user’s credentials. If `refresh_token` is +provided then the session will attempt to obtain an access token from the identity provider. If `access_token` is +provided then the session will use it directly. + +* **Parameters:** + * **access_token** ([`str`](https://docs.python.org/3/library/stdtypes.html#str), optional) – Valid access token for the MI Service Layer + * **refresh_token** ([`str`](https://docs.python.org/3/library/stdtypes.html#str), optional) – Valid refresh token for the MI Service Layer + * **authorize_timeout** ([`int`](https://docs.python.org/3/library/functions.html#int), default 300,000) – Number of milliseconds to wait for a response after calling [`authorize_with_authorization_code_flow()`](#ansys.grantami.backend.soap.OIDC.OIDC.authorize_with_authorization_code_flow) + or [`authorize_with_device_code_flow()`](#ansys.grantami.backend.soap.OIDC.OIDC.authorize_with_device_code_flow). + + + +#### authorize_with_authorization_code_flow() + +Authorize a Granta MI session with an OpenID Connect provider. + +Uses the Authorization Code Flow with PKCE to authenticate. + + + +#### authorize_with_device_code_flow() + +Authorize a Granta MI session with an OpenID Connect provider. + +Uses the Device Code Flow to authenticate. + + + +#### check_authentication() + +Checks whether your access and refresh tokens are valid. + +* **Returns:** + * **is_valid** (*bool*) – Whether the tokens could be used to connect to the Granta MI Service layer + * **message** (*str*) – Error message if the tokens could not be used to connect to the Granta MI Service Layer. +* **Return type:** + [*Tuple*](https://docs.python.org/3/library/typing.html#typing.Tuple)[[bool](https://docs.python.org/3/library/functions.html#bool), [str](https://docs.python.org/3/library/stdtypes.html#str)] + + + +#### test_authentication() + +Checks whether your access and refresh tokens are valid. + +* **Raises:** + [**GRANTA_Exception**](#ansys.grantami.backend.soap.GRANTA_Exceptions.GRANTA_Exception) – If the tokens could not be used to connect to the Granta MI Service Layer. + + + +#### *property* access_token *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +OIDC access token. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* authorize_timeout *: [int](https://docs.python.org/3/library/functions.html#int)* + +The number of milliseconds to wait for the user to authenticate in their browser. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* refresh_token *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +OIDC refresh token, if one is available from the OpenID Identity Provider. + +#### NOTE +The identity provider must provide the `offline_access` scope for refresh tokens to be available + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### ParameterDetail + + + +### *class* ParameterDetail(applies_to_attribute=None, applies_to_record=None, default_value=None, interpolation_type=None, name=None, order=None, parameter_reference=None, parameter_type=None, parameter_values=None, revision_info=None, scale_type=None, unit=None, help_info=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Detailed information about a Parameter in a Granta MI Database. + +* **Parameters:** + * **applies_to_attribute** ([`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference)) + * **applies_to_record** ([`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference)) + * **default_value** ([`MIParameterValue`](#module-ansys.grantami.backend.soap.MIParameterValue)) + * **interpolation_type** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **order** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **parameter_reference** ([`ParameterReference`](#module-ansys.grantami.backend.soap.ParameterReference)) + * **parameter_type** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **parameter_values** (list of [`MIParameterValue`](#module-ansys.grantami.backend.soap.MIParameterValue)) + * **revision_info** ([`RevisionInfo`](#module-ansys.grantami.backend.soap.RevisionInfo)) + * **scale_type** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **unit** ([`UnitInformation`](#module-ansys.grantami.backend.soap.UnitInformation)) + * **help_info** ([`HelpInfo`](#module-ansys.grantami.backend.soap.HelpInfo)) + + + +#### *class* Interpolation + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + + + +#### CubicSpline *= 2* + + + +#### Linear *= 1* + + + +#### NONE *= 0* + + + +#### *class* ParameterType + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + + + +#### Discrete *= 2* + + + +#### NumericRestricted *= 1* + + + +#### NumericUnrestricted *= 0* + + + +#### *class* ScaleType + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + + + +#### Linear *= 1* + + + +#### Log *= 2* + + + +#### NotSet *= 0* + + + +#### *property* applies_to_attribute *: [AttributeReference](#ansys.grantami.backend.soap.AttributeReference.AttributeReference)* + +Property applies_to_attribute is of type [`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference). + +* **Return type:** + [`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference) + + + +#### *property* applies_to_record *: [RecordReference](#ansys.grantami.backend.soap.RecordReference.RecordReference)* + +Property applies_to_record is of type [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference). + +* **Return type:** + [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) + + + +#### *property* default_value *: [MIParameterValue](#ansys.grantami.backend.soap.MIParameterValue.MIParameterValue)* + +Property default_value is of type [`MIParameterValue`](#module-ansys.grantami.backend.soap.MIParameterValue). + +* **Return type:** + [`MIParameterValue`](#module-ansys.grantami.backend.soap.MIParameterValue) + + + +#### *property* help_info *: [HelpInfo](#ansys.grantami.backend.soap.HelpInfo.HelpInfo)* + +Property help_info is of type [`HelpInfo`](#module-ansys.grantami.backend.soap.HelpInfo). + +* **Return type:** + [`HelpInfo`](#module-ansys.grantami.backend.soap.HelpInfo) + + + +#### *property* interpolation_type *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property interpolation_type is of type int. See [`ParameterDetail.Interpolation`](#ansys.grantami.backend.soap.ParameterDetail.ParameterDetail.Interpolation) for supported values. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* order *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property order is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* parameter_reference *: [ParameterReference](#ansys.grantami.backend.soap.ParameterReference.ParameterReference)* + +Property parameter_reference is of type [`ParameterReference`](#module-ansys.grantami.backend.soap.ParameterReference). + +* **Return type:** + [`ParameterReference`](#module-ansys.grantami.backend.soap.ParameterReference) + + + +#### *property* parameter_type *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property parameter_type is of type int. See [`ParameterDetail.ParameterType`](#ansys.grantami.backend.soap.ParameterDetail.ParameterDetail.ParameterType) for supported values. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* parameter_values *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[MIParameterValue](#ansys.grantami.backend.soap.MIParameterValue.MIParameterValue)]* + +Property parameter_values is a list of [`MIParameterValue`](#module-ansys.grantami.backend.soap.MIParameterValue) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`MIParameterValue`](#module-ansys.grantami.backend.soap.MIParameterValue) + + + +#### *property* revision_info *: [RevisionInfo](#ansys.grantami.backend.soap.RevisionInfo.RevisionInfo)* + +Property revision_info is of type [`RevisionInfo`](#module-ansys.grantami.backend.soap.RevisionInfo). + +* **Return type:** + [`RevisionInfo`](#module-ansys.grantami.backend.soap.RevisionInfo) + + + +#### *property* scale_type *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property scale_type is of type int. See [`ParameterDetail.ScaleType`](#ansys.grantami.backend.soap.ParameterDetail.ParameterDetail.ScaleType) for supported values. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* unit *: [UnitInformation](#ansys.grantami.backend.soap.UnitInformation.UnitInformation)* + +Property unit is of type [`UnitInformation`](#module-ansys.grantami.backend.soap.UnitInformation). + +* **Return type:** + [`UnitInformation`](#module-ansys.grantami.backend.soap.UnitInformation) + + + + + +### ParameterDomain + + + +### *class* ParameterDomain(exporter_parameter_id=None, interpolable=None, values=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +A type to contain a list of parameter values. + +* **Parameters:** + * **exporter_parameter_id** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **interpolable** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **values** (list of [`ParameterValue`](#module-ansys.grantami.backend.soap.ParameterValue)) + + + +#### *property* exporter_parameter_id *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property exporter_parameter_id is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* interpolable *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property interpolable is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* values *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[ParameterValue](#ansys.grantami.backend.soap.ParameterValue.ParameterValue)]* + +Property values is a list of [`ParameterValue`](#module-ansys.grantami.backend.soap.ParameterValue) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`ParameterValue`](#module-ansys.grantami.backend.soap.ParameterValue) + + + + + +### ParameterInformation + + + +### *class* ParameterInformation(name=None, parameter_reference=None, unit=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Information for a parameter in a Granta MI database. +Contains the name and unit information for a parameter and a +[`ParameterReference`](#module-ansys.grantami.backend.soap.ParameterReference) to the parameter. + +* **Parameters:** + * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **parameter_reference** ([`ParameterReference`](#module-ansys.grantami.backend.soap.ParameterReference)) + * **unit** ([`UnitInformation`](#module-ansys.grantami.backend.soap.UnitInformation)) + + + +#### *property* name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* parameter_reference *: [ParameterReference](#ansys.grantami.backend.soap.ParameterReference.ParameterReference)* + +Property parameter_reference is of type [`ParameterReference`](#module-ansys.grantami.backend.soap.ParameterReference). + +* **Return type:** + [`ParameterReference`](#module-ansys.grantami.backend.soap.ParameterReference) + + + +#### *property* unit *: [UnitInformation](#ansys.grantami.backend.soap.UnitInformation.UnitInformation)* + +Property unit is of type [`UnitInformation`](#module-ansys.grantami.backend.soap.UnitInformation). + +* **Return type:** + [`UnitInformation`](#module-ansys.grantami.backend.soap.UnitInformation) + + + + + +### ParameterReference + + + +### *class* ParameterReference(db_key=None, id_=None, name=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Identification of a particular parameter in a Granta MI database . +For requests a db_key is required, and either the parameter ID or the parameter name. + +* **Parameters:** + * **db_key** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **id** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *property* db_key *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property db_key is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* id_ *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property id_ is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### ParameterReferenceAndValue + + + +### *class* ParameterReferenceAndValue(parameter=None, parameter_value=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Contains a [`ParameterReference`](#module-ansys.grantami.backend.soap.ParameterReference) and a +[`ParameterValue`](#module-ansys.grantami.backend.soap.ParameterValue). + +* **Parameters:** + * **parameter** ([`ParameterReference`](#module-ansys.grantami.backend.soap.ParameterReference)) + * **parameter_value** ([`ParameterValue`](#module-ansys.grantami.backend.soap.ParameterValue)) + + + +#### *property* parameter *: [ParameterReference](#ansys.grantami.backend.soap.ParameterReference.ParameterReference)* + +Property parameter is of type [`ParameterReference`](#module-ansys.grantami.backend.soap.ParameterReference). + +* **Return type:** + [`ParameterReference`](#module-ansys.grantami.backend.soap.ParameterReference) + + + +#### *property* parameter_value *: [ParameterValue](#ansys.grantami.backend.soap.ParameterValue.ParameterValue)* + +Property parameter_value is of type [`ParameterValue`](#module-ansys.grantami.backend.soap.ParameterValue). + +* **Return type:** + [`ParameterValue`](#module-ansys.grantami.backend.soap.ParameterValue) + + + + + +### ParameterReferencesAndValues + + + +### *class* ParameterReferencesAndValues(parameter_with_values=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +A collection of [`ParameterReferenceAndValue`](#module-ansys.grantami.backend.soap.ParameterReferenceAndValue) objects. + +* **Parameters:** + **parameter_with_values** (list of [`ParameterReferenceAndValue`](#module-ansys.grantami.backend.soap.ParameterReferenceAndValue)) + + + +#### add_parameter_with_value(\_parameterReferenceAndValue) + +Appends \_parameterReferenceAndValue to parameterWithValues property on ParameterReferencesAndValues C-object. + +* **Parameters:** + **\_parameterReferenceAndValue** ([`ParameterReferenceAndValue`](#module-ansys.grantami.backend.soap.ParameterReferenceAndValue)) + + + +#### *property* parameter_with_values *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[ParameterReferenceAndValue](#ansys.grantami.backend.soap.ParameterReferenceAndValue.ParameterReferenceAndValue)]* + +Property parameter_with_values is a list of [`ParameterReferenceAndValue`](#module-ansys.grantami.backend.soap.ParameterReferenceAndValue) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`ParameterReferenceAndValue`](#module-ansys.grantami.backend.soap.ParameterReferenceAndValue) + + + + + +### ParameterValue + + + +### *class* ParameterValue(discrete_value=None, numeric_value=None, type_=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +A value of a Parameter in Functional data. + +* **Parameters:** + * **discrete_value** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **numeric_value** ([*float*](https://docs.python.org/3/library/functions.html#float)) + * **type** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *property* discrete_value *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property discrete_value is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* numeric_value *: [float](https://docs.python.org/3/library/functions.html#float)* + +Property numeric_value is of type float. + +* **Return type:** + [float](https://docs.python.org/3/library/functions.html#float) + + + +#### *property* type_ *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property type_ is of type str. There is no need to set this property manually. +See [`GRANTA_Constants`](#module-ansys.grantami.backend.soap.GRANTA_Constants) for supported values. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### Parameters + + + +### *class* Parameters(parameters=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +A collection of [`ParameterInformation`](#module-ansys.grantami.backend.soap.ParameterInformation) objects. + +* **Parameters:** + **parameters** (list of [`ParameterInformation`](#module-ansys.grantami.backend.soap.ParameterInformation)) + + + +#### add_parameter(\_parameterInformation) + +Appends \_parameterInformation to parameters property on Parameters C-object. + +* **Parameters:** + **\_parameterInformation** ([`ParameterInformation`](#module-ansys.grantami.backend.soap.ParameterInformation)) + + + +#### *property* parameters *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[ParameterInformation](#ansys.grantami.backend.soap.ParameterInformation.ParameterInformation)]* + +Property parameters is a list of [`ParameterInformation`](#module-ansys.grantami.backend.soap.ParameterInformation) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`ParameterInformation`](#module-ansys.grantami.backend.soap.ParameterInformation) + + + + + +### PartialTableReference + + + +### *class* PartialTableReference(table_guid=None, table_id=None, table_name=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +A reference to a Granta MI table. +Usually, just one of the several optional fields should be provided; where more than one is +provided, the highest priority one is used, where the descending priority order is: table_identity, +table_guid, table_name. + +* **Parameters:** + * **table_guid** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **table_id** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **table_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *property* table_guid *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property table_guid is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* table_id *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property table_id is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* table_name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property table_name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### PathLeaf + + + +### *class* PathLeaf(long_name=None, record_reference=None, short_name=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +The folder furthest from the root record folder, for each path checked or created. + +* **Parameters:** + * **long_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **record_reference** ([`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference)) + * **short_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *property* long_name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property long_name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* record_reference *: [RecordReference](#ansys.grantami.backend.soap.RecordReference.RecordReference)* + +Property record_reference is of type [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference). + +* **Return type:** + [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) + + + +#### *property* short_name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property short_name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### PictureDataType + + + +### *class* PictureDataType(url=None, content_type=None, data=None, is_applicable=None, \_is_owner=True) + +Bases: [`IDataValue`](#ansys.grantami.backend.soap.IDataValue.IDataValue) + +A type representing a piece of Picture data in a Granta MI Database. +To get a byte-array representing the binary data, call read_binary_data(). To set the binary data +(as part of a data import), use modify_binary_data(). + +* **Parameters:** + * **url** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **content_type** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **data** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **is_applicable** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + + + +#### modify_binary_data(binary_data) + +* **Parameters:** + **binary_data** ([*bytes*](https://docs.python.org/3/library/stdtypes.html#bytes)) + + + +#### read_binary_data() + +* **Return type:** + [bytes](https://docs.python.org/3/library/stdtypes.html#bytes) + + + +#### *property* content_type *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property content_type is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* data *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property data is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* is_applicable *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property is_applicable is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* url *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property url is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### PointDataType + + + +### *class* PointDataType(is_applicable=None, is_estimated=None, parameters=None, points=None, unit_symbol=None, \_is_owner=True) + +Bases: [`IDataValue`](#ansys.grantami.backend.soap.IDataValue.IDataValue) + +A type to contain an array of float data types. + +* **Parameters:** + * **is_applicable** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **is_estimated** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **parameters** ([`Parameters`](#module-ansys.grantami.backend.soap.Parameters)) + * **points** (list of [`PointValueWithParameters`](#module-ansys.grantami.backend.soap.PointValueWithParameters)) + * **unit_symbol** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### add_point(\_pointValueWithParameters) + +Appends \_pointValueWithParameters to points property on PointDataType C-object. + +* **Parameters:** + **\_pointValueWithParameters** ([`PointValueWithParameters`](#module-ansys.grantami.backend.soap.PointValueWithParameters)) + + + +#### *property* is_applicable *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property is_applicable is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* is_estimated *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property is_estimated is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* parameters *: [Parameters](#ansys.grantami.backend.soap.Parameters.Parameters)* + +Property parameters is of type [`Parameters`](#module-ansys.grantami.backend.soap.Parameters). + +* **Return type:** + [`Parameters`](#module-ansys.grantami.backend.soap.Parameters) + + + +#### *property* points *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[PointValueWithParameters](#ansys.grantami.backend.soap.PointValueWithParameters.PointValueWithParameters)]* + +Property points is a list of [`PointValueWithParameters`](#module-ansys.grantami.backend.soap.PointValueWithParameters) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`PointValueWithParameters`](#module-ansys.grantami.backend.soap.PointValueWithParameters) + + + +#### *property* unit_symbol *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property unit_symbol is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### PointValueWithParameters + + + +### *class* PointValueWithParameters(has_trailing_zero_info=None, trailing_zero_info=None, value=None, value_parameters=None, has_sig_figs_for_import=None, sig_figs_for_import=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +A numeric value with associated [`ParameterReferencesAndValues`](#module-ansys.grantami.backend.soap.ParameterReferencesAndValues) +object. + +* **Parameters:** + * **has_trailing_zero_info** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **trailing_zero_info** ([`TrailingZeroInformation`](#module-ansys.grantami.backend.soap.TrailingZeroInformation)) + * **value** ([*float*](https://docs.python.org/3/library/functions.html#float)) + * **value_parameters** ([`ParameterReferencesAndValues`](#module-ansys.grantami.backend.soap.ParameterReferencesAndValues)) + * **has_sig_figs_for_import** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **sig_figs_for_import** ([*int*](https://docs.python.org/3/library/functions.html#int)) + + + +#### *property* has_sig_figs_for_import *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property has_sig_figs_for_import is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* has_trailing_zero_info *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property has_trailing_zero_info is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* sig_figs_for_import *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property sig_figs_for_import is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* trailing_zero_info *: [TrailingZeroInformation](#ansys.grantami.backend.soap.TrailingZeroInformation.TrailingZeroInformation)* + +Property trailing_zero_info is of type [`TrailingZeroInformation`](#module-ansys.grantami.backend.soap.TrailingZeroInformation). + +* **Return type:** + [`TrailingZeroInformation`](#module-ansys.grantami.backend.soap.TrailingZeroInformation) + + + +#### *property* value *: [float](https://docs.python.org/3/library/functions.html#float)* + +Property value is of type float. + +* **Return type:** + [float](https://docs.python.org/3/library/functions.html#float) + + + +#### *property* value_parameters *: [ParameterReferencesAndValues](#ansys.grantami.backend.soap.ParameterReferencesAndValues.ParameterReferencesAndValues)* + +Property value_parameters is of type [`ParameterReferencesAndValues`](#module-ansys.grantami.backend.soap.ParameterReferencesAndValues). + +* **Return type:** + [`ParameterReferencesAndValues`](#module-ansys.grantami.backend.soap.ParameterReferencesAndValues) + + + + + +### RangeDataType + + + +### *class* RangeDataType(has_high=None, has_high_trailing_zero_info=None, has_low=None, has_low_trailing_zero_info=None, high=None, high_value_trailing_zero_info=None, is_applicable=None, is_estimated=None, low=None, low_value_trailing_zero_info=None, unit_symbol=None, high_value_is_inclusive=None, low_value_is_inclusive=None, has_high_value_sig_figs_for_import=None, has_low_value_sig_figs_for_import=None, high_value_sig_figs_for_import=None, low_value_sig_figs_for_import=None, \_is_owner=True) + +Bases: [`IDataValue`](#ansys.grantami.backend.soap.IDataValue.IDataValue) + +Type for values of range data. +Both low_value and high_value must be populated. + +* **Parameters:** + * **has_high** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **has_high_trailing_zero_info** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **has_low** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **has_low_trailing_zero_info** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **high** ([*float*](https://docs.python.org/3/library/functions.html#float)) + * **high_value_trailing_zero_info** ([`TrailingZeroInformation`](#module-ansys.grantami.backend.soap.TrailingZeroInformation)) + * **is_applicable** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **is_estimated** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **low** ([*float*](https://docs.python.org/3/library/functions.html#float)) + * **low_value_trailing_zero_info** ([`TrailingZeroInformation`](#module-ansys.grantami.backend.soap.TrailingZeroInformation)) + * **unit_symbol** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **high_value_is_inclusive** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **low_value_is_inclusive** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **has_high_value_sig_figs_for_import** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **has_low_value_sig_figs_for_import** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **high_value_sig_figs_for_import** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **low_value_sig_figs_for_import** ([*int*](https://docs.python.org/3/library/functions.html#int)) + + + +#### *property* has_high *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property has_high is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* has_high_trailing_zero_info *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property has_high_trailing_zero_info is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* has_high_value_sig_figs_for_import *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property has_high_value_sig_figs_for_import is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* has_low *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property has_low is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* has_low_trailing_zero_info *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property has_low_trailing_zero_info is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* has_low_value_sig_figs_for_import *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property has_low_value_sig_figs_for_import is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* high *: [float](https://docs.python.org/3/library/functions.html#float)* + +Property high is of type float. + +* **Return type:** + [float](https://docs.python.org/3/library/functions.html#float) + + + +#### *property* high_value_is_inclusive *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property high_value_is_inclusive is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* high_value_sig_figs_for_import *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property high_value_sig_figs_for_import is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* high_value_trailing_zero_info *: [TrailingZeroInformation](#ansys.grantami.backend.soap.TrailingZeroInformation.TrailingZeroInformation)* + +Property high_value_trailing_zero_info is of type [`TrailingZeroInformation`](#module-ansys.grantami.backend.soap.TrailingZeroInformation). + +* **Return type:** + [`TrailingZeroInformation`](#module-ansys.grantami.backend.soap.TrailingZeroInformation) + + + +#### *property* is_applicable *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property is_applicable is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* is_estimated *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property is_estimated is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* low *: [float](https://docs.python.org/3/library/functions.html#float)* + +Property low is of type float. + +* **Return type:** + [float](https://docs.python.org/3/library/functions.html#float) + + + +#### *property* low_value_is_inclusive *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property low_value_is_inclusive is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* low_value_sig_figs_for_import *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property low_value_sig_figs_for_import is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* low_value_trailing_zero_info *: [TrailingZeroInformation](#ansys.grantami.backend.soap.TrailingZeroInformation.TrailingZeroInformation)* + +Property low_value_trailing_zero_info is of type [`TrailingZeroInformation`](#module-ansys.grantami.backend.soap.TrailingZeroInformation). + +* **Return type:** + [`TrailingZeroInformation`](#module-ansys.grantami.backend.soap.TrailingZeroInformation) + + + +#### *property* unit_symbol *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property unit_symbol is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### RasterSize + + + +### *class* RasterSize(height_pixels=None, width_pixels=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Gives the size in pixels of picture data. + +* **Parameters:** + * **height_pixels** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **width_pixels** ([*int*](https://docs.python.org/3/library/functions.html#int)) + + + +#### *property* height_pixels *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property height_pixels is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* width_pixels *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property width_pixels is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + + + +### RecordAttribute + + + +### *class* RecordAttribute(attribute=None, data_created_record_version=None, data_retired_record_version=None, data_revision_info=None, data_version_number=None, has_data=None, parameter_details=None, record_reference=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Meta-information about the data of a particular attribute of a particular Record in a Granta MI +database. +Does NOT include values of the data (see [`AttributeValue`](#module-ansys.grantami.backend.soap.AttributeValue) type). + +* **Parameters:** + * **attribute** ([`NamedAttribute`](#module-ansys.grantami.backend.soap.NamedAttribute)) + * **data_created_record_version** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **data_retired_record_version** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **data_revision_info** ([`RevisionInfo`](#module-ansys.grantami.backend.soap.RevisionInfo)) + * **data_version_number** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **has_data** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **parameter_details** (list of [`ParameterDetail`](#module-ansys.grantami.backend.soap.ParameterDetail)) + * **record_reference** ([`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference)) + + + +#### *property* attribute *: [NamedAttribute](#ansys.grantami.backend.soap.NamedAttribute.NamedAttribute)* + +Property attribute is of type [`NamedAttribute`](#module-ansys.grantami.backend.soap.NamedAttribute). + +* **Return type:** + [`NamedAttribute`](#module-ansys.grantami.backend.soap.NamedAttribute) + + + +#### *property* data_created_record_version *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property data_created_record_version is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* data_retired_record_version *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property data_retired_record_version is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* data_revision_info *: [RevisionInfo](#ansys.grantami.backend.soap.RevisionInfo.RevisionInfo)* + +Property data_revision_info is of type [`RevisionInfo`](#module-ansys.grantami.backend.soap.RevisionInfo). + +* **Return type:** + [`RevisionInfo`](#module-ansys.grantami.backend.soap.RevisionInfo) + + + +#### *property* data_version_number *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property data_version_number is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* has_data *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property has_data is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* parameter_details *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[ParameterDetail](#ansys.grantami.backend.soap.ParameterDetail.ParameterDetail)]* + +Property parameter_details is a list of [`ParameterDetail`](#module-ansys.grantami.backend.soap.ParameterDetail) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`ParameterDetail`](#module-ansys.grantami.backend.soap.ParameterDetail) + + + +#### *property* record_reference *: [RecordReference](#ansys.grantami.backend.soap.RecordReference.RecordReference)* + +Property record_reference is of type [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference). + +* **Return type:** + [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) + + + + + +### RecordData + + + +### *class* RecordData(attribute_values=None, record_reference=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +The values of data for attribute(s) of a particular record. + +* **Parameters:** + * **attribute_values** (list of [`AttributeValue`](#module-ansys.grantami.backend.soap.AttributeValue)) + * **record_reference** ([`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference)) + + + +#### *property* attribute_values *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[AttributeValue](#ansys.grantami.backend.soap.AttributeValue.AttributeValue)]* + +Property attribute_values is a list of [`AttributeValue`](#module-ansys.grantami.backend.soap.AttributeValue) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`AttributeValue`](#module-ansys.grantami.backend.soap.AttributeValue) + + + +#### *property* record_reference *: [RecordReference](#ansys.grantami.backend.soap.RecordReference.RecordReference)* + +Property record_reference is of type [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference). + +* **Return type:** + [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) + + + + + +### RecordExporterParameters + + + +### *class* RecordExporterParameters(attributes=None, record=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +A type to contain a record and its associated attribute exporter parameters. + +* **Parameters:** + * **attributes** (list of [`AttributeExporterParameters`](#module-ansys.grantami.backend.soap.AttributeExporterParameters)) + * **record** ([`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference)) + + + +#### *property* attributes *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[AttributeExporterParameters](#ansys.grantami.backend.soap.AttributeExporterParameters.AttributeExporterParameters)]* + +Property attributes is a list of [`AttributeExporterParameters`](#module-ansys.grantami.backend.soap.AttributeExporterParameters) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`AttributeExporterParameters`](#module-ansys.grantami.backend.soap.AttributeExporterParameters) + + + +#### *property* record *: [RecordReference](#ansys.grantami.backend.soap.RecordReference.RecordReference)* + +Property record is of type [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference). + +* **Return type:** + [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) + + + + + +### RecordFilter + + + +### *class* RecordFilter(profile=None, subsets=None, record_lists=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +A type allowing lists of Records to be filtered, e.g., by membership of Subset(s). You should +specify either a profile or a subset reference, but not both. You can pass in a list containing an +uninitialized [`SubsetReference`](#module-ansys.grantami.backend.soap.SubsetReference) to effectively disable the +subset filter. Note that subsets are not inherited; newly-created records will not be filtered +until they are added to a Subset. + +* **Parameters:** + * **profile** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **subsets** (list of [`SubsetReference`](#module-ansys.grantami.backend.soap.SubsetReference)) + * **record_lists** (list of [`RecordListReference`](#module-ansys.grantami.backend.soap.RecordListReference)) + + + +#### add_record_list(\_recordListReference) + +Appends \_recordListReference to recordLists property on RecordFilter C-object. + +* **Parameters:** + **\_recordListReference** ([`RecordListReference`](#module-ansys.grantami.backend.soap.RecordListReference)) + + + +#### add_subset(\_subsetReference) + +Appends \_subsetReference to subsets property on RecordFilter C-object. + +* **Parameters:** + **\_subsetReference** ([`SubsetReference`](#module-ansys.grantami.backend.soap.SubsetReference)) + + + +#### *property* profile *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property profile is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* record_lists *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[RecordListReference](#ansys.grantami.backend.soap.RecordListReference.RecordListReference)]* + +Property record_lists is a list of [`RecordListReference`](#module-ansys.grantami.backend.soap.RecordListReference) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`RecordListReference`](#module-ansys.grantami.backend.soap.RecordListReference) + + + +#### *property* subsets *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[SubsetReference](#ansys.grantami.backend.soap.SubsetReference.SubsetReference)]* + +Property subsets is a list of [`SubsetReference`](#module-ansys.grantami.backend.soap.SubsetReference) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`SubsetReference`](#module-ansys.grantami.backend.soap.SubsetReference) + + + + + +### RecordFolderPath + + + +### *class* RecordFolderPath(color=None, record_reference=None, tree_names=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +The path to a Granta MI record folder. Contains the record folder at which the path starts as +parent, the tree names, and the color. + +* **Parameters:** + * **color** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **record_reference** ([`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference)) + * **tree_names** ([*list*](https://docs.python.org/3/library/stdtypes.html#list) *of* [*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### add_tree_name(value) + +Appends value to treeNames property on RecordFolderPath C-object. + +* **Parameters:** + **value** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *property* color *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property color is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* record_reference *: [RecordReference](#ansys.grantami.backend.soap.RecordReference.RecordReference)* + +Property record_reference is of type [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference). + +* **Return type:** + [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) + + + +#### *property* tree_names *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str)]* + +Property tree_names is a list of str objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + [list](https://docs.python.org/3/library/stdtypes.html#list) of [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### RecordLinkChanges + + + +### *class* RecordLinkChanges(linked=None, unlinked=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +A set of changes to be made to record link groups. + +* **Parameters:** + * **linked** (list of [`NamedTargetedSourceRecord`](#module-ansys.grantami.backend.soap.NamedTargetedSourceRecord)) + * **unlinked** (list of [`NamedTargetedSourceRecord`](#module-ansys.grantami.backend.soap.NamedTargetedSourceRecord)) + + + +#### *property* linked *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[NamedTargetedSourceRecord](#ansys.grantami.backend.soap.NamedTargetedSourceRecord.NamedTargetedSourceRecord)]* + +Property linked is a list of [`NamedTargetedSourceRecord`](#module-ansys.grantami.backend.soap.NamedTargetedSourceRecord) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`NamedTargetedSourceRecord`](#module-ansys.grantami.backend.soap.NamedTargetedSourceRecord) + + + +#### *property* unlinked *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[NamedTargetedSourceRecord](#ansys.grantami.backend.soap.NamedTargetedSourceRecord.NamedTargetedSourceRecord)]* + +Property unlinked is a list of [`NamedTargetedSourceRecord`](#module-ansys.grantami.backend.soap.NamedTargetedSourceRecord) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`NamedTargetedSourceRecord`](#module-ansys.grantami.backend.soap.NamedTargetedSourceRecord) + + + + + +### RecordLinkGroup + + + +### *class* RecordLinkGroup(linked_records=None, name=None, standard_names=None, table_filters=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +A type representing a group of linked records. + +* **Parameters:** + * **linked_records** (list of [`NamedRecord`](#module-ansys.grantami.backend.soap.NamedRecord)) + * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **standard_names** ([*list*](https://docs.python.org/3/library/stdtypes.html#list) *of* [*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **table_filters** ([*list*](https://docs.python.org/3/library/stdtypes.html#list) *of* [*int*](https://docs.python.org/3/library/functions.html#int)) + + + +#### *property* linked_records *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[NamedRecord](#ansys.grantami.backend.soap.NamedRecord.NamedRecord)]* + +Property linked_records is a list of [`NamedRecord`](#module-ansys.grantami.backend.soap.NamedRecord) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`NamedRecord`](#module-ansys.grantami.backend.soap.NamedRecord) + + + +#### *property* name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* standard_names *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str)]* + +Property standard_names is a list of str objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + [list](https://docs.python.org/3/library/stdtypes.html#list) of [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* table_filters *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[int](https://docs.python.org/3/library/functions.html#int)]* + +Property table_filters is a list of int objects. See [`GRANTA_Constants`](#module-ansys.grantami.backend.soap.GRANTA_Constants) for supported values. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + [list](https://docs.python.org/3/library/stdtypes.html#list) of [int](https://docs.python.org/3/library/functions.html#int) + + + + + +### RecordLinkGroupDetail + + + +### *class* RecordLinkGroupDetail(from_table=None, link_group_type=None, name=None, reference=None, reverse_name=None, reverse_reference=None, standard_names=None, to_table=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Detailed information about a Record Link Group in a Granta MI Database. + +* **Parameters:** + * **from_table** ([`TableReference`](#module-ansys.grantami.backend.soap.TableReference)) + * **link_group_type** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **reference** ([`RecordLinkGroupReference`](#module-ansys.grantami.backend.soap.RecordLinkGroupReference)) + * **reverse_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **reverse_reference** ([`RecordLinkGroupReference`](#module-ansys.grantami.backend.soap.RecordLinkGroupReference)) + * **standard_names** ([*list*](https://docs.python.org/3/library/stdtypes.html#list) *of* [*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **to_table** ([`TableReference`](#module-ansys.grantami.backend.soap.TableReference)) + + + +#### add_standard_name(value) + +Appends value to standardNames property on RecordLinkGroupDetail C-object. + +* **Parameters:** + **value** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *property* from_table *: [TableReference](#ansys.grantami.backend.soap.TableReference.TableReference)* + +Property from_table is of type [`TableReference`](#module-ansys.grantami.backend.soap.TableReference). + +* **Return type:** + [`TableReference`](#module-ansys.grantami.backend.soap.TableReference) + + + +#### *property* link_group_type *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property link_group_type is of type str. See [`GRANTA_Constants`](#module-ansys.grantami.backend.soap.GRANTA_Constants) for supported values. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* reference *: [RecordLinkGroupReference](#ansys.grantami.backend.soap.RecordLinkGroupReference.RecordLinkGroupReference)* + +Property reference is of type [`RecordLinkGroupReference`](#module-ansys.grantami.backend.soap.RecordLinkGroupReference). + +* **Return type:** + [`RecordLinkGroupReference`](#module-ansys.grantami.backend.soap.RecordLinkGroupReference) + + + +#### *property* reverse_name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property reverse_name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* reverse_reference *: [RecordLinkGroupReference](#ansys.grantami.backend.soap.RecordLinkGroupReference.RecordLinkGroupReference)* + +Property reverse_reference is of type [`RecordLinkGroupReference`](#module-ansys.grantami.backend.soap.RecordLinkGroupReference). + +* **Return type:** + [`RecordLinkGroupReference`](#module-ansys.grantami.backend.soap.RecordLinkGroupReference) + + + +#### *property* standard_names *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str)]* + +Property standard_names is a list of str objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + [list](https://docs.python.org/3/library/stdtypes.html#list) of [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* to_table *: [TableReference](#ansys.grantami.backend.soap.TableReference.TableReference)* + +Property to_table is of type [`TableReference`](#module-ansys.grantami.backend.soap.TableReference). + +* **Return type:** + [`TableReference`](#module-ansys.grantami.backend.soap.TableReference) + + + + + +### RecordLinkGroupReference + + + +### *class* RecordLinkGroupReference(db_key=None, is_standard_name=None, name=None, partial_table_reference=None, record_link_group_identity=None, record_link_group_type=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +A type that allows identification of a particular record link group in a Granta MI database. +This may be done by specifying the identity of the group, or its name and a partial table reference. + +* **Parameters:** + * **db_key** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **is_standard_name** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **partial_table_reference** ([`PartialTableReference`](#module-ansys.grantami.backend.soap.PartialTableReference)) + * **record_link_group_identity** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **record_link_group_type** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *property* db_key *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property db_key is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* is_standard_name *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property is_standard_name is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* partial_table_reference *: [PartialTableReference](#ansys.grantami.backend.soap.PartialTableReference.PartialTableReference)* + +Property partial_table_reference is of type [`PartialTableReference`](#module-ansys.grantami.backend.soap.PartialTableReference). + +* **Return type:** + [`PartialTableReference`](#module-ansys.grantami.backend.soap.PartialTableReference) + + + +#### *property* record_link_group_identity *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property record_link_group_identity is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* record_link_group_type *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property record_link_group_type is of type str. See [`GRANTA_Constants`](#module-ansys.grantami.backend.soap.GRANTA_Constants) for supported values. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### RecordLinkModifications + + + +### *class* RecordLinkModifications(link_all_combinations=None, link_records=None, unlink_all_records=None, unlink_records=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +A set of modifications to be made to record link groups. + +* **Parameters:** + * **link_all_combinations** (list of [`LinkAllCombinations`](#module-ansys.grantami.backend.soap.LinkAllCombinations)) + * **link_records** (list of [`LinkRecords`](#module-ansys.grantami.backend.soap.LinkRecords)) + * **unlink_all_records** (list of [`UnlinkAllRecords`](#module-ansys.grantami.backend.soap.UnlinkAllRecords)) + * **unlink_records** (list of [`UnlinkRecords`](#module-ansys.grantami.backend.soap.UnlinkRecords)) + + + +#### add_link_all_combinations(\_linkAllCombinations) + +Appends \_linkAllCombinations to linkAllCombinations property on RecordLinkModifications C-object. + +* **Parameters:** + **\_linkAllCombinations** ([`LinkAllCombinations`](#module-ansys.grantami.backend.soap.LinkAllCombinations)) + + + +#### add_link_records(\_linkRecords) + +Appends \_linkRecords to linkRecords property on RecordLinkModifications C-object. + +* **Parameters:** + **\_linkRecords** ([`LinkRecords`](#module-ansys.grantami.backend.soap.LinkRecords)) + + + +#### add_unlink_all_records(\_unlinkAllRecords) + +Appends \_unlinkAllRecords to unlinkAllRecords property on RecordLinkModifications C-object. + +* **Parameters:** + **\_unlinkAllRecords** ([`UnlinkAllRecords`](#module-ansys.grantami.backend.soap.UnlinkAllRecords)) + + + +#### add_unlink_records(\_unlinkRecords) + +Appends \_unlinkRecords to unlinkRecords property on RecordLinkModifications C-object. + +* **Parameters:** + **\_unlinkRecords** ([`UnlinkRecords`](#module-ansys.grantami.backend.soap.UnlinkRecords)) + + + +#### *property* link_all_combinations *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[LinkAllCombinations](#ansys.grantami.backend.soap.LinkAllCombinations.LinkAllCombinations)]* + +Property link_all_combinations is a list of [`LinkAllCombinations`](#module-ansys.grantami.backend.soap.LinkAllCombinations) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`LinkAllCombinations`](#module-ansys.grantami.backend.soap.LinkAllCombinations) + + + +#### *property* link_records *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[LinkRecords](#ansys.grantami.backend.soap.LinkRecords.LinkRecords)]* + +Property link_records is a list of [`LinkRecords`](#module-ansys.grantami.backend.soap.LinkRecords) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`LinkRecords`](#module-ansys.grantami.backend.soap.LinkRecords) + + + +#### *property* unlink_all_records *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[UnlinkAllRecords](#ansys.grantami.backend.soap.UnlinkAllRecords.UnlinkAllRecords)]* + +Property unlink_all_records is a list of [`UnlinkAllRecords`](#module-ansys.grantami.backend.soap.UnlinkAllRecords) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`UnlinkAllRecords`](#module-ansys.grantami.backend.soap.UnlinkAllRecords) + + + +#### *property* unlink_records *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[UnlinkRecords](#ansys.grantami.backend.soap.UnlinkRecords.UnlinkRecords)]* + +Property unlink_records is a list of [`UnlinkRecords`](#module-ansys.grantami.backend.soap.UnlinkRecords) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`UnlinkRecords`](#module-ansys.grantami.backend.soap.UnlinkRecords) + + + + + +### RecordListReference + + + +### *class* RecordListReference(guid=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +A unique identifier for a record list. + +* **Parameters:** + **guid** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *property* guid *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property guid is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +### RecordManipulatorService + + + + + +### *class* RecordManipulatorService(mi_session, retries=0) + +Bases: [`Service`](#ansys.grantami.backend.soap.Service.Service) + +The Record Manipulator service provides a way to move a record whilst preserving its metadata and attribute values. + + + +#### move_record(\_req) + +Reparents a record. Metadata such as creation date will be preserved, along with attribute values. + +* **Parameters:** + **\_req** ([`RecordMoveRequest`](#module-ansys.grantami.backend.soap.RecordMoveRequest) object) +* **Return type:** + [`EmptyRestResponse`](#module-ansys.grantami.backend.soap.EmptyRestResponse) object + + + + + +### RecordMoveRequest + + + +### *class* RecordMoveRequest(db_key=None, new_parent_record_history_guid=None, record_history_guid=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +The details of a MoveRecord operation. +The record to be moved and the new location are both specified with Record History GUIDs. + +* **Parameters:** + * **db_key** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **new_parent_record_history_guid** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **record_history_guid** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *property* db_key *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property db_key is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* new_parent_record_history_guid *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property new_parent_record_history_guid is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* record_history_guid *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property record_history_guid is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### RecordNameSearchRequest + + + +### *class* RecordNameSearchRequest(case_sensitive_names=None, filter=None, populate_guids=None, record_name=None, search_full_names=None, search_short_names=None, table=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +The input for the record_name_search operation. Both the table and record_name are required. + +* **Parameters:** + * **case_sensitive_names** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **filter** ([`RecordFilter`](#module-ansys.grantami.backend.soap.RecordFilter)) + * **populate_guids** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **record_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **search_full_names** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **search_short_names** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **table** ([`TableReference`](#module-ansys.grantami.backend.soap.TableReference)) + + + +#### *property* case_sensitive_names *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property case_sensitive_names is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* filter *: [RecordFilter](#ansys.grantami.backend.soap.RecordFilter.RecordFilter)* + +Property filter is of type [`RecordFilter`](#module-ansys.grantami.backend.soap.RecordFilter). + +* **Return type:** + [`RecordFilter`](#module-ansys.grantami.backend.soap.RecordFilter) + + + +#### *property* populate_guids *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property populate_guids is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* record_name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property record_name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* search_full_names *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property search_full_names is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* search_short_names *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property search_short_names is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* table *: [TableReference](#ansys.grantami.backend.soap.TableReference.TableReference)* + +Property table is of type [`TableReference`](#module-ansys.grantami.backend.soap.TableReference). + +* **Return type:** + [`TableReference`](#module-ansys.grantami.backend.soap.TableReference) + + + + + +### RecordReference + + + +### *class* RecordReference(db_key=None, history_guid=None, identity=None, lookup_value=None, record_guid=None, version=None, record_uid=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +A type that allows identification of a particular record in a Granta MI database. +This is done directly by specifying the Identity or GUID of the record. + +* **Parameters:** + * **db_key** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **history_guid** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **identity** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **lookup_value** ([`LookupValue`](#module-ansys.grantami.backend.soap.LookupValue)) + * **record_guid** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **version** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **record_uid** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *property* db_key *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property db_key is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* history_guid *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property history_guid is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* identity *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property identity is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* lookup_value *: [LookupValue](#ansys.grantami.backend.soap.LookupValue.LookupValue)* + +Property lookup_value is of type [`LookupValue`](#module-ansys.grantami.backend.soap.LookupValue). + +* **Return type:** + [`LookupValue`](#module-ansys.grantami.backend.soap.LookupValue) + + + +#### *property* record_guid *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property record_guid is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* record_uid *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property record_uid is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* version *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property version is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + + + +### RecordSearchCriterion + + + +### *class* RecordSearchCriterion(between_date_times_search_value=None, between_search_value=None, contains_all_search_value=None, contains_any_search_value=None, contains_search_value=None, does_not_contain_search_value=None, does_not_exist_search_value=None, exactly_search_value=None, exists_search_value=None, greater_than_search_value=None, less_than_search_value=None, search_attribute=None, type_=None, equal_to_search_value=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +One criterion that controls results returned from a search. +A search comprises one or more such criteria. + +* **Parameters:** + * **between_date_times_search_value** ([`BetweenDateTimesSearchValue`](#module-ansys.grantami.backend.soap.BetweenDateTimesSearchValue)) + * **between_search_value** ([`BetweenSearchValue`](#module-ansys.grantami.backend.soap.BetweenSearchValue)) + * **contains_all_search_value** ([`ContainsAllSearchValue`](#module-ansys.grantami.backend.soap.ContainsAllSearchValue)) + * **contains_any_search_value** ([`ContainsAnySearchValue`](#module-ansys.grantami.backend.soap.ContainsAnySearchValue)) + * **contains_search_value** ([`ContainsSearchValue`](#module-ansys.grantami.backend.soap.ContainsSearchValue)) + * **does_not_contain_search_value** ([`DoesNotContainSearchValue`](#module-ansys.grantami.backend.soap.DoesNotContainSearchValue)) + * **does_not_exist_search_value** ([`DoesNotExistSearchValue`](#module-ansys.grantami.backend.soap.DoesNotExistSearchValue)) + * **exactly_search_value** ([`ExactlySearchValue`](#module-ansys.grantami.backend.soap.ExactlySearchValue)) + * **exists_search_value** ([`ExistsSearchValue`](#module-ansys.grantami.backend.soap.ExistsSearchValue)) + * **greater_than_search_value** ([`GreaterThanSearchValue`](#module-ansys.grantami.backend.soap.GreaterThanSearchValue)) + * **less_than_search_value** ([`LessThanSearchValue`](#module-ansys.grantami.backend.soap.LessThanSearchValue)) + * **search_attribute** ([`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference)) + * **type** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **equal_to_search_value** ([`EqualToSearchValue`](#module-ansys.grantami.backend.soap.EqualToSearchValue)) + + + +#### *property* between_date_times_search_value *: [BetweenDateTimesSearchValue](#ansys.grantami.backend.soap.BetweenDateTimesSearchValue.BetweenDateTimesSearchValue)* + +Property between_date_times_search_value is of type [`BetweenDateTimesSearchValue`](#module-ansys.grantami.backend.soap.BetweenDateTimesSearchValue). + +* **Return type:** + [`BetweenDateTimesSearchValue`](#module-ansys.grantami.backend.soap.BetweenDateTimesSearchValue) + + + +#### *property* between_search_value *: [BetweenSearchValue](#ansys.grantami.backend.soap.BetweenSearchValue.BetweenSearchValue)* + +Property between_search_value is of type [`BetweenSearchValue`](#module-ansys.grantami.backend.soap.BetweenSearchValue). + +* **Return type:** + [`BetweenSearchValue`](#module-ansys.grantami.backend.soap.BetweenSearchValue) + + + +#### *property* contains_all_search_value *: [ContainsAllSearchValue](#ansys.grantami.backend.soap.ContainsAllSearchValue.ContainsAllSearchValue)* + +Property contains_all_search_value is of type [`ContainsAllSearchValue`](#module-ansys.grantami.backend.soap.ContainsAllSearchValue). + +* **Return type:** + [`ContainsAllSearchValue`](#module-ansys.grantami.backend.soap.ContainsAllSearchValue) + + + +#### *property* contains_any_search_value *: [ContainsAnySearchValue](#ansys.grantami.backend.soap.ContainsAnySearchValue.ContainsAnySearchValue)* + +Property contains_any_search_value is of type [`ContainsAnySearchValue`](#module-ansys.grantami.backend.soap.ContainsAnySearchValue). + +* **Return type:** + [`ContainsAnySearchValue`](#module-ansys.grantami.backend.soap.ContainsAnySearchValue) + + + +#### *property* contains_search_value *: [ContainsSearchValue](#ansys.grantami.backend.soap.ContainsSearchValue.ContainsSearchValue)* + +Property contains_search_value is of type [`ContainsSearchValue`](#module-ansys.grantami.backend.soap.ContainsSearchValue). + +* **Return type:** + [`ContainsSearchValue`](#module-ansys.grantami.backend.soap.ContainsSearchValue) + + + +#### *property* does_not_contain_search_value *: [DoesNotContainSearchValue](#ansys.grantami.backend.soap.DoesNotContainSearchValue.DoesNotContainSearchValue)* + +Property does_not_contain_search_value is of type [`DoesNotContainSearchValue`](#module-ansys.grantami.backend.soap.DoesNotContainSearchValue). + +* **Return type:** + [`DoesNotContainSearchValue`](#module-ansys.grantami.backend.soap.DoesNotContainSearchValue) + + + +#### *property* does_not_exist_search_value *: [DoesNotExistSearchValue](#ansys.grantami.backend.soap.DoesNotExistSearchValue.DoesNotExistSearchValue)* + +Property does_not_exist_search_value is of type [`DoesNotExistSearchValue`](#module-ansys.grantami.backend.soap.DoesNotExistSearchValue). + +* **Return type:** + [`DoesNotExistSearchValue`](#module-ansys.grantami.backend.soap.DoesNotExistSearchValue) + + + +#### *property* equal_to_search_value *: [EqualToSearchValue](#ansys.grantami.backend.soap.EqualToSearchValue.EqualToSearchValue)* + +Property equal_to_search_value is of type [`EqualToSearchValue`](#module-ansys.grantami.backend.soap.EqualToSearchValue). + +* **Return type:** + [`EqualToSearchValue`](#module-ansys.grantami.backend.soap.EqualToSearchValue) + + + +#### *property* exactly_search_value *: [ExactlySearchValue](#ansys.grantami.backend.soap.ExactlySearchValue.ExactlySearchValue)* + +Property exactly_search_value is of type [`ExactlySearchValue`](#module-ansys.grantami.backend.soap.ExactlySearchValue). + +* **Return type:** + [`ExactlySearchValue`](#module-ansys.grantami.backend.soap.ExactlySearchValue) + + + +#### *property* exists_search_value *: [ExistsSearchValue](#ansys.grantami.backend.soap.ExistsSearchValue.ExistsSearchValue)* + +Property exists_search_value is of type [`ExistsSearchValue`](#module-ansys.grantami.backend.soap.ExistsSearchValue). + +* **Return type:** + [`ExistsSearchValue`](#module-ansys.grantami.backend.soap.ExistsSearchValue) + + + +#### *property* greater_than_search_value *: [GreaterThanSearchValue](#ansys.grantami.backend.soap.GreaterThanSearchValue.GreaterThanSearchValue)* + +Property greater_than_search_value is of type [`GreaterThanSearchValue`](#module-ansys.grantami.backend.soap.GreaterThanSearchValue). + +* **Return type:** + [`GreaterThanSearchValue`](#module-ansys.grantami.backend.soap.GreaterThanSearchValue) + + + +#### *property* less_than_search_value *: [LessThanSearchValue](#ansys.grantami.backend.soap.LessThanSearchValue.LessThanSearchValue)* + +Property less_than_search_value is of type [`LessThanSearchValue`](#module-ansys.grantami.backend.soap.LessThanSearchValue). + +* **Return type:** + [`LessThanSearchValue`](#module-ansys.grantami.backend.soap.LessThanSearchValue) + + + +#### *property* search_attribute *: [AttributeReference](#ansys.grantami.backend.soap.AttributeReference.AttributeReference)* + +Property search_attribute is of type [`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference). + +* **Return type:** + [`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference) + + + +#### *property* type_ *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property type_ is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### RecordVersionState + + + +### *class* RecordVersionState(record_reference=None, version_state=None, has_released_revision=None, has_superseded_revision=None, has_withdrawn_revision=None, created_revision=None, modified_revision=None, released_revision=None, superseded_revision=None, withdrawn_revision=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +The version status of a particular Record in a Granta MI database. + +* **Parameters:** + * **record_reference** ([`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference)) + * **version_state** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **has_released_revision** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **has_superseded_revision** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **has_withdrawn_revision** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **created_revision** ([`DatabaseRevision`](#module-ansys.grantami.backend.soap.DatabaseRevision)) + * **modified_revision** ([`DatabaseRevision`](#module-ansys.grantami.backend.soap.DatabaseRevision)) + * **released_revision** ([`DatabaseRevision`](#module-ansys.grantami.backend.soap.DatabaseRevision)) + * **superseded_revision** ([`DatabaseRevision`](#module-ansys.grantami.backend.soap.DatabaseRevision)) + * **withdrawn_revision** ([`DatabaseRevision`](#module-ansys.grantami.backend.soap.DatabaseRevision)) + + + +#### *class* VersionState + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + + + +#### Released *= 0* + + + +#### Superseded *= 1* + + + +#### Unknown *= 5* + + + +#### Unreleased *= 3* + + + +#### Unversioned *= 4* + + + +#### Withdrawn *= 2* + + + +#### *property* created_revision *: [DatabaseRevision](#ansys.grantami.backend.soap.DatabaseRevision.DatabaseRevision)* + +Property created_revision is of type [`DatabaseRevision`](#module-ansys.grantami.backend.soap.DatabaseRevision). + +* **Return type:** + [`DatabaseRevision`](#module-ansys.grantami.backend.soap.DatabaseRevision) + + + +#### *property* has_released_revision *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property has_released_revision is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* has_superseded_revision *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property has_superseded_revision is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* has_withdrawn_revision *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property has_withdrawn_revision is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* modified_revision *: [DatabaseRevision](#ansys.grantami.backend.soap.DatabaseRevision.DatabaseRevision)* + +Property modified_revision is of type [`DatabaseRevision`](#module-ansys.grantami.backend.soap.DatabaseRevision). + +* **Return type:** + [`DatabaseRevision`](#module-ansys.grantami.backend.soap.DatabaseRevision) + + + +#### *property* record_reference *: [RecordReference](#ansys.grantami.backend.soap.RecordReference.RecordReference)* + +Property record_reference is of type [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference). + +* **Return type:** + [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) + + + +#### *property* released_revision *: [DatabaseRevision](#ansys.grantami.backend.soap.DatabaseRevision.DatabaseRevision)* + +Property released_revision is of type [`DatabaseRevision`](#module-ansys.grantami.backend.soap.DatabaseRevision). + +* **Return type:** + [`DatabaseRevision`](#module-ansys.grantami.backend.soap.DatabaseRevision) + + + +#### *property* superseded_revision *: [DatabaseRevision](#ansys.grantami.backend.soap.DatabaseRevision.DatabaseRevision)* + +Property superseded_revision is of type [`DatabaseRevision`](#module-ansys.grantami.backend.soap.DatabaseRevision). + +* **Return type:** + [`DatabaseRevision`](#module-ansys.grantami.backend.soap.DatabaseRevision) + + + +#### *property* version_state *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property version_state is of type int. See [`RecordVersionState.VersionState`](#ansys.grantami.backend.soap.RecordVersionState.RecordVersionState.VersionState) for supported values. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* withdrawn_revision *: [DatabaseRevision](#ansys.grantami.backend.soap.DatabaseRevision.DatabaseRevision)* + +Property withdrawn_revision is of type [`DatabaseRevision`](#module-ansys.grantami.backend.soap.DatabaseRevision). + +* **Return type:** + [`DatabaseRevision`](#module-ansys.grantami.backend.soap.DatabaseRevision) + + + + + +### RecordWithAttributeAddresses + + + +### *class* RecordWithAttributeAddresses(attribute_addresses=None, record_reference=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +A [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) with a list of attributes and their upload +URL addresses. + +* **Parameters:** + * **attribute_addresses** (list of [`AttributeAddress`](#module-ansys.grantami.backend.soap.AttributeAddress)) + * **record_reference** ([`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference)) + + + +#### add_attribute_address(\_attributeAddress) + +Appends \_attributeAddress to attributeAddresses property on RecordWithAttributeAddresses C-object. + +* **Parameters:** + **\_attributeAddress** ([`AttributeAddress`](#module-ansys.grantami.backend.soap.AttributeAddress)) + + + +#### *property* attribute_addresses *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[AttributeAddress](#ansys.grantami.backend.soap.AttributeAddress.AttributeAddress)]* + +Property attribute_addresses is a list of [`AttributeAddress`](#module-ansys.grantami.backend.soap.AttributeAddress) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`AttributeAddress`](#module-ansys.grantami.backend.soap.AttributeAddress) + + + +#### *property* record_reference *: [RecordReference](#ansys.grantami.backend.soap.RecordReference.RecordReference)* + +Property record_reference is of type [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference). + +* **Return type:** + [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) + + + + + +### ResolveReferencesRequest + + + +### *class* ResolveReferencesRequest(entities=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Input for the resolve_references operation. + +* **Parameters:** + **entities** (list of [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference)) + + + +#### add_entitie(\_recordReference) + +Appends \_recordReference to entities property on ResolveReferencesRequest C-object. + +* **Parameters:** + **\_recordReference** ([`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference)) + + + +#### *property* entities *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[RecordReference](#ansys.grantami.backend.soap.RecordReference.RecordReference)]* + +Property entities is a list of [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) + + + + + +### ResolveReferencesResponse + + + +### *class* ResolveReferencesResponse(c_obj) + +Bases: [`Response`](#ansys.grantami.backend.soap.Response.Response) + +Output from the resolve_references operation. + +* **Parameters:** + **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a ResolveReferencesResponse object. + + + +#### *property* entity_resolutions *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[MIEntityResolution](#ansys.grantami.backend.soap.MIEntityResolution.MIEntityResolution)]* + +Property entity_resolutions is a list of [`MIEntityResolution`](#module-ansys.grantami.backend.soap.MIEntityResolution) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`MIEntityResolution`](#module-ansys.grantami.backend.soap.MIEntityResolution) + + + + + +### Response + + + +### *class* Response(c_obj) + +Bases: [`ABC`](https://docs.python.org/3/library/abc.html#abc.ABC) + +Base class for response types in Granta MI. + +* **Parameters:** + **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a response object. + + + +#### *property* service_layer_response *: [ServiceLayerResponse](#ansys.grantami.backend.soap.ServiceLayerResponse.ServiceLayerResponse)* + +The raw response object received from the Granta MI Service Layer. + +* **Return type:** + [`ServiceLayerResponse`](#ansys.grantami.backend.soap.ServiceLayerResponse.ServiceLayerResponse) + + + + + +### RevisionInfo + + + +### *class* RevisionInfo(created=None, modified=None, update_count=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Describes when an entity in a Granta MI database was created and updated. + +* **Parameters:** + * **created** ([`DatabaseRevision`](#module-ansys.grantami.backend.soap.DatabaseRevision)) + * **modified** ([`DatabaseRevision`](#module-ansys.grantami.backend.soap.DatabaseRevision)) + * **update_count** ([*int*](https://docs.python.org/3/library/functions.html#int)) + + + +#### *property* created *: [DatabaseRevision](#ansys.grantami.backend.soap.DatabaseRevision.DatabaseRevision)* + +Property created is of type [`DatabaseRevision`](#module-ansys.grantami.backend.soap.DatabaseRevision). + +* **Return type:** + [`DatabaseRevision`](#module-ansys.grantami.backend.soap.DatabaseRevision) + + + +#### *property* modified *: [DatabaseRevision](#ansys.grantami.backend.soap.DatabaseRevision.DatabaseRevision)* + +Property modified is of type [`DatabaseRevision`](#module-ansys.grantami.backend.soap.DatabaseRevision). + +* **Return type:** + [`DatabaseRevision`](#module-ansys.grantami.backend.soap.DatabaseRevision) + + + +#### *property* update_count *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property update_count is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + + + +### RichText + + + +### *class* RichText(type_=None, value=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Contains a piece of text and its type. + +* **Parameters:** + * **type** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **value** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *class* Type + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + + + +#### Markdown *= 1* + + + +#### Plain *= 0* + + + +#### *property* type_ *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property type_ is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* value *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property value is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### SearchResult + + + +### *class* SearchResult(long_name=None, ranking=None, record_reference=None, short_name=None, color=None, record_type=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +An extension of [`NamedRecord`](#module-ansys.grantami.backend.soap.NamedRecord) with a ranking. The higher the +ranking the better the match to your search criteria. + +* **Parameters:** + * **long_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **ranking** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **record_reference** ([`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference)) + * **short_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **color** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **record_type** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *property* color *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property color is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* long_name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property long_name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* ranking *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property ranking is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* record_reference *: [RecordReference](#ansys.grantami.backend.soap.RecordReference.RecordReference)* + +Property record_reference is of type [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference). + +* **Return type:** + [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) + + + +#### *property* record_type *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property record_type is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* short_name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property short_name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +### SearchService + + + + + +### *class* SearchService(mi_session, retries=0) + +Bases: [`Service`](#ansys.grantami.backend.soap.Service.Service) + +The Search service finds Records, within Granta MI Databases, matching specified criteria. + + + +#### criteria_search(\_req) + +Searches for records matching attribute-based criteria. + +* **Parameters:** + **\_req** ([`CriteriaSearch`](#module-ansys.grantami.backend.soap.CriteriaSearch) object) +* **Return type:** + [`SimpleTextSearchResponse`](#module-ansys.grantami.backend.soap.SimpleTextSearchResponse) object + + + +#### record_name_search(\_req) + +Searches for Records with a given exact Record name. + +* **Parameters:** + **\_req** ([`RecordNameSearchRequest`](#module-ansys.grantami.backend.soap.RecordNameSearchRequest) object) +* **Return type:** + [`SimpleTextSearchResponse`](#module-ansys.grantami.backend.soap.SimpleTextSearchResponse) object + + + +#### simple_text_search(\_req) + +Searches for records matching simple text criteria. + +* **Parameters:** + **\_req** ([`SimpleTextSearch`](#module-ansys.grantami.backend.soap.SimpleTextSearch) object) +* **Return type:** + [`SimpleTextSearchResponse`](#module-ansys.grantami.backend.soap.SimpleTextSearchResponse) object + + + + + +### Series + + + +### *class* Series(xy_points=None, constraints=None, decoration=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Type for functional data which includes X-Y data and any constraints. + +* **Parameters:** + * **xy_points** ([`XYData`](#module-ansys.grantami.backend.soap.XYData)) + * **constraints** ([`Constraints`](#module-ansys.grantami.backend.soap.Constraints)) + * **decoration** ([*int*](https://docs.python.org/3/library/functions.html#int)) + + + +#### *property* constraints *: [Constraints](#ansys.grantami.backend.soap.Constraints.Constraints)* + +Property constraints is of type [`Constraints`](#module-ansys.grantami.backend.soap.Constraints). + +* **Return type:** + [`Constraints`](#module-ansys.grantami.backend.soap.Constraints) + + + +#### *property* decoration *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property decoration is of type int. See [`GRANTA_Constants`](#module-ansys.grantami.backend.soap.GRANTA_Constants) for supported values. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* xy_points *: [XYData](#ansys.grantami.backend.soap.XYData.XYData)* + +Property xy_points is of type [`XYData`](#module-ansys.grantami.backend.soap.XYData). + +* **Return type:** + [`XYData`](#module-ansys.grantami.backend.soap.XYData) + + + + + +### Service + + + +### *class* Service(mi_session, retries=0) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Base class for Granta MI Service objects. For internal use only. + + + + + +### ServiceLayerResponse + + + +### *class* ServiceLayerResponse(error_message=None, request_message=None, response_code=None, response_message=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +The HTTP response information from Granta MI Service Layer. Useful for debugging bad requests. + +* **Parameters:** + * **error_message** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **request_message** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **response_code** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **response_message** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *property* error_message *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property error_message is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* request_message *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property request_message is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* response_code *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property response_code is of type int. This is an HTTP status code. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* response_message *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property response_message is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### SetRecordAttributesRequest + + + +### *class* SetRecordAttributesRequest(import_error_mode=None, import_records=None, notes=None, release_notes=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +The input to a set record attributes operation. Includes an array of records to import. + +* **Parameters:** + * **import_error_mode** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **import_records** (list of [`ImportRecord`](#module-ansys.grantami.backend.soap.ImportRecord)) + * **notes** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **release_notes** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### add_import_record(\_importRecord) + +Appends \_importRecord to importRecords property on SetRecordAttributesRequest C-object. + +* **Parameters:** + **\_importRecord** ([`ImportRecord`](#module-ansys.grantami.backend.soap.ImportRecord)) + + + +#### *property* import_error_mode *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property import_error_mode is of type str. See [`GRANTA_Constants`](#module-ansys.grantami.backend.soap.GRANTA_Constants) for supported values. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* import_records *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[ImportRecord](#ansys.grantami.backend.soap.ImportRecord.ImportRecord)]* + +Property import_records is a list of [`ImportRecord`](#module-ansys.grantami.backend.soap.ImportRecord) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`ImportRecord`](#module-ansys.grantami.backend.soap.ImportRecord) + + + +#### *property* notes *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property notes is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* release_notes *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property release_notes is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### SetRecordAttributesResponse + + + +### *class* SetRecordAttributesResponse(c_obj) + +Bases: [`Response`](#ansys.grantami.backend.soap.Response.Response) + +Response for set_record_attributes operation. Includes an array of import records. + +* **Parameters:** + **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a SetRecordAttributesResponse object. + + + +#### *property* records_imported *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[NamedRecord](#ansys.grantami.backend.soap.NamedRecord.NamedRecord)]* + +Property records_imported is a list of [`NamedRecord`](#module-ansys.grantami.backend.soap.NamedRecord) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`NamedRecord`](#module-ansys.grantami.backend.soap.NamedRecord) + + + + + +### ShortTextDataType + + + +### *class* ShortTextDataType(is_applicable=None, value=None, \_is_owner=True) + +Bases: [`IDataValue`](#ansys.grantami.backend.soap.IDataValue.IDataValue) + +Type for values of short text (string) data. + +* **Parameters:** + * **is_applicable** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **value** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *property* is_applicable *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property is_applicable is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* value *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property value is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### SimpleTextSearch + + + +### *class* SimpleTextSearch(db_key=None, populate_guids=None, record_filter=None, restrict_to_tables=None, search_filter=None, search_mode=None, search_value=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +The input to a simple_text_search operation. +Both the db_key, and search value are required. + +* **Parameters:** + * **db_key** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **populate_guids** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **record_filter** ([`RecordFilter`](#module-ansys.grantami.backend.soap.RecordFilter)) + * **restrict_to_tables** (list of [`PartialTableReference`](#module-ansys.grantami.backend.soap.PartialTableReference)) + * **search_filter** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **search_mode** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **search_value** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### add_restrict_to_table(\_partialTableReference) + +Appends \_partialTableReference to restrictToTables property on SimpleTextSearch C-object. + +* **Parameters:** + **\_partialTableReference** ([`PartialTableReference`](#module-ansys.grantami.backend.soap.PartialTableReference)) + + + +#### *property* db_key *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property db_key is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* populate_guids *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property populate_guids is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* record_filter *: [RecordFilter](#ansys.grantami.backend.soap.RecordFilter.RecordFilter)* + +Property record_filter is of type [`RecordFilter`](#module-ansys.grantami.backend.soap.RecordFilter). + +* **Return type:** + [`RecordFilter`](#module-ansys.grantami.backend.soap.RecordFilter) + + + +#### *property* restrict_to_tables *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[PartialTableReference](#ansys.grantami.backend.soap.PartialTableReference.PartialTableReference)]* + +Property restrict_to_tables is a list of [`PartialTableReference`](#module-ansys.grantami.backend.soap.PartialTableReference) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`PartialTableReference`](#module-ansys.grantami.backend.soap.PartialTableReference) + + + +#### *property* search_filter *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property search_filter is of type int. See [`GRANTA_Constants`](#module-ansys.grantami.backend.soap.GRANTA_Constants) for supported values. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* search_mode *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property search_mode is of type int. See [`GRANTA_Constants`](#module-ansys.grantami.backend.soap.GRANTA_Constants) for supported values. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* search_value *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property search_value is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### SimpleTextSearchResponse + + + +### *class* SimpleTextSearchResponse(c_obj) + +Bases: [`Response`](#ansys.grantami.backend.soap.Response.Response) + +The output to the simple_text_search operation. +Contains a list of records returned by the search and a +[`ServiceLayerResponse`](#module-ansys.grantami.backend.soap.ServiceLayerResponse) object. + +* **Parameters:** + **c_obj** ([*ctypes._Pointer*](https://docs.python.org/3/library/ctypes.html#ctypes._Pointer)) – Pointer to a SimpleTextSearchResponse object. + + + +#### add_search_result(\_searchResult) + +Appends \_searchResult to searchResults property on SimpleTextSearchResponse C-object. + +* **Parameters:** + **\_searchResult** ([`SearchResult`](#module-ansys.grantami.backend.soap.SearchResult)) + + + +#### *property* search_results *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[SearchResult](#ansys.grantami.backend.soap.SearchResult.SearchResult)]* + +Property search_results is a list of [`SearchResult`](#module-ansys.grantami.backend.soap.SearchResult) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`SearchResult`](#module-ansys.grantami.backend.soap.SearchResult) + + + + + +### SourceRecord + + + +### *class* SourceRecord(record=None, record_link_groups=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +A type that contains a record reference and associated record link groups. + +* **Parameters:** + * **record** ([`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference)) + * **record_link_groups** ([`LinkedRecordsDataType`](#module-ansys.grantami.backend.soap.LinkedRecordsDataType)) + + + +#### *property* record *: [RecordReference](#ansys.grantami.backend.soap.RecordReference.RecordReference)* + +Property record is of type [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference). + +* **Return type:** + [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) + + + +#### *property* record_link_groups *: [LinkedRecordsDataType](#ansys.grantami.backend.soap.LinkedRecordsDataType.LinkedRecordsDataType)* + +Property record_link_groups is of type [`LinkedRecordsDataType`](#module-ansys.grantami.backend.soap.LinkedRecordsDataType). + +* **Return type:** + [`LinkedRecordsDataType`](#module-ansys.grantami.backend.soap.LinkedRecordsDataType) + + + + + +### SourceUnitConversionSet + + + +### *class* SourceUnitConversionSet(conversions=None, source_symbol=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +All the unit conversions available for a specified unit. + +* **Parameters:** + * **conversions** (list of [`UnitConversionTarget`](#module-ansys.grantami.backend.soap.UnitConversionTarget)) + * **source_symbol** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *property* conversions *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[UnitConversionTarget](#ansys.grantami.backend.soap.UnitConversionTarget.UnitConversionTarget)]* + +Property conversions is a list of [`UnitConversionTarget`](#module-ansys.grantami.backend.soap.UnitConversionTarget) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`UnitConversionTarget`](#module-ansys.grantami.backend.soap.UnitConversionTarget) + + + +#### *property* source_symbol *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property source_symbol is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### SpecificUnitConversionContext + + + +### *class* SpecificUnitConversionContext(absolute_units=None, currency=None, unit_symbol=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Type defining how values with convertible units should be represented. + +* **Parameters:** + * **absolute_units** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **currency** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **unit_symbol** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *property* absolute_units *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property absolute_units is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* currency *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property currency is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* unit_symbol *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property unit_symbol is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### SubsetDetail + + + +### *class* SubsetDetail(name=None, subset=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Detailed meta-information about a subset in a Granta MI database. + +* **Parameters:** + * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **subset** ([`SubsetReference`](#module-ansys.grantami.backend.soap.SubsetReference)) + + + +#### *property* name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* subset *: [SubsetReference](#ansys.grantami.backend.soap.SubsetReference.SubsetReference)* + +Property subset is of type [`SubsetReference`](#module-ansys.grantami.backend.soap.SubsetReference). + +* **Return type:** + [`SubsetReference`](#module-ansys.grantami.backend.soap.SubsetReference) + + + + + +### SubsetReference + + + +### *class* SubsetReference(db_key=None, name=None, partial_table_reference=None, subset_identity=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +A type that identifies a particular subset in a Granta MI database. This may be done by specifying +the identity of the subset, or by specifying a name that will match (only) the subset along with +the table to which the subset belongs. + +* **Parameters:** + * **db_key** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **partial_table_reference** ([`PartialTableReference`](#module-ansys.grantami.backend.soap.PartialTableReference)) + * **subset_identity** ([*int*](https://docs.python.org/3/library/functions.html#int)) + + + +#### *property* db_key *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property db_key is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* partial_table_reference *: [PartialTableReference](#ansys.grantami.backend.soap.PartialTableReference.PartialTableReference)* + +Property partial_table_reference is of type [`PartialTableReference`](#module-ansys.grantami.backend.soap.PartialTableReference). When used for input, this only needs to be specified if you are specifying a name rather than an id. + +* **Return type:** + [`PartialTableReference`](#module-ansys.grantami.backend.soap.PartialTableReference) + + + +#### *property* subset_identity *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property subset_identity is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + + + +### SubsetsDataType + + + +### *class* SubsetsDataType(data_version_no=None, import_node_name=None, named_subsets=None, node_name=None, type_string=None, \_is_owner=True) + +Bases: [`IDataValue`](#ansys.grantami.backend.soap.IDataValue.IDataValue) + +Contains a list of subsets. +Contains a list of subsets (returned by DataExport for the pseudo attribute for Subsets). + +* **Parameters:** + * **data_version_no** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **import_node_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **named_subsets** (list of [`NamedSubset`](#module-ansys.grantami.backend.soap.NamedSubset)) + * **node_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **type_string** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *property* data_version_no *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property data_version_no is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* import_node_name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property import_node_name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* named_subsets *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[NamedSubset](#ansys.grantami.backend.soap.NamedSubset.NamedSubset)]* + +Property named_subsets is a list of [`NamedSubset`](#module-ansys.grantami.backend.soap.NamedSubset) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`NamedSubset`](#module-ansys.grantami.backend.soap.NamedSubset) + + + +#### *property* node_name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property node_name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* type_string *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property type_string is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### TableDetail + + + +### *class* TableDetail(attribute_references=None, default_layout=None, default_subset=None, standard_attribute_references=None, table_filters=None, table_reference=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Detailed meta-information about a table in a Granta MI database. + +* **Parameters:** + * **attribute_references** (list of [`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference)) + * **default_layout** ([`NamedLayout`](#module-ansys.grantami.backend.soap.NamedLayout)) + * **default_subset** ([`SubsetDetail`](#module-ansys.grantami.backend.soap.SubsetDetail)) + * **standard_attribute_references** (list of [`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference)) + * **table_filters** ([*list*](https://docs.python.org/3/library/stdtypes.html#list) *of* [*int*](https://docs.python.org/3/library/functions.html#int)) + * **table_reference** ([`TableReference`](#module-ansys.grantami.backend.soap.TableReference)) + + + +#### add_attribute_references(\_attributeReference) + +Appends \_attributeReference to attributeReferences property on TableDetail C-object. + +* **Parameters:** + **\_attributeReference** ([`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference)) + + + +#### *property* attribute_references *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[AttributeReference](#ansys.grantami.backend.soap.AttributeReference.AttributeReference)]* + +Property attribute_references is a list of [`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference) + + + +#### *property* default_layout *: [NamedLayout](#ansys.grantami.backend.soap.NamedLayout.NamedLayout)* + +Property default_layout is of type [`NamedLayout`](#module-ansys.grantami.backend.soap.NamedLayout). + +* **Return type:** + [`NamedLayout`](#module-ansys.grantami.backend.soap.NamedLayout) + + + +#### *property* default_subset *: [SubsetDetail](#ansys.grantami.backend.soap.SubsetDetail.SubsetDetail)* + +Property default_subset is of type [`SubsetDetail`](#module-ansys.grantami.backend.soap.SubsetDetail). + +* **Return type:** + [`SubsetDetail`](#module-ansys.grantami.backend.soap.SubsetDetail) + + + +#### *property* standard_attribute_references *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[AttributeReference](#ansys.grantami.backend.soap.AttributeReference.AttributeReference)]* + +Property standard_attribute_references is a list of [`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`AttributeReference`](#module-ansys.grantami.backend.soap.AttributeReference) + + + +#### *property* table_filters *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[int](https://docs.python.org/3/library/functions.html#int)]* + +Property table_filters is a list of int objects. See [`GRANTA_Constants`](#module-ansys.grantami.backend.soap.GRANTA_Constants) for supported values. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + [list](https://docs.python.org/3/library/stdtypes.html#list) of [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* table_reference *: [TableReference](#ansys.grantami.backend.soap.TableReference.TableReference)* + +Property table_reference is of type [`TableReference`](#module-ansys.grantami.backend.soap.TableReference). + +* **Return type:** + [`TableReference`](#module-ansys.grantami.backend.soap.TableReference) + + + + + +### TableReference + + + +### *class* TableReference(db_key=None, guid=None, id_=None, name=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +A type that allows identification of a particular table in a particular Granta MI database. +The db_key is required in addition to at least one of either: id, guid, or name. + +* **Parameters:** + * **db_key** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **guid** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **id** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *property* db_key *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property db_key is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* guid *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property guid is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* id_ *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property id_ is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### TabularColumnDetail + + + +### *class* TabularColumnDetail(data_type=None, database_unit=None, discrete_values=None, name=None, revision_info=None, type_=None, identity=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Describes a Tabular Column, defined in a Tabular Attribute. +This details how the schema describes the Column, and does not provide information about the +contents of the Column in any particular Datum. + +* **Parameters:** + * **data_type** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **database_unit** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **discrete_values** ([*list*](https://docs.python.org/3/library/stdtypes.html#list) *of* [*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **revision_info** ([`RevisionInfo`](#module-ansys.grantami.backend.soap.RevisionInfo)) + * **type** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **identity** ([*int*](https://docs.python.org/3/library/functions.html#int)) + + + +#### *property* data_type *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property data_type is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* database_unit *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property database_unit is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* discrete_values *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str)]* + +Property discrete_values is a list of str objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + [list](https://docs.python.org/3/library/stdtypes.html#list) of [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* identity *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property identity is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* revision_info *: [RevisionInfo](#ansys.grantami.backend.soap.RevisionInfo.RevisionInfo)* + +Property revision_info is of type [`RevisionInfo`](#module-ansys.grantami.backend.soap.RevisionInfo). + +* **Return type:** + [`RevisionInfo`](#module-ansys.grantami.backend.soap.RevisionInfo) + + + +#### *property* type_ *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property type_ is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + + + +### TabularDataCell + + + +### *class* TabularDataCell(data=None, data_type=None, date_data_value=None, discrete_data_value=None, file_data_value=None, hyperlink_data_value=None, integer_data_value=None, list_data_value=None, logical_data_value=None, long_text_data_value=None, picture_data_value=None, point_data_value=None, range_data_value=None, short_text_data_value=None, empty_data_value=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +A Cell within an exported item of Tabular Data. The data type property can be used to determine what +type of data the cell contains. + +* **Parameters:** + * **data** ([`IDataValue`](#module-ansys.grantami.backend.soap.IDataValue)) + * **data_type** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **date_data_value** ([`DateDataType`](#module-ansys.grantami.backend.soap.DateDataType)) + * **discrete_data_value** ([`DiscreteDataType`](#module-ansys.grantami.backend.soap.DiscreteDataType)) + * **file_data_value** ([`FileDataType`](#module-ansys.grantami.backend.soap.FileDataType)) + * **hyperlink_data_value** ([`HyperlinkDataType`](#module-ansys.grantami.backend.soap.HyperlinkDataType)) + * **integer_data_value** ([`IntegerDataType`](#module-ansys.grantami.backend.soap.IntegerDataType)) + * **list_data_value** ([`ListDataType`](#module-ansys.grantami.backend.soap.ListDataType)) + * **logical_data_value** ([`LogicalDataType`](#module-ansys.grantami.backend.soap.LogicalDataType)) + * **long_text_data_value** ([`LongTextDataType`](#module-ansys.grantami.backend.soap.LongTextDataType)) + * **picture_data_value** ([`PictureDataType`](#module-ansys.grantami.backend.soap.PictureDataType)) + * **point_data_value** ([`PointDataType`](#module-ansys.grantami.backend.soap.PointDataType)) + * **range_data_value** ([`RangeDataType`](#module-ansys.grantami.backend.soap.RangeDataType)) + * **short_text_data_value** ([`ShortTextDataType`](#module-ansys.grantami.backend.soap.ShortTextDataType)) + * **empty_data_value** ([`EmptyDataType`](#module-ansys.grantami.backend.soap.EmptyDataType)) + + + +#### *property* data *: [IDataValue](#ansys.grantami.backend.soap.IDataValue.IDataValue)* + +Property data is of type [`IDataValue`](#module-ansys.grantami.backend.soap.IDataValue). + +* **Return type:** + [`IDataValue`](#module-ansys.grantami.backend.soap.IDataValue) + + + +#### *property* data_type *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property data_type is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* date_data_value *: [DateDataType](#ansys.grantami.backend.soap.DateDataType.DateDataType)* + +Property date_data_value is of type [`DateDataType`](#module-ansys.grantami.backend.soap.DateDataType). + +* **Return type:** + [`DateDataType`](#module-ansys.grantami.backend.soap.DateDataType) + + + +#### *property* discrete_data_value *: [DiscreteDataType](#ansys.grantami.backend.soap.DiscreteDataType.DiscreteDataType)* + +Property discrete_data_value is of type [`DiscreteDataType`](#module-ansys.grantami.backend.soap.DiscreteDataType). + +* **Return type:** + [`DiscreteDataType`](#module-ansys.grantami.backend.soap.DiscreteDataType) + + + +#### *property* empty_data_value *: [EmptyDataType](#ansys.grantami.backend.soap.EmptyDataType.EmptyDataType)* + +Property empty_data_value is of type [`EmptyDataType`](#module-ansys.grantami.backend.soap.EmptyDataType). + +* **Return type:** + [`EmptyDataType`](#module-ansys.grantami.backend.soap.EmptyDataType) + + + +#### *property* file_data_value *: [FileDataType](#ansys.grantami.backend.soap.FileDataType.FileDataType)* + +Property file_data_value is of type [`FileDataType`](#module-ansys.grantami.backend.soap.FileDataType). + +* **Return type:** + [`FileDataType`](#module-ansys.grantami.backend.soap.FileDataType) + + + +#### *property* hyperlink_data_value *: [HyperlinkDataType](#ansys.grantami.backend.soap.HyperlinkDataType.HyperlinkDataType)* + +Property hyperlink_data_value is of type [`HyperlinkDataType`](#module-ansys.grantami.backend.soap.HyperlinkDataType). + +* **Return type:** + [`HyperlinkDataType`](#module-ansys.grantami.backend.soap.HyperlinkDataType) + + + +#### *property* integer_data_value *: [IntegerDataType](#ansys.grantami.backend.soap.IntegerDataType.IntegerDataType)* + +Property integer_data_value is of type [`IntegerDataType`](#module-ansys.grantami.backend.soap.IntegerDataType). + +* **Return type:** + [`IntegerDataType`](#module-ansys.grantami.backend.soap.IntegerDataType) + + + +#### *property* list_data_value *: [ListDataType](#ansys.grantami.backend.soap.ListDataType.ListDataType)* + +Property list_data_value is of type [`ListDataType`](#module-ansys.grantami.backend.soap.ListDataType). + +* **Return type:** + [`ListDataType`](#module-ansys.grantami.backend.soap.ListDataType) + + + +#### *property* logical_data_value *: [LogicalDataType](#ansys.grantami.backend.soap.LogicalDataType.LogicalDataType)* + +Property logical_data_value is of type [`LogicalDataType`](#module-ansys.grantami.backend.soap.LogicalDataType). + +* **Return type:** + [`LogicalDataType`](#module-ansys.grantami.backend.soap.LogicalDataType) + + + +#### *property* long_text_data_value *: [LongTextDataType](#ansys.grantami.backend.soap.LongTextDataType.LongTextDataType)* + +Property long_text_data_value is of type [`LongTextDataType`](#module-ansys.grantami.backend.soap.LongTextDataType). + +* **Return type:** + [`LongTextDataType`](#module-ansys.grantami.backend.soap.LongTextDataType) + + + +#### *property* picture_data_value *: [PictureDataType](#ansys.grantami.backend.soap.PictureDataType.PictureDataType)* + +Property picture_data_value is of type [`PictureDataType`](#module-ansys.grantami.backend.soap.PictureDataType). + +* **Return type:** + [`PictureDataType`](#module-ansys.grantami.backend.soap.PictureDataType) + + + +#### *property* point_data_value *: [PointDataType](#ansys.grantami.backend.soap.PointDataType.PointDataType)* + +Property point_data_value is of type [`PointDataType`](#module-ansys.grantami.backend.soap.PointDataType). + +* **Return type:** + [`PointDataType`](#module-ansys.grantami.backend.soap.PointDataType) + + + +#### *property* range_data_value *: [RangeDataType](#ansys.grantami.backend.soap.RangeDataType.RangeDataType)* + +Property range_data_value is of type [`RangeDataType`](#module-ansys.grantami.backend.soap.RangeDataType). + +* **Return type:** + [`RangeDataType`](#module-ansys.grantami.backend.soap.RangeDataType) + + + +#### *property* short_text_data_value *: [ShortTextDataType](#ansys.grantami.backend.soap.ShortTextDataType.ShortTextDataType)* + +Property short_text_data_value is of type [`ShortTextDataType`](#module-ansys.grantami.backend.soap.ShortTextDataType). + +* **Return type:** + [`ShortTextDataType`](#module-ansys.grantami.backend.soap.ShortTextDataType) + + + + + +### TabularDataImportCell + + + +### *class* TabularDataImportCell(column_name=None, data_type=None, date_data_value=None, discrete_data_value=None, empty_data_value=None, file_data_value=None, hyperlink_data_value=None, integer_data_value=None, logical_data_value=None, long_text_data_value=None, picture_data_value=None, point_data_value=None, range_data_value=None, short_text_data_value=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +A Cell within an item of Tabular Data for import. In contrast to +[`TabularDataCell`](#module-ansys.grantami.backend.soap.TabularDataCell) that relates to existing data, +TabularDataImportCell includes the column name and that column name must be provided. + +* **Parameters:** + * **column_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **data_type** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **date_data_value** ([`DateDataType`](#module-ansys.grantami.backend.soap.DateDataType)) + * **discrete_data_value** ([`DiscreteDataType`](#module-ansys.grantami.backend.soap.DiscreteDataType)) + * **empty_data_value** ([`EmptyDataType`](#module-ansys.grantami.backend.soap.EmptyDataType)) + * **file_data_value** ([`FileDataType`](#module-ansys.grantami.backend.soap.FileDataType)) + * **hyperlink_data_value** ([`HyperlinkDataType`](#module-ansys.grantami.backend.soap.HyperlinkDataType)) + * **integer_data_value** ([`IntegerDataType`](#module-ansys.grantami.backend.soap.IntegerDataType)) + * **logical_data_value** ([`LogicalDataType`](#module-ansys.grantami.backend.soap.LogicalDataType)) + * **long_text_data_value** ([`LongTextDataType`](#module-ansys.grantami.backend.soap.LongTextDataType)) + * **picture_data_value** ([`PictureDataType`](#module-ansys.grantami.backend.soap.PictureDataType)) + * **point_data_value** ([`PointDataType`](#module-ansys.grantami.backend.soap.PointDataType)) + * **range_data_value** ([`RangeDataType`](#module-ansys.grantami.backend.soap.RangeDataType)) + * **short_text_data_value** ([`ShortTextDataType`](#module-ansys.grantami.backend.soap.ShortTextDataType)) + + + +#### *property* column_name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property column_name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* data_type *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property data_type is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* date_data_value *: [DateDataType](#ansys.grantami.backend.soap.DateDataType.DateDataType)* + +Property date_data_value is of type [`DateDataType`](#module-ansys.grantami.backend.soap.DateDataType). + +* **Return type:** + [`DateDataType`](#module-ansys.grantami.backend.soap.DateDataType) + + + +#### *property* discrete_data_value *: [DiscreteDataType](#ansys.grantami.backend.soap.DiscreteDataType.DiscreteDataType)* + +Property discrete_data_value is of type [`DiscreteDataType`](#module-ansys.grantami.backend.soap.DiscreteDataType). + +* **Return type:** + [`DiscreteDataType`](#module-ansys.grantami.backend.soap.DiscreteDataType) + + + +#### *property* empty_data_value *: [EmptyDataType](#ansys.grantami.backend.soap.EmptyDataType.EmptyDataType)* + +Property empty_data_value is of type [`EmptyDataType`](#module-ansys.grantami.backend.soap.EmptyDataType). + +* **Return type:** + [`EmptyDataType`](#module-ansys.grantami.backend.soap.EmptyDataType) + + + +#### *property* file_data_value *: [FileDataType](#ansys.grantami.backend.soap.FileDataType.FileDataType)* + +Property file_data_value is of type [`FileDataType`](#module-ansys.grantami.backend.soap.FileDataType). + +* **Return type:** + [`FileDataType`](#module-ansys.grantami.backend.soap.FileDataType) + + + +#### *property* hyperlink_data_value *: [HyperlinkDataType](#ansys.grantami.backend.soap.HyperlinkDataType.HyperlinkDataType)* + +Property hyperlink_data_value is of type [`HyperlinkDataType`](#module-ansys.grantami.backend.soap.HyperlinkDataType). + +* **Return type:** + [`HyperlinkDataType`](#module-ansys.grantami.backend.soap.HyperlinkDataType) + + + +#### *property* integer_data_value *: [IntegerDataType](#ansys.grantami.backend.soap.IntegerDataType.IntegerDataType)* + +Property integer_data_value is of type [`IntegerDataType`](#module-ansys.grantami.backend.soap.IntegerDataType). + +* **Return type:** + [`IntegerDataType`](#module-ansys.grantami.backend.soap.IntegerDataType) + + + +#### *property* logical_data_value *: [LogicalDataType](#ansys.grantami.backend.soap.LogicalDataType.LogicalDataType)* + +Property logical_data_value is of type [`LogicalDataType`](#module-ansys.grantami.backend.soap.LogicalDataType). + +* **Return type:** + [`LogicalDataType`](#module-ansys.grantami.backend.soap.LogicalDataType) + + + +#### *property* long_text_data_value *: [LongTextDataType](#ansys.grantami.backend.soap.LongTextDataType.LongTextDataType)* + +Property long_text_data_value is of type [`LongTextDataType`](#module-ansys.grantami.backend.soap.LongTextDataType). + +* **Return type:** + [`LongTextDataType`](#module-ansys.grantami.backend.soap.LongTextDataType) + + + +#### *property* picture_data_value *: [PictureDataType](#ansys.grantami.backend.soap.PictureDataType.PictureDataType)* + +Property picture_data_value is of type [`PictureDataType`](#module-ansys.grantami.backend.soap.PictureDataType). + +* **Return type:** + [`PictureDataType`](#module-ansys.grantami.backend.soap.PictureDataType) + + + +#### *property* point_data_value *: [PointDataType](#ansys.grantami.backend.soap.PointDataType.PointDataType)* + +Property point_data_value is of type [`PointDataType`](#module-ansys.grantami.backend.soap.PointDataType). + +* **Return type:** + [`PointDataType`](#module-ansys.grantami.backend.soap.PointDataType) + + + +#### *property* range_data_value *: [RangeDataType](#ansys.grantami.backend.soap.RangeDataType.RangeDataType)* + +Property range_data_value is of type [`RangeDataType`](#module-ansys.grantami.backend.soap.RangeDataType). + +* **Return type:** + [`RangeDataType`](#module-ansys.grantami.backend.soap.RangeDataType) + + + +#### *property* short_text_data_value *: [ShortTextDataType](#ansys.grantami.backend.soap.ShortTextDataType.ShortTextDataType)* + +Property short_text_data_value is of type [`ShortTextDataType`](#module-ansys.grantami.backend.soap.ShortTextDataType). + +* **Return type:** + [`ShortTextDataType`](#module-ansys.grantami.backend.soap.ShortTextDataType) + + + + + +### TabularDataImportRow + + + +### *class* TabularDataImportRow(cells=None, linking_value=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +A Row within an item of Tabular Data, this type is specifically for creating a new tabular datum, or +for overwriting existing data in an import operation. + +* **Parameters:** + * **cells** (list of [`TabularDataImportCell`](#module-ansys.grantami.backend.soap.TabularDataImportCell)) + * **linking_value** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### add_cell_ref(\_tabularDataImportCell) + +Appends \_tabularDataImportCell to cells property on TabularDataImportRow C-object. + +* **Parameters:** + **\_tabularDataImportCell** ([`TabularDataImportCell`](#module-ansys.grantami.backend.soap.TabularDataImportCell)) + + + +#### *property* cells *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[TabularDataImportCell](#ansys.grantami.backend.soap.TabularDataImportCell.TabularDataImportCell)]* + +Property cells is a list of [`TabularDataImportCell`](#module-ansys.grantami.backend.soap.TabularDataImportCell) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`TabularDataImportCell`](#module-ansys.grantami.backend.soap.TabularDataImportCell) + + + +#### *property* linking_value *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property linking_value is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### TabularDataImportType + + + +### *class* TabularDataImportType(import_rows=None, is_applicable=None, update_rows=None, \_is_owner=True) + +Bases: [`IDataValue`](#ansys.grantami.backend.soap.IDataValue.IDataValue) + +Type representing an item of Tabular Data, this type is specifically for import operations. + +* **Parameters:** + * **import_rows** (list of [`TabularDataImportRow`](#module-ansys.grantami.backend.soap.TabularDataImportRow)) + * **is_applicable** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **update_rows** (list of [`TabularDataUpdateRow`](#module-ansys.grantami.backend.soap.TabularDataUpdateRow)) + + + +#### add_import_row_refs(\_tabularDataImportRow) + +Appends \_tabularDataImportRow to importRows property on TabularDataImportType C-object. + +* **Parameters:** + **\_tabularDataImportRow** ([`TabularDataImportRow`](#module-ansys.grantami.backend.soap.TabularDataImportRow)) + + + +#### add_update_row_refs(\_tabularDataUpdateRow) + +Appends \_tabularDataUpdateRow to updateRows property on TabularDataImportType C-object. + +* **Parameters:** + **\_tabularDataUpdateRow** ([`TabularDataUpdateRow`](#module-ansys.grantami.backend.soap.TabularDataUpdateRow)) + + + +#### *property* import_rows *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[TabularDataImportRow](#ansys.grantami.backend.soap.TabularDataImportRow.TabularDataImportRow)]* + +Property import_rows is a list of [`TabularDataImportRow`](#module-ansys.grantami.backend.soap.TabularDataImportRow) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`TabularDataImportRow`](#module-ansys.grantami.backend.soap.TabularDataImportRow) + + + +#### *property* is_applicable *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property is_applicable is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* update_rows *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[TabularDataUpdateRow](#ansys.grantami.backend.soap.TabularDataUpdateRow.TabularDataUpdateRow)]* + +Property update_rows is a list of [`TabularDataUpdateRow`](#module-ansys.grantami.backend.soap.TabularDataUpdateRow) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`TabularDataUpdateRow`](#module-ansys.grantami.backend.soap.TabularDataUpdateRow) + + + + + +### TabularDataRow + + + +### *class* TabularDataRow(id_=None, cells=None, linked_records=None, linking_value=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +A Row within an item of exported Tabular Data. + +* **Parameters:** + * **id** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **cells** (list of [`TabularDataCell`](#module-ansys.grantami.backend.soap.TabularDataCell)) + * **linked_records** (list of [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference)) + * **linking_value** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *property* cells *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[TabularDataCell](#ansys.grantami.backend.soap.TabularDataCell.TabularDataCell)]* + +Property cells is a list of [`TabularDataCell`](#module-ansys.grantami.backend.soap.TabularDataCell) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`TabularDataCell`](#module-ansys.grantami.backend.soap.TabularDataCell) + + + +#### *property* id_ *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property id_ is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* linked_records *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[RecordReference](#ansys.grantami.backend.soap.RecordReference.RecordReference)]* + +Property linked_records is a list of [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) + + + +#### *property* linking_value *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property linking_value is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### TabularDataType + + + +### *class* TabularDataType(columns=None, is_applicable=None, tabular_data_rows=None, summary_columns=None, summary_row=None, \_is_owner=True) + +Bases: [`IDataValue`](#ansys.grantami.backend.soap.IDataValue.IDataValue) + +Type representing an item of exported Tabular Data, including metadata such as Column definitions. +This type is not used for importing Tabular Data; instead, use +[`TabularDataImportType`](#module-ansys.grantami.backend.soap.TabularDataImportType). + +* **Parameters:** + * **columns** (list of [`TabularDataTypeColumn`](#module-ansys.grantami.backend.soap.TabularDataTypeColumn)) + * **is_applicable** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **tabular_data_rows** (list of [`TabularDataRow`](#module-ansys.grantami.backend.soap.TabularDataRow)) + * **summary_columns** (list of [`TabularDataTypeSummaryColumn`](#module-ansys.grantami.backend.soap.TabularDataTypeSummaryColumn)) + * **summary_row** ([`TabularDataRow`](#module-ansys.grantami.backend.soap.TabularDataRow)) + + + +#### add_column_ref(\_tabularDataTypeColumn) + +Appends \_tabularDataTypeColumn to columns property on TabularDataType C-object. + +* **Parameters:** + **\_tabularDataTypeColumn** ([`TabularDataTypeColumn`](#module-ansys.grantami.backend.soap.TabularDataTypeColumn)) + + + +#### *property* columns *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[TabularDataTypeColumn](#ansys.grantami.backend.soap.TabularDataTypeColumn.TabularDataTypeColumn)]* + +Property columns is a list of [`TabularDataTypeColumn`](#module-ansys.grantami.backend.soap.TabularDataTypeColumn) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`TabularDataTypeColumn`](#module-ansys.grantami.backend.soap.TabularDataTypeColumn) + + + +#### *property* is_applicable *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property is_applicable is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* summary_columns *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[TabularDataTypeSummaryColumn](#ansys.grantami.backend.soap.TabularDataTypeSummaryColumn.TabularDataTypeSummaryColumn)]* + +Property summary_columns is a list of [`TabularDataTypeSummaryColumn`](#module-ansys.grantami.backend.soap.TabularDataTypeSummaryColumn) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`TabularDataTypeSummaryColumn`](#module-ansys.grantami.backend.soap.TabularDataTypeSummaryColumn) + + + +#### *property* summary_row *: [TabularDataRow](#ansys.grantami.backend.soap.TabularDataRow.TabularDataRow)* + +Property summary_row is of type [`TabularDataRow`](#module-ansys.grantami.backend.soap.TabularDataRow). + +* **Return type:** + [`TabularDataRow`](#module-ansys.grantami.backend.soap.TabularDataRow) + + + +#### *property* tabular_data_rows *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[TabularDataRow](#ansys.grantami.backend.soap.TabularDataRow.TabularDataRow)]* + +Property tabular_data_rows is a list of [`TabularDataRow`](#module-ansys.grantami.backend.soap.TabularDataRow) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`TabularDataRow`](#module-ansys.grantami.backend.soap.TabularDataRow) + + + + + +### TabularDataTypeColumn + + + +### *class* TabularDataTypeColumn(column_type=None, data_type=None, database_unit=None, identity=None, name=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Information about a column in a specific tabular attribute. + +* **Parameters:** + * **column_type** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **data_type** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **database_unit** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **identity** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *class* ColType + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + + + +#### Local *= 0* + + + +#### TargetAttribute *= 1* + + + +#### TargetRecord *= 2* + + + +#### TargetTabularColumn *= 3* + + + +#### Unavailable *= 4* + + + +#### *property* column_type *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property column_type is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* data_type *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property data_type is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* database_unit *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property database_unit is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* identity *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property identity is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### TabularDataTypeSummaryColumn + + + +### *class* TabularDataTypeSummaryColumn(column_type=None, data_type=None, database_unit=None, identity=None, name=None, summary_rollup_cell_type=None, summary_rollup_type=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Information about a summary column in a specific tabular attribute. + +* **Parameters:** + * **column_type** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **data_type** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **database_unit** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **identity** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **summary_rollup_cell_type** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **summary_rollup_type** ([*int*](https://docs.python.org/3/library/functions.html#int)) + + + +#### *class* TabularRollupType + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + + + +#### Chart *= 10* + + + +#### CoefficientOfVariation *= 9* + + + +#### Count *= 6* + + + +#### CountDistinct *= 7* + + + +#### List *= 0* + + + +#### ListDistinct *= 8* + + + +#### Max *= 1* + + + +#### Mean *= 3* + + + +#### Min *= 2* + + + +#### StandardDeviation *= 4* + + + +#### Sum *= 5* + + + +#### *property* column_type *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property column_type is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* data_type *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property data_type is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* database_unit *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property database_unit is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* identity *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property identity is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* summary_rollup_cell_type *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property summary_rollup_cell_type is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* summary_rollup_type *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property summary_rollup_type is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + + + +### TabularDataUpdateRow + + + +### *class* TabularDataUpdateRow(id_=None, cells=None, linking_value=None, update_type=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +A Row within an item of Tabular Data, this type is specifically for updating existing tabular data. +The `.update_type` property must be used to specify the type of row operation, `Update`, +`Append` and `Delete` are supported. For delete operations, only the `id_` property needs to +be provided. For all other operations, at least one cell must be provided. + +* **Parameters:** + * **id** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **cells** (list of [`TabularDataImportCell`](#module-ansys.grantami.backend.soap.TabularDataImportCell)) + * **linking_value** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **update_type** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *class* ChangeType + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + + + +#### Append *= 1* + + + +#### Delete *= 3* + + + +#### InsertBefore *= 0* + + + +#### Update *= 2* + + + +#### add_cell_ref(\_tabularDataImportCell) + +Appends \_tabularDataImportCell to cells property on TabularDataUpdateRow C-object. + +* **Parameters:** + **\_tabularDataImportCell** ([`TabularDataImportCell`](#module-ansys.grantami.backend.soap.TabularDataImportCell)) + + + +#### *property* cells *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[TabularDataImportCell](#ansys.grantami.backend.soap.TabularDataImportCell.TabularDataImportCell)]* + +Property cells is a list of [`TabularDataImportCell`](#module-ansys.grantami.backend.soap.TabularDataImportCell) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`TabularDataImportCell`](#module-ansys.grantami.backend.soap.TabularDataImportCell) + + + +#### *property* id_ *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property id_ is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* linking_value *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property linking_value is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* update_type *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property update_type is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### TabularDetail + + + +### *class* TabularDetail(columns=None, linked_table=None, linking_attribute=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Information about a specific tabular attribute. If the tabular attribute has a linking attribute, +you can specify the linking attribute and the linked table containing that attribute. + +* **Parameters:** + * **columns** (list of [`TabularColumnDetail`](#module-ansys.grantami.backend.soap.TabularColumnDetail)) + * **linked_table** ([`TableReference`](#module-ansys.grantami.backend.soap.TableReference)) + * **linking_attribute** ([`NamedAttribute`](#module-ansys.grantami.backend.soap.NamedAttribute)) + + + +#### *property* columns *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[TabularColumnDetail](#ansys.grantami.backend.soap.TabularColumnDetail.TabularColumnDetail)]* + +Property columns is a list of [`TabularColumnDetail`](#module-ansys.grantami.backend.soap.TabularColumnDetail) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`TabularColumnDetail`](#module-ansys.grantami.backend.soap.TabularColumnDetail) + + + +#### *property* linked_table *: [TableReference](#ansys.grantami.backend.soap.TableReference.TableReference)* + +Property linked_table is of type [`TableReference`](#module-ansys.grantami.backend.soap.TableReference). + +* **Return type:** + [`TableReference`](#module-ansys.grantami.backend.soap.TableReference) + + + +#### *property* linking_attribute *: [NamedAttribute](#ansys.grantami.backend.soap.NamedAttribute.NamedAttribute)* + +Property linking_attribute is of type [`NamedAttribute`](#module-ansys.grantami.backend.soap.NamedAttribute). + +* **Return type:** + [`NamedAttribute`](#module-ansys.grantami.backend.soap.NamedAttribute) + + + + + +### TargetedSourceRecord + + + +### *class* TargetedSourceRecord(source_record=None, target_records=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +A type for unlinking records, contains a source +[`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) and an array of target +[`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) objects. + +* **Parameters:** + * **source_record** ([`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference)) + * **target_records** (list of [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference)) + + + +#### add_target_record(\_recordReference) + +Appends \_recordReference to targetRecords property on TargetedSourceRecord C-object. + +* **Parameters:** + **\_recordReference** ([`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference)) + + + +#### *property* source_record *: [RecordReference](#ansys.grantami.backend.soap.RecordReference.RecordReference)* + +Property source_record is of type [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference). + +* **Return type:** + [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) + + + +#### *property* target_records *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[RecordReference](#ansys.grantami.backend.soap.RecordReference.RecordReference)]* + +Property target_records is a list of [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) + + + + + +### TrailingZeroInformation + + + +### *class* TrailingZeroInformation(entered_unit=None, entered_value=None, significant_figures=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Type representing the numerical value as originally entered, including original unit and significant +figures. + +* **Parameters:** + * **entered_unit** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **entered_value** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **significant_figures** ([*int*](https://docs.python.org/3/library/functions.html#int)) + + + +#### *property* entered_unit *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property entered_unit is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* entered_value *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property entered_value is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* significant_figures *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property significant_figures is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + + + +### TreeRecord + + + +### *class* TreeRecord(children=None, color=None, long_name=None, parent_record_history_identity=None, record_reference=None, short_name=None, type_=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Type representing a single record in a Granta MI database, along with information about its position +in the node-tree. + +* **Parameters:** + * **children** (list of [`TreeRecord`](#module-ansys.grantami.backend.soap.TreeRecord)) + * **color** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **long_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **parent_record_history_identity** ([*int*](https://docs.python.org/3/library/functions.html#int)) + * **record_reference** ([`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference)) + * **short_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **type** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### add_children(\_treeRecord) + +Appends \_treeRecord to children property on TreeRecord C-object. + +* **Parameters:** + **\_treeRecord** ([`TreeRecord`](#module-ansys.grantami.backend.soap.TreeRecord)) + + + +#### *property* children *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[TreeRecord](#ansys.grantami.backend.soap.TreeRecord.TreeRecord)]* + +Property children is a list of [`TreeRecord`](#module-ansys.grantami.backend.soap.TreeRecord) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`TreeRecord`](#module-ansys.grantami.backend.soap.TreeRecord) + + + +#### *property* color *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property color is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* long_name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property long_name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* parent_record_history_identity *: [int](https://docs.python.org/3/library/functions.html#int)* + +Property parent_record_history_identity is of type int. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* record_reference *: [RecordReference](#ansys.grantami.backend.soap.RecordReference.RecordReference)* + +Property record_reference is of type [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference). + +* **Return type:** + [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) + + + +#### *property* short_name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property short_name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* type_ *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property type_ is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### UnitConversion + + + +### *class* UnitConversion(factor=None, offset=None, source_symbol=None, target_symbol=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Information about how to convert from a specified source unit to a target unit. + +* **Parameters:** + * **factor** ([*float*](https://docs.python.org/3/library/functions.html#float)) + * **offset** ([*float*](https://docs.python.org/3/library/functions.html#float)) + * **source_symbol** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **target_symbol** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *property* factor *: [float](https://docs.python.org/3/library/functions.html#float)* + +Property factor is of type float. + +* **Return type:** + [float](https://docs.python.org/3/library/functions.html#float) + + + +#### *property* offset *: [float](https://docs.python.org/3/library/functions.html#float)* + +Property offset is of type float. + +* **Return type:** + [float](https://docs.python.org/3/library/functions.html#float) + + + +#### *property* source_symbol *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property source_symbol is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* target_symbol *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property target_symbol is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### UnitConversionContext + + + +### *class* UnitConversionContext(absolute_units=None, currency=None, unit_system=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Type defining how values with units should be represented. + +* **Parameters:** + * **absolute_units** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **currency** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **unit_system** ([`UnitSystemDetail`](#module-ansys.grantami.backend.soap.UnitSystemDetail)) + + + +#### *property* absolute_units *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property absolute_units is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* currency *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property currency is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* unit_system *: [UnitSystemDetail](#ansys.grantami.backend.soap.UnitSystemDetail.UnitSystemDetail)* + +Property unit_system is of type [`UnitSystemDetail`](#module-ansys.grantami.backend.soap.UnitSystemDetail). + +* **Return type:** + [`UnitSystemDetail`](#module-ansys.grantami.backend.soap.UnitSystemDetail) + + + + + +### UnitConversionContextConversionSet + + + +### *class* UnitConversionContextConversionSet(unit_conversion_context=None, unit_conversions=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +All the unit conversions available with a specified unit conversion context. + +* **Parameters:** + * **unit_conversion_context** ([`UnitConversionContext`](#module-ansys.grantami.backend.soap.UnitConversionContext)) + * **unit_conversions** (list of [`UnitConversion`](#module-ansys.grantami.backend.soap.UnitConversion)) + + + +#### add_unit_conversion(\_unitConversion) + +Appends \_unitConversion to unitConversions property on UnitConversionContextConversionSet C-object. + +* **Parameters:** + **\_unitConversion** ([`UnitConversion`](#module-ansys.grantami.backend.soap.UnitConversion)) + + + +#### *property* unit_conversion_context *: [UnitConversionContext](#ansys.grantami.backend.soap.UnitConversionContext.UnitConversionContext)* + +Property unit_conversion_context is of type [`UnitConversionContext`](#module-ansys.grantami.backend.soap.UnitConversionContext). + +* **Return type:** + [`UnitConversionContext`](#module-ansys.grantami.backend.soap.UnitConversionContext) + + + +#### *property* unit_conversions *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[UnitConversion](#ansys.grantami.backend.soap.UnitConversion.UnitConversion)]* + +Property unit_conversions is a list of [`UnitConversion`](#module-ansys.grantami.backend.soap.UnitConversion) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`UnitConversion`](#module-ansys.grantami.backend.soap.UnitConversion) + + + + + +### UnitConversionTarget + + + +### *class* UnitConversionTarget(factor=None, offset=None, target_symbol=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +Information about how to convert to a target unit. When this type is used directly, the source unit +is assumed to be already known from a different type. To obtain a value in the target units, +multiply the source value by the factor, and then add the offset. + +* **Parameters:** + * **factor** ([*float*](https://docs.python.org/3/library/functions.html#float)) + * **offset** ([*float*](https://docs.python.org/3/library/functions.html#float)) + * **target_symbol** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *property* factor *: [float](https://docs.python.org/3/library/functions.html#float)* + +Property factor is of type float. + +* **Return type:** + [float](https://docs.python.org/3/library/functions.html#float) + + + +#### *property* offset *: [float](https://docs.python.org/3/library/functions.html#float)* + +Property offset is of type float. + +* **Return type:** + [float](https://docs.python.org/3/library/functions.html#float) + + + +#### *property* target_symbol *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property target_symbol is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### UnitInformation + + + +### *class* UnitInformation(unit_name=None, unit_symbol=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +A type used to give details of units for quantities. +When this type is output by the Service Layer, both name and symbol will be populated. When passed +as input to the Service Layer, only name or symbol need to be populated; if both are populated, +only the symbol is used. + +* **Parameters:** + * **unit_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **unit_symbol** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *property* unit_name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property unit_name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* unit_symbol *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property unit_symbol is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### UnitSymbol + + + +### *class* UnitSymbol(has_currency=None, symbol=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +A unit symbol known to MI, and whether it references a currency. + +* **Parameters:** + * **has_currency** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **symbol** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *property* has_currency *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property has_currency is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* symbol *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property symbol is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### UnitSystemDetail + + + +### *class* UnitSystemDetail(display_names=None, name=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +A unit system, along with any localised names, if defined. + +* **Parameters:** + * **display_names** (list of [`DisplayName`](#module-ansys.grantami.backend.soap.DisplayName)) + * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *property* display_names *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[DisplayName](#ansys.grantami.backend.soap.DisplayName.DisplayName)]* + +Property display_names is a list of [`DisplayName`](#module-ansys.grantami.backend.soap.DisplayName) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`DisplayName`](#module-ansys.grantami.backend.soap.DisplayName) + + + +#### *property* name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### UnittedParameterValue + + + +### *class* UnittedParameterValue(parameter_with_values=None, unit_symbol=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +A Parameter, along with a single value of that Parameter, optionally with units. + +* **Parameters:** + * **parameter_with_values** ([`ParameterReferenceAndValue`](#module-ansys.grantami.backend.soap.ParameterReferenceAndValue)) + * **unit_symbol** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### *property* parameter_with_values *: [ParameterReferenceAndValue](#ansys.grantami.backend.soap.ParameterReferenceAndValue.ParameterReferenceAndValue)* + +Property parameter_with_values is of type [`ParameterReferenceAndValue`](#module-ansys.grantami.backend.soap.ParameterReferenceAndValue). + +* **Return type:** + [`ParameterReferenceAndValue`](#module-ansys.grantami.backend.soap.ParameterReferenceAndValue) + + + +#### *property* unit_symbol *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property unit_symbol is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### UnlinkAllRecords + + + +### *class* UnlinkAllRecords(node_name=None, source_records=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +For each given source record, remove all links in the Record Link Group. + +* **Parameters:** + * **node_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **source_records** (list of [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference)) + + + +#### add_source_record(\_recordReference) + +Appends \_recordReference to sourceRecords property on UnlinkAllRecords C-object. + +* **Parameters:** + **\_recordReference** ([`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference)) + + + +#### *property* node_name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property node_name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* source_records *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[RecordReference](#ansys.grantami.backend.soap.RecordReference.RecordReference)]* + +Property source_records is a list of [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`RecordReference`](#module-ansys.grantami.backend.soap.RecordReference) + + + + + +### UnlinkRecords + + + +### *class* UnlinkRecords(node_name=None, source_records=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +For each given source record, remove links to the target records specified for that source record. +Silently skip any links that do not exist. + +* **Parameters:** + * **node_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **source_records** (list of [`TargetedSourceRecord`](#module-ansys.grantami.backend.soap.TargetedSourceRecord)) + + + +#### add_source_record(\_targetedSourceRecord) + +Appends \_targetedSourceRecord to sourceRecords property on UnlinkRecords C-object. + +* **Parameters:** + **\_targetedSourceRecord** ([`TargetedSourceRecord`](#module-ansys.grantami.backend.soap.TargetedSourceRecord)) + + + +#### *property* node_name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property node_name is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* source_records *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[TargetedSourceRecord](#ansys.grantami.backend.soap.TargetedSourceRecord.TargetedSourceRecord)]* + +Property source_records is a list of [`TargetedSourceRecord`](#module-ansys.grantami.backend.soap.TargetedSourceRecord) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`TargetedSourceRecord`](#module-ansys.grantami.backend.soap.TargetedSourceRecord) + + + + + +### XYData + + + +### *class* XYData(xy_points=None, xy_ranges=None, type_=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +A collection of y-axis values for a graph where the y-axis values are either point or range values. + +* **Parameters:** + * **xy_points** (list of [`XYPoint`](#module-ansys.grantami.backend.soap.XYPoint)) + * **xy_ranges** (list of [`XYRange`](#module-ansys.grantami.backend.soap.XYRange)) + * **type** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + + + +#### add_xy_point(\_XYPoint) + +Appends \_XYPoint to XYPoints property on XYData C-object. + +* **Parameters:** + **\_XYPoint** ([`XYPoint`](#module-ansys.grantami.backend.soap.XYPoint)) + + + +#### add_xy_range(\_XYRange) + +Appends \_XYRange to XYRanges property on XYData C-object. + +* **Parameters:** + **\_XYRange** ([`XYRange`](#module-ansys.grantami.backend.soap.XYRange)) + + + +#### *property* type_ *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property type_ is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* xy_points *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[XYPoint](#ansys.grantami.backend.soap.XYPoint.XYPoint)]* + +Property xy_points is a list of [`XYPoint`](#module-ansys.grantami.backend.soap.XYPoint) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`XYPoint`](#module-ansys.grantami.backend.soap.XYPoint) + + + +#### *property* xy_ranges *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[XYRange](#ansys.grantami.backend.soap.XYRange.XYRange)]* + +Property xy_ranges is a list of [`XYRange`](#module-ansys.grantami.backend.soap.XYRange) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`XYRange`](#module-ansys.grantami.backend.soap.XYRange) + + + + + +### XYDiscrete + + + +### *class* XYDiscrete(y=None, is_estimated=None, parameter_value=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +An x-y datum where the y-axis value is a discrete value. + +* **Parameters:** + * **y** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) + * **is_estimated** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **parameter_value** ([`ParameterValue`](#module-ansys.grantami.backend.soap.ParameterValue)) + + + +#### *property* is_estimated *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property is_estimated is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* parameter_value *: [ParameterValue](#ansys.grantami.backend.soap.ParameterValue.ParameterValue)* + +Property parameter_value is of type [`ParameterValue`](#module-ansys.grantami.backend.soap.ParameterValue). + +* **Return type:** + [`ParameterValue`](#module-ansys.grantami.backend.soap.ParameterValue) + + + +#### *property* y *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Property y is of type str. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +### XYDiscreteData + + + +### *class* XYDiscreteData(xy_discretes=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +A collection of y-axis values for a graph where the y-axis values are discrete values. + +* **Parameters:** + **xy_discretes** (list of [`XYDiscrete`](#module-ansys.grantami.backend.soap.XYDiscrete)) + + + +#### add_xy_discrete(\_XYDiscrete) + +Appends \_XYDiscrete to XYDiscretes property on XYDiscreteData C-object. + +* **Parameters:** + **\_XYDiscrete** ([`XYDiscrete`](#module-ansys.grantami.backend.soap.XYDiscrete)) + + + +#### *property* xy_discretes *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[XYDiscrete](#ansys.grantami.backend.soap.XYDiscrete.XYDiscrete)]* + +Property xy_discretes is a list of [`XYDiscrete`](#module-ansys.grantami.backend.soap.XYDiscrete) objects. + +#### WARNING +Do not attempt to edit or append to the returned value. + +* **Return type:** + list of [`XYDiscrete`](#module-ansys.grantami.backend.soap.XYDiscrete) + + + + + +### XYPoint + + + +### *class* XYPoint(y=None, is_estimated=None, parameter_value=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +An x-y datum where the y-axis value is a point. + +* **Parameters:** + * **y** ([*float*](https://docs.python.org/3/library/functions.html#float)) + * **is_estimated** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **parameter_value** ([`ParameterValue`](#module-ansys.grantami.backend.soap.ParameterValue)) + + + +#### *property* is_estimated *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property is_estimated is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* parameter_value *: [ParameterValue](#ansys.grantami.backend.soap.ParameterValue.ParameterValue)* + +Property parameter_value is of type [`ParameterValue`](#module-ansys.grantami.backend.soap.ParameterValue). + +* **Return type:** + [`ParameterValue`](#module-ansys.grantami.backend.soap.ParameterValue) + + + +#### *property* y *: [float](https://docs.python.org/3/library/functions.html#float)* + +Property y is of type float. + +* **Return type:** + [float](https://docs.python.org/3/library/functions.html#float) + + + + + +### XYRange + + + +### *class* XYRange(is_estimated=None, lower_y=None, parameter_value=None, upper_y=None, \_is_owner=True) + +Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + +An x-y datum where the y-axis value is a range. + +* **Parameters:** + * **is_estimated** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + * **lower_y** ([*float*](https://docs.python.org/3/library/functions.html#float)) + * **parameter_value** ([`ParameterValue`](#module-ansys.grantami.backend.soap.ParameterValue)) + * **upper_y** ([*float*](https://docs.python.org/3/library/functions.html#float)) + + + +#### *property* is_estimated *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Property is_estimated is of type bool. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* lower_y *: [float](https://docs.python.org/3/library/functions.html#float)* + +Property lower_y is of type float. + +* **Return type:** + [float](https://docs.python.org/3/library/functions.html#float) + + + +#### *property* parameter_value *: [ParameterValue](#ansys.grantami.backend.soap.ParameterValue.ParameterValue)* + +Property parameter_value is of type [`ParameterValue`](#module-ansys.grantami.backend.soap.ParameterValue). + +* **Return type:** + [`ParameterValue`](#module-ansys.grantami.backend.soap.ParameterValue) + + + +#### *property* upper_y *: [float](https://docs.python.org/3/library/functions.html#float)* + +Property upper_y is of type float. + +* **Return type:** + [float](https://docs.python.org/3/library/functions.html#float) diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/getting_started/conda.md b/2026R1/scripting-toolkit-dev-portal-26-r1/getting_started/conda.md index edf853915a..8b91639c33 100644 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/getting_started/conda.md +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/getting_started/conda.md @@ -6,19 +6,20 @@ ## Server software requirements -To use MI Scripting Toolkit 4.2, your Granta MI server must be running 2023 R1 or later, which includes Service Layer -Interface 22/04. +To use MI Scripting Toolkit 5.0, your Granta MI server must be running 2024 R2 or later, which includes Service Layer +Interface 23/10. ## Client software requirements -MI Scripting Toolkit 4.2 for conda requires conda 4.12.0 or later. +MI Scripting Toolkit 5.0 for conda requires conda 4.12.0 or later. #### NOTE MI Scripting Toolkit is only supported when used with the miniforge-provided version of the conda package manager. The use of other conda editions (for example miniconda or Anaconda) may work, but their use is unsupported. At a minimum, you -must enable the `conda-forge` package source with the following command before following the installationinstructions on this page: +must enable the `conda-forge` package source with the following command before following the installation +instructions on this page: ```default conda config --add channels conda-forge @@ -27,18 +28,18 @@ conda config --set channel_priority strict MI Scripting Toolkit is supported on the following platforms: -| Platform | Python 3.10 | Python 3.11 | Python 3.12 | Python 3.13 | -|--------------------------------------------------------|---------------|---------------|---------------|---------------| -| Ubuntu 22.04 [1](#id6) | Certified | Certified | Certified | Certified | -| Ubuntu 24.04 [2](#id7) | Supported | Supported | Supported | Supported | -| SUSE Linux Enterprise
15 SP4+ [3](#id8) | Supported | Supported | Supported | Supported | -| RHEL 8.8+, 9.3+ [4](#id9) | Supported | Supported | Supported | Supported | -| Rocky Linux
8.9+, 9.3+ [5](#id10) | Supported | Supported | Supported | Supported | -* **[1]** Automated testing performed on Ubuntu 22.04 development release. Manual testing performed on Ubuntu 22.04.4. +| Platform | Python 3.11 | Python 3.12 | Python 3.13 | Python 3.14 | +|-----------------------------------------------------------------|---------------|---------------|---------------|---------------| +| Ubuntu 22.04 [1](#id6) | Recommended | Recommended | Recommended | Recommended | +| Ubuntu 24.04 [2](#id7) | Supported | Supported | Supported | Supported | +| SUSE Linux Enterprise
15 SP5+, 16 SP0 [3](#id8) | Supported | Supported | Supported | Supported | +| RHEL 8.8, 8.10, 9.4,
9.6 [4](#id9) | Supported | Supported | Supported | Supported | +| Rocky Linux
8.10, 9.4, 9.6 [5](#id10) | Supported | Supported | Supported | Supported | +* **[1]** Automated testing performed on Ubuntu 22.04 development release. Manual testing performed on Ubuntu 22.04.5. * **[2]** Manual testing performed on Ubuntu 24.04.2. -* **[3]** Manual testing performed on SLES 15 SP5. +* **[3]** Manual testing performed on SLES 15 SP6. * **[4]** Manual testing performed on RHEL 8.10. -* **[5]** Manual testing performed on Rocky Linux 9.4. +* **[5]** Manual testing performed on Rocky Linux 9.6. @@ -46,9 +47,8 @@ MI Scripting Toolkit is supported on the following platforms: MI Scripting Toolkit depends on the following third-party packages: -- filetype (>=1.2.0,<2.0.0) -- packaging (>=24.0,<25.0) -- python-dateutil (>=2.9.0,<3.0.0) +- filetype>=1.2.0 +- packaging>=24.0 #### NOTE The list above include only the direct dependencies of the Scripting Toolkit package. The transitive dependencies @@ -62,6 +62,14 @@ Toolkit into a new Conda virtual environment, and then use `conda list` to displ ## Installing MI Scripting Toolkit +#### Versionchanged +Changed in version 5.0: MI Scripting Toolkit is now provided as a package called `ansys-grantami-core`. `granta_miscriptingtoolkit` is provided +for compatibility purposes only, and will be removed in a future release. + +When `granta_miscriptingtoolkit` is installed, imports from the `granta_miscriptingtoolkit` and +`granta_miscriptingtoolkit.granta` modules succeed and a +[`APIDeprecationWarning`](../streamlined_api/exceptions.md#ansys.grantami.core.mi_meta_classes.APIDeprecationWarning) is emitted. + MI Scripting Toolkit is provided as a zip file, and is available from the Downloads page on the Ansys Customer Portal. This section assumes that the zip file has been downloaded and the contents have been unzipped to the location `/home/user/scripting_toolkit`. @@ -69,12 +77,16 @@ assumes that the zip file has been downloaded and the contents have been unzippe To install MI Scripting Toolkit, enter the following into the Linux command line: ```default -$ conda install -c file:///home/user/scripting_toolkit/conda granta_miscriptingtoolkit +$ conda install -c file:///home/user/scripting_toolkit/conda ansys-grantami-core ``` Once installation is complete, the MI Scripting Toolkit files and all required dependencies are installed into the conda virtual environment. +#### WARNING +Do not manually install the `ansys-grantami-core` conda package file. There are additional dependencies included in +the `conda` folder which must be installed for MI Scripting Toolkit to function correctly. + @@ -83,33 +95,33 @@ environment. MI Scripting Toolkit defines optional dependencies as additional packages: -* `granta_miscriptingtoolkit.notebooks`: Required to execute the [Example notebooks](./../notebooks/index.md). -* `granta_miscriptingtoolkit.oidc`: Required to use OpenID Connect (OIDC) authentication. +* `ansys-grantami-core.notebooks`: Required to execute the [Example notebooks](../examples/index.md). +* `ansys-grantami-core.oidc`: Required to use OpenID Connect (OIDC) authentication. -These packages can be installed instead of the base `granta_miscriptingtoolkit` package to provide additional +These packages can be installed instead of the base `ansys-grantami-core` package to provide additional functionality. For example, to install the dependencies required to run the notebooks: ```default -$ conda install -c file:///home/user/scripting_toolkit/conda granta_miscriptingtoolkit.notebooks +$ conda install -c file:///home/user/scripting_toolkit/conda ansys-grantami-core.notebooks ``` Or to install both the notebook and OIDC dependencies: ```default -$ conda install -c file:///home/user/scripting_toolkit/conda granta_miscriptingtoolkit.notebooks granta_miscriptingtoolkit.oidc +$ conda install -c file:///home/user/scripting_toolkit/conda ansys-grantami-core.notebooks ansys-grantami-core.oidc ``` The `[notebooks]` extra includes the following additional dependencies: -- jupyterlab (>=4.0.0,<5.0.0) -- matplotlib (>=3.6.0,<4.0.0) -- numpy (>=2.0.0,<3.0.0) -- pandas (>=2.1,<3.0) -- python-docx (>=1.1.0,<2.0.0) -- python-pptx (>=1.0.0,<2.0.0) -- scipy (>=1.11.0,<2.0.0) -- seaborn (>=0.13,<0.14) +- jupyterlab>=4.0.0 +- matplotlib>=3.6.0 +- numpy>=1.23.5 +- pandas>=2.1 +- python-docx>=1.1.0 +- python-pptx>=1.0.0 +- scipy>=1.11.0 +- seaborn>=0.13 The `[oidc]` extra includes the following additional dependencies: -- keyring (>23,<26) +- keyring<26,>23 diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/getting_started/index.md b/2026R1/scripting-toolkit-dev-portal-26-r1/getting_started/index.md index 9a28aa82a7..f48c953d0f 100644 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/getting_started/index.md +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/getting_started/index.md @@ -13,23 +13,26 @@ MI Scripting Toolkit provides a clean and intuitive Python interface for working reported on using the Python data analytics ecosystem, or provided to external systems. * Exporting data to FEA material card formats. -The [Example notebooks](./../notebooks/index.md) contain fully documented example code covering these use cases, and can be used as starting -points for your own code. For more advanced users, the [API reference](./../api/index.md) provides more detailed guidance. Finally, the -[User guide](./../user_guide/index.md) contains additional information on the package structure, performance optimization, and authentication. +The [Example notebooks](../examples/index.md) contain fully documented example code covering these use cases, and can be used as starting +points for your own code. For more advanced users, the [Streamlined API reference](../streamlined_api/index.md) provides more detailed guidance. +Finally, the [User guide](../user_guide/index.md) contains additional information on the package structure, performance +optimization, and authentication. ## Installation +MI Scripting Toolkit 5.0 is available as a part of the Granta MI Enterprise software package, but is licensed separately. + -To use MI Scripting Toolkit 4.2, your Granta MI server must be running 2023 R1 or later, which includes Service Layer -Interface 22/04. +To use MI Scripting Toolkit 5.0, your Granta MI server must be running 2024 R2 or later, which includes Service Layer +Interface 23/10. -MI Scripting Toolkit can be installed using either the `pip` or `conda` package managers. See the links below for -detailed installation instructions and client requirements: +MI Scripting Toolkit is provided in a package called `ansys.grantami.core`, and can be installed using either the `pip` or +`conda` package managers. See the links below for detailed installation instructions and client requirements: * [Installation with pip (recommended)](pip.md) * [Installation with conda](conda.md) @@ -42,15 +45,15 @@ Once you’ve installed MI Scripting Toolkit using the installation instructions find a record by name, and export an attribute value: ```default ->>> from GRANTA_MIScriptingToolkit import granta as mpy +>>> import ansys.grantami.core as mpy ->>> mi = mpy.connect("http://my.server.name/mi_servicelayer", autologon=True) +>>> mi = mpy.SessionBuilder("http://my.server.name/mi_servicelayer").with_autologon() >>> database = mi.get_db("MI Training") >>> record = database.search_for_records_by_name("Aluminum, 7075, wrought, T73")[0] >>> attribute = record.attributes["Young's modulus"] ->>> print(f"'{record.name}' has a modulus of {attribute.value["low"]}-{attribute.value["high"]} {attribute.unit}") +>>> print(f"'{record.name}' has a modulus of {attribute.value.low}-{attribute.value.high} {attribute.unit}") 'Aluminum, 7075, wrought, T73' has a modulus of 10-11 10^6 psi ``` -For more examples see the [Example notebooks](./../notebooks/index.md). +For more examples see the [Example notebooks](../examples/index.md). diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/getting_started/pip.md b/2026R1/scripting-toolkit-dev-portal-26-r1/getting_started/pip.md index 6c28032e2a..587c0ed157 100644 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/getting_started/pip.md +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/getting_started/pip.md @@ -6,8 +6,8 @@ ## Server software requirements -To use MI Scripting Toolkit 4.2, your Granta MI server must be running 2023 R1 or later, which includes Service Layer -Interface 22/04. +To use MI Scripting Toolkit 5.0, your Granta MI server must be running 2024 R2 or later, which includes Service Layer +Interface 23/10. @@ -15,23 +15,23 @@ Interface 22/04. MI Scripting Toolkit for pip is supported on the following platforms: -| Platform | Python 3.10 | Python 3.11 | Python 3.12 | Python 3.13 | -|---------------------------------------------------------|-----------------------------------|---------------|---------------|---------------| -| Windows [1](#id7) | Certified | Certified | Certified | Certified | -| Linux | Ubuntu 22.04 [2](#id8) | Certified | Certified | Certified | -| Ubuntu 24.04 [3](#id9) | Supported | Supported | Certified | Supported | -| SUSE Linux Enterprise
15 SP4+ [4](#id10) | Supported | Supported | Certified | Supported | -| RHEL 8.8+, 9.3+ [5](#id11) | Supported | Supported | Certified | Supported | -| Rocky Linux
8.9+, 9.3+ [6](#id12) | Supported | Supported | Certified | Supported | +| Platform | Python 3.11 | Python 3.12 | Python 3.13 | Python 3.14 | +|------------------------------------------------------------------|-----------------------------------|---------------|---------------|---------------| +| Windows [1](#id7) | Recommended | Recommended | Recommended | Recommended | +| Linux | Ubuntu 22.04 [2](#id8) | Recommended | Recommended | Recommended | +| Ubuntu 24.04 [3](#id9) | Supported | Supported | Recommended | Supported | +| SUSE Linux Enterprise
15 SP5+, 16 SP0 [4](#id10) | Supported | Supported | Recommended | Supported | +| RHEL 8.8, 8.10, 9.4,
9.6 [5](#id11) | Supported | Supported | Recommended | Supported | +| Rocky Linux
8.10, 9.4, 9.6 [6](#id12) | Supported | Supported | Recommended | Supported | Test platform details: -* **[1]** Automated testing performed on Windows Server 2022. Manual testing performed on Windows Server 2019 and Windows 11. -* **[2]** Automated testing performed on Ubuntu 22.04 development release. Manual testing performed on Ubuntu 22.04.4. +* **[1]** Automated testing performed on Windows Server 2022. Manual testing performed on Windows Server 2025 and Windows 11. +* **[2]** Automated testing performed on Ubuntu 22.04 development release. Manual testing performed on Ubuntu 22.04.5. * **[3]** Automated testing performed on Ubuntu 24.04 development release. Manual testing performed on Ubuntu 24.04.2. -* **[4]** Automated testing performed on SLES 15 SP4. Manual testing performed on SLES 15 SP5. -* **[5]** Automated testing performed on RHEL 8.8 and 9.3. Manual testing performed on RHEL 8.10. -* **[6]** Automated testing performed on Rocky Linux 8.9 and 9.3. Manual testing performed on Rocky Linux 9.4. +* **[4]** Automated testing performed on SLES 15 SP4 and 16 SP0. Manual testing performed on SLES 15 SP6. +* **[5]** Automated testing performed on RHEL 8.8 and 9.6. Manual testing performed on RHEL 8.10. +* **[6]** Automated testing performed on Rocky Linux 8.9 and 9.6. Manual testing performed on Rocky Linux 9.6. @@ -70,9 +70,8 @@ library on our build environment is listed in the right-hand column. MI Scripting Toolkit depends on the following third-party packages: -- filetype (>=1.2.0,<2.0.0) -- packaging (>=24.0,<25.0) -- python-dateutil (>=2.9.0,<3.0.0) +- filetype>=1.2.0 +- packaging>=24.0 #### NOTE The list above include only the direct dependencies of the MI Scripting Toolkit package. The transitive dependencies @@ -106,21 +105,33 @@ example, the path `C:\Users\user\scripting_toolkit\pip` in Windows would be equi ## Installing and upgrading MI Scripting Toolkit +#### Versionchanged +Changed in version 5.0: MI Scripting Toolkit is now provided as a package called `ansys-grantami-core`. `GRANTA_MIScriptingToolkit` is provided +for compatibility purposes only, and will be removed in a future release. + +When `GRANTA_MIScriptingToolkit` is installed, imports from the `GRANTA_MIScriptingToolkit` and +`granta_miscriptingtoolkit.granta` modules succeed and a +[`APIDeprecationWarning`](../streamlined_api/exceptions.md#ansys.grantami.core.mi_meta_classes.APIDeprecationWarning) is emitted. + Install MI Scripting Toolkit in a virtual environment. If you are installing MI Scripting Toolkit in an activated virtual environment, enter the following: ```default -$ pip install --upgrade granta_miscriptingtoolkit --find-links="C:\Users\user\scripting_toolkit\pip" +$ pip install --upgrade ansys-grantami-core --find-links="C:\Users\user\scripting_toolkit\pip" ``` If you are installing MI Scripting Toolkit in a Python environment which is not available on the path, enter the following: ```default -$ path/to/python -m pip install --upgrade granta_miscriptingtoolkit --find-links="C:\Users\user\scripting_toolkit\pip" +$ path/to/python -m pip install --upgrade ansys-grantami-core --find-links="C:\Users\user\scripting_toolkit\pip" ``` When installation is complete, the MI Scripting Toolkit files are installed into the Python site-packages location. +#### WARNING +Do not manually install the `ansys-grantami-core` wheel file. There are additional dependencies included in the +`pip` folder which must be installed for MI Scripting Toolkit to function correctly. + @@ -129,40 +140,40 @@ When installation is complete, the MI Scripting Toolkit files are installed into MI Scripting Toolkit defines additional optional dependencies in the form of extras: -* `[notebooks]`: Required to execute the [Example notebooks](./../notebooks/index.md). +* `[notebooks]`: Required to execute the [Example notebooks](../examples/index.md). * `[oidc]`: Required to use OpenID Connect (OIDC) authentication. To install an extra, include the extra name after the package name when installing MI Scripting Toolkit. For example, to install MI Scripting Toolkit with the additional notebook dependencies: ```default -$ pip install --upgrade granta_miscriptingtoolkit[notebooks] --find-links="C:\Users\user\scripting_toolkit\pip" +$ pip install --upgrade ansys-grantami-core[notebooks] --find-links="C:\Users\user\scripting_toolkit\pip" ``` Or to install both the notebook and OIDC dependencies: ```default -$ pip install --upgrade granta_miscriptingtoolkit[notebooks,oidc] --find-links="C:\Users\user\scripting_toolkit\pip" +$ pip install --upgrade ansys-grantami-core[notebooks,oidc] --find-links="C:\Users\user\scripting_toolkit\pip" ``` The `[notebooks]` extra includes the following additional dependencies: - Linux and Windows platforms: - : - jupyterlab (>=4.0.0,<5.0.0) - - matplotlib (>=3.6.0,<4.0.0) - - numpy (>=2.0.0,<3.0.0) - - pandas (>=2.1,<3.0) - - python-docx (>=1.1.0,<2.0.0) - - python-pptx (>=1.0.0,<2.0.0) - - scipy (>=1.11.0,<2.0.0) - - seaborn (>=0.13,<0.14) + : - jupyterlab>=4.0.0 + - matplotlib>=3.6.0 + - numpy>=1.23.5 + - pandas>=2.1 + - python-docx>=1.1.0 + - python-pptx>=1.0.0 + - scipy>=1.11.0 + - seaborn>=0.13 - Windows only: - : - docx2pdf (>=0.1.8,<0.2.0) - - tqdm[notebook] (>=4.0,<5.0) + : - docx2pdf>=0.1.8 + - tqdm[notebook]>=4.0 The `[oidc]` extra includes the following additional dependencies: -- keyring (>23,<26) +- keyring<26,>23 If you encounter dependency errors when installing the `[notebooks]` extra, you may need to first upgrade `pip`: @@ -175,9 +186,9 @@ python -m pip install --upgrade pip ## Upgrading from MI Scripting Toolkit v3.0 or earlier #### WARNING -The MI Scripting Toolkit package name changed with v3.1 from `miscriptingtoolkit` to `GRANTA_MIScriptingToolkit`. If you -are upgrading from MI Scripting Toolkit v3.0 or earlier, you **must** follow the instructions in this section or `pip install` -may fail with dependency conflicts. +The MI Scripting Toolkit package name changed with v3.1 from `miscriptingtoolkit` to `GRANTA_MIScriptingToolkit`, and has +since changed to `ansys-grantami-core`. If you are upgrading from MI Scripting Toolkit v3.0 or earlier, you **must** follow +the instructions in this section or `pip install` may fail with dependency conflicts. If you are using a virtual environment, you should delete your virtual environment and create a new one. @@ -205,14 +216,14 @@ environment with PyPI access. Enter the following into the command line to downl `C:\Users\user\all_wheels` directory: ```default -$ pip download GRANTA_MIScriptingToolkit --find-links=pip --dest="C:\Users\user\all_wheels" +$ pip download ansys-grantami-core --find-links=pip --dest="C:\Users\user\all_wheels" ``` Copy the `all_wheels` directory to the machine without access to PyPI, and enter the following into the command line to install MI Scripting Toolkit using the packages in the `all_wheels` directory: ```default -$ pip install GRANTA_MIScriptingToolkit --find-links="C:\Users\user\all_wheels" +$ pip install ansys-grantami-core --find-links="C:\Users\user\all_wheels" --no-index ``` These instructions describe how to download the required packages for the current platform only. To download packages diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/index.md b/2026R1/scripting-toolkit-dev-portal-26-r1/index.md index 1eecca48e0..60b91a19f9 100644 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/index.md +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/index.md @@ -6,8 +6,8 @@ MI Scripting Toolkit provides a clean and intuitive Python interface for working * [Getting started](getting_started/index.md): Learn how to install MI Scripting Toolkit and run some simple commands. * [User guide](user_guide/index.md): Learn more about MI Scripting Toolkit. -* [Example notebooks](notebooks/index.md): Explore examples that show how to use MI Scripting Toolkit to work with Granta MI +* [Example notebooks](examples/index.md): Explore examples that show how to use MI Scripting Toolkit to work with Granta MI programmatically. -* [API reference](api/index.md): Consult the full API documentation for MI Scripting Toolkit. -* [Changelog](changelog.md): Review the changes made in this release of MI Scripting Toolkit, and learn how to upgrade from +* [Streamlined API reference](streamlined_api/index.md): Consult the full Streamlined API documentation. +* [Release notes](release_notes/index.md): Review the changes made in this release of MI Scripting Toolkit, and learn how to upgrade from previous versions. diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/release_notes/breaking_changes.md b/2026R1/scripting-toolkit-dev-portal-26-r1/release_notes/breaking_changes.md new file mode 100644 index 0000000000..fda811efa4 --- /dev/null +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/release_notes/breaking_changes.md @@ -0,0 +1,351 @@ +# Upgrading from earlier versions + + + + + +This section summarizes all the breaking changes in previous versions of MI Scripting Toolkit. + + + +## Upgrading from MI Scripting Toolkit Version 4.2 + + + +### Package + +* Moved MI Scripting Toolkit to new packages `ansys-grantami-core` and `ansys-grantami-backend-soap`. +* Added compatibility package `GRANTA_MIScriptingToolkit`, which is deprecated from v5.0. +* Removed Async Job Queue stubs: module `mi_async_jobs`, method `Session.get_async_job_queue` and error + handling in the `granta` namespace. + + + +### Session + +* Added [`SessionBuilder`](../streamlined_api/session.md#ansys.grantami.core.mi.SessionBuilder) to create [`Session`](../streamlined_api/session.md#ansys.grantami.core.mi.Session) objects. [`Session`](../streamlined_api/session.md#ansys.grantami.core.mi.Session) is no longer supported unless + imported via `GRANTA_MIScriptingToolkit`. +* Removed Streamlined API function `connect()`. +* Removed methods `Session.can_connect()`, `Session.assert_can_run_parallelized()`. +* Removed `Session.spawn_session`. Create foundation layer sessions using + [`ansys.grantami.backend.soap.GRANTA_MISession`](../foundation_api.md#module-ansys.grantami.backend.soap.GRANTA_MISession). +* [`Session`](../streamlined_api/session.md#ansys.grantami.core.mi.Session) objects that are instantiated with URLs that do not specify a protocol now default to HTTPS. To use + HTTP, provide the full URL including the `http` protocol. + + + +### Database + +* Removed [`Database.get_table()`](../streamlined_api/database.md#ansys.grantami.core.mi_tree_classes.Database.get_table) and [`Database.get_table_by_guid()`](../streamlined_api/database.md#ansys.grantami.core.mi_tree_classes.Database.get_table_by_guid) arguments `subsets`, `unit_system`, + and `absolute_temperatures`. +* Removed `Database.get_all_link_details_where`, `Database.get_link_detail`, and `Database.link_details`. Use + [`Database.record_link_groups`](../streamlined_api/database.md#ansys.grantami.core.mi_tree_classes.Database.record_link_groups) for available record link groups. +* Removed `Database.set_unit_system`. Use [`Database.unit_system`](../streamlined_api/database.md#ansys.grantami.core.mi_tree_classes.Database.unit_system) and [`Database.absolute_temperatures`](../streamlined_api/database.md#ansys.grantami.core.mi_tree_classes.Database.absolute_temperatures). +* [`Database.get_table()`](../streamlined_api/database.md#ansys.grantami.core.mi_tree_classes.Database.get_table) no longer resets the active subsets of the returned [`Table`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table) object. + + + +### Table + +* Removed [`Table.path_from()`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.path_from) and [`Table.paths_from()`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.paths_from) argument `end_node`. Create records using + [`Table.create_record()`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.create_record). + + + +### Bulk methods + +* Removed `parallelise` argument from methods [`Session.bulk_fetch_release_states()`](../streamlined_api/session.md#ansys.grantami.core.mi.Session.bulk_fetch_release_states), + [`Session.bulk_delete_or_withdraw_records()`](../streamlined_api/session.md#ansys.grantami.core.mi.Session.bulk_delete_or_withdraw_records), [`Table.bulk_fetch()`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.bulk_fetch), [`Table.bulk_link_fetch()`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.bulk_link_fetch), + [`Table.bulk_fetch_associated_records()`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.bulk_fetch_associated_records), and [`Table.bulk_fetch_data_revision_history()`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.bulk_fetch_data_revision_history). Use the argument + `parallelize`. +* Removed class `BulkRecordDeleterWithdrawer` from public API. Use [`Session.bulk_delete_or_withdraw_records()`](../streamlined_api/session.md#ansys.grantami.core.mi.Session.bulk_delete_or_withdraw_records) to + delete and withdraw records in bulk. +* Removed class `ReleaseStateFetcher` from public API. Use [`Session.bulk_fetch_release_states()`](../streamlined_api/session.md#ansys.grantami.core.mi.Session.bulk_fetch_release_states) to fetch release + states in bulk. +* Removed class `AttributeFetcher` from public API. Use [`Table.bulk_fetch()`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.bulk_fetch) to fetch attribute values in bulk. +* Removed class `AssociatedRecordFetcher` from public API. Use [`Table.bulk_fetch_associated_records()`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.bulk_fetch_associated_records) to fetch + associated records in bulk. +* Removed class `LinkFetcher` from public API. Use [`Table.bulk_link_fetch()`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.bulk_link_fetch) to fetch links in bulk. +* Removed class `DataRevisionHistoryFetcher` from public API. Use [`Table.bulk_fetch_data_revision_history()`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.bulk_fetch_data_revision_history) to + fetch data revision history in bulk. +* Removed module `mi_bulk_utilities` from public API. + + + +### Attribute definitions + +* Renamed `AttributeDefinitionDatetime` to [`AttributeDefinitionDate`](../streamlined_api/attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinitionDate). +* [`AttributeDefinitionDate.min`](../streamlined_api/attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinitionDate.min) and [`AttributeDefinitionDate.max`](../streamlined_api/attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinitionDate.max) now return [`date`](https://docs.python.org/3/library/datetime.html#datetime.date) + objects instead of [`datetime`](https://docs.python.org/3/library/datetime.html#datetime.datetime) objects set to midnight on the appropriate date. +* Removed the `axis_name` property from all attribute definition classes except + [`AttributeDefinitionFloatFunctional`](../streamlined_api/attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinitionFloatFunctional). +* Removed the `unit` property from all attribute definition classes except + [`AttributeDefinitionRange`](../streamlined_api/attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinitionRange), [`AttributeDefinitionFloatFunctional`](../streamlined_api/attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinitionFloatFunctional), and + [`AttributeDefinitionPoint`](../streamlined_api/attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinitionPoint). + + + +### Records + +* Removed `Record.all_children`. Use [`Record.get_descendants()`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record.get_descendants). +* Removed support for setting [`Record.type`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record.type) to a string. Set to a [`RecordType`](../streamlined_api/constants.md#ansys.grantami.core.mi_constants.RecordType) value. +* Removed support for record color and record type [`SearchCriterion`](../streamlined_api/supporting.md#ansys.grantami.core.mi_meta_classes.SearchCriterion) using [`str`](https://docs.python.org/3/library/stdtypes.html#str) criterion values. Define + the criterion value using the enumerations [`RecordColor`](../streamlined_api/constants.md#ansys.grantami.core.mi_constants.RecordColor) and [`RecordType`](../streamlined_api/constants.md#ansys.grantami.core.mi_constants.RecordType). +* Removed deprecated method `refetch_pseudos()`. Use the alternative [`Record.refetch_pseudo_attributes()`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record.refetch_pseudo_attributes). +* Removed support for deprecated argument names `include_metas` and `include_pseudos` on + [`Record.get_attributes()`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record.get_attributes). Use `include_meta_attributes` and `include_pseudo_attributes`. +* Removed deprecated attribute `Record.pseudo_attributes`. Pseudo-attributes are available as individual + [`Record`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record) properties. +* The behavior when invalid operations are performed on staged records has been standardized. All methods and properties + now raise [`InvalidRecordStateError`](../streamlined_api/exceptions.md#ansys.grantami.core.mi_meta_classes.InvalidRecordStateError) when called on staged records in circumstances where this is not + permitted. + + + +### Float functional attribute values + +* `FunctionalSeries` has been split into [`AttributeFunctionalSeriesPoint`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalSeriesPoint) and + [`AttributeFunctionalSeriesRange`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalSeriesRange). +* `FunctionalGrid` has been split into [`AttributeFunctionalGridPoint`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalGridPoint) and + [`AttributeFunctionalGridRange`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalGridRange). +* `FunctionalSeries.hide_graph` has been renamed to `show_as_table`. +* Removed `AttributeFunctionalSeries.series_linestyles` and `AttributeFunctionalGrid.linestyle`. Use the + `decoration` property. +* Removed `AttributeFunctional.clear()`. Set the `.value` to [`None`](https://docs.python.org/3/library/constants.html#None). +* The `unit` property on functional attribute classes now returns [`None`](https://docs.python.org/3/library/constants.html#None) for dimensionless attributes, instead of + an empty string. +* `AttributeFunctional.xaxis_parameter` has been removed. To access x-axis parameter information, use the `x_axis` + and `parameters` properties. +* The mapping `AttributeFunctional.xaxis` has been removed. Use `with_new_x_axis()`, to create an attribute value + with a different x-axis. +* The `parameters` property now returns a mapping of parameter names to [`FunctionalValueParameter`](../streamlined_api/supporting.md#ansys.grantami.core.mi_attribute_value_classes.FunctionalValueParameter) objects. + + + +### Tabular attribute values + +* The `.value` property on [`AttributeTabular`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeTabular) is now read-only, replicating where possible the v 4.2 + interface. Use the new [`AttributeTabular.rows`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeTabular.rows)-based interface for making changes to tabular data. +* The `.add_row` method on [`AttributeTabular`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeTabular) has been renamed to [`AttributeTabular.append_row()`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeTabular.append_row), to + better reflect its behavior. +* The `.units` property has been removed from [`AttributeTabular`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeTabular). To access the units as defined on the + column, use the [`AttributeDefinitionTabular.column_units`](../streamlined_api/attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinitionTabular.column_units) property. To access the unit for a specific cell, + use the [`RangeValue.unit`](../streamlined_api/tabular.md#ansys.grantami.core._mi_tabular_value_classes.RangeValue.unit) or [`PointValue.unit`](../streamlined_api/tabular.md#ansys.grantami.core._mi_tabular_value_classes.PointValue.unit) property on the cell. +* Direct indexing of the tabular attribute value to access rows has been removed. +* Operations which can cause data loss for users of Data Updater have been disabled by default. To enable them for a + specific attribute value, call [`AttributeTabular.enable_destructive_editing()`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeTabular.enable_destructive_editing). +* New classes [`ShortTextValue`](../streamlined_api/tabular.md#ansys.grantami.core._mi_tabular_value_classes.ShortTextValue), [`LongTextValue`](../streamlined_api/tabular.md#ansys.grantami.core._mi_tabular_value_classes.LongTextValue), [`LogicalValue`](../streamlined_api/tabular.md#ansys.grantami.core._mi_tabular_value_classes.LogicalValue), [`IntegerValue`](../streamlined_api/tabular.md#ansys.grantami.core._mi_tabular_value_classes.IntegerValue), + [`DateValue`](../streamlined_api/tabular.md#ansys.grantami.core._mi_tabular_value_classes.DateValue), [`PictureValue`](../streamlined_api/tabular.md#ansys.grantami.core._mi_tabular_value_classes.PictureValue), and [`FileValue`](../streamlined_api/tabular.md#ansys.grantami.core._mi_tabular_value_classes.FileValue) represent individual linked cells in a tabular + attribute value. The corresponding Local versions of these classes are used to represent local cells. + + + +### Other attribute values + +* [`AttributePoint`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributePoint) has been split into [`AttributePointSingle`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributePointSingle) and [`AttributePointMulti`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributePointMulti). +* The [`AttributePoint`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributePoint) `unit` property now returns [`None`](https://docs.python.org/3/library/constants.html#None) for dimensionless attributes, instead of an + empty string. +* [`AttributeDiscrete`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeDiscrete) has been split into [`AttributeDiscreteSingle`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeDiscreteSingle) and + [`AttributeDiscreteMulti`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeDiscreteMulti). +* [`AttributeDate.value`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeDate.value) now only supports [`date`](https://docs.python.org/3/library/datetime.html#datetime.date) objects. +* Removed `AttributeDate.value_as_string`. +* [`AttributeRange.value`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeRange.value) can now only be set to an instance of [`Range`](../streamlined_api/supporting.md#ansys.grantami.core._mi_value_classes.Range). +* [`AttributeRange.unit`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeRange.unit) now returns [`None`](https://docs.python.org/3/library/constants.html#None) for dimensionless attributes, instead of an empty string. +* The property `.object` has been removed from [`AttributeHyperlink`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeHyperlink). Use the properties + [`AttributeHyperlink.value`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeHyperlink.value), [`AttributeHyperlink.hyperlink_display`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeHyperlink.hyperlink_display), and + [`AttributeHyperlink.hyperlink_description`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeHyperlink.hyperlink_description) + instead. +* Properties [`AttributeHyperlink.hyperlink_description`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeHyperlink.hyperlink_description), [`AttributeFile.description`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeFile.description), + [`AttributeFile.url`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeFile.url), and [`AttributePicture.url`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributePicture.url) now return [`None`](https://docs.python.org/3/library/constants.html#None) if properties are not set, + instead of an empty string. + + + +### Schema and supporting items + +* Removed `ParameterDefinition.type`. Use [`ParameterDefinition.data_type`](../streamlined_api/supporting.md#ansys.grantami.core.mi_attribute_classes.ParameterDefinition.data_type) + and [`ParameterDefinition.restricted`](../streamlined_api/supporting.md#ansys.grantami.core.mi_attribute_classes.ParameterDefinition.restricted). +* Removed support for creating [`SearchCriterion`](../streamlined_api/supporting.md#ansys.grantami.core.mi_meta_classes.SearchCriterion) objects for datetime-based pseudo-attributes with [`str`](https://docs.python.org/3/library/stdtypes.html#str) + values. Use [`datetime`](https://docs.python.org/3/library/datetime.html#datetime.datetime) values only. +* Removed support for providing the [`AttributeDefinition.search_criterion()`](../streamlined_api/attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinition.search_criterion) `between_dates` argument as a + non-tuple sequence of [`str`](https://docs.python.org/3/library/stdtypes.html#str) values. Argument must be specified as a 2-tuple of [`date`](https://docs.python.org/3/library/datetime.html#datetime.date) values. + + + +### Miscellaneous functions + +* Removed method `mi_functions.log_to_file_in_local_app_data`. Use the Python logging module, and obtain the + built-in logger with the function [`get_foundation_logger()`](../streamlined_api/helpers.md#ansys.grantami.core.mi_functions.get_foundation_logger). +* Removed method `mi_functions.extract_parameter_value`. + + + +## Upgrading from MI Scripting Toolkit Version 4.1 + +There are no changes required to upgrade from MI Scripting Toolkit Version 4.1. + + + +## Upgrading from MI Scripting Toolkit Version 4.0 + + + +### Parameters + +* The attribute `parent_record` of the class [`ParameterDefinition`](../streamlined_api/supporting.md#ansys.grantami.core.mi_attribute_classes.ParameterDefinition) has been removed as the information is not + currently available in Scripting Toolkit. Attempting to access this attribute will raise an [`AttributeError`](https://docs.python.org/3/library/exceptions.html#AttributeError). +* The `order` and `parent_attribute` properties were previously implemented on the [`ParameterDefinition`](../streamlined_api/supporting.md#ansys.grantami.core.mi_attribute_classes.ParameterDefinition) + class, and so were accessible for all parameter objects. However, these properties only have meaning when requested + for an attribute parameter, and had undefined behavior for database parameters. These properties have been + moved to the [`AttributeParameter`](../streamlined_api/supporting.md#ansys.grantami.core.mi_attribute_classes.AttributeParameter) class. Attempting to access these properties from a + [`DatabaseParameter`](../streamlined_api/supporting.md#ansys.grantami.core.mi_attribute_classes.DatabaseParameter) object will raise an [`AttributeError`](https://docs.python.org/3/library/exceptions.html#AttributeError). +* It is no longer permitted to provide database or attribute parameters to [`Exporter.run_exporter()`](../streamlined_api/supporting.md#ansys.grantami.core.mi_exporters.Exporter.run_exporter). The results + of the [`Exporter.get_parameters_required_for_export()`](../streamlined_api/supporting.md#ansys.grantami.core.mi_exporters.Exporter.get_parameters_required_for_export) method must be used to specify parameter values for + export. If you do not use the results of the [`Exporter.get_parameters_required_for_export()`](../streamlined_api/supporting.md#ansys.grantami.core.mi_exporters.Exporter.get_parameters_required_for_export) method a + [`TypeError`](https://docs.python.org/3/library/exceptions.html#TypeError) will be raised. + + + +### Unit systems and absolute temperatures + +This section describes the previous incorrect behavior and usages that are subject to behavior changes in version 4.1. + +* If the `unit_system` and `absolute_temperature` arguments were never used, the default absolute temperature was + `True`. It now defaults to `False`. +* If only the `absolute_temperature` argument was provided, it was ignored and the absolute temperature scale was + not updated on the database. +* If the `unit_system` argument was provided, it only had an effect if the provided value was not the + [`DATABASE_UNIT_SYSTEM`](../streamlined_api/constants.md#ansys.grantami.core.mi_constants.DATABASE_UNIT_SYSTEM) **and** if the provided value was different from the previously active unit system: + + | Unit system change | `absolute_temperature` provided | `absolute_temperature` not provided | + |----------------------|-----------------------------------|---------------------------------------| + | True | `absolute_temperature` respected | `absolute_temperature` set to `False` | + | False | `absolute_temperature` ignored | `absolute_temperature` unchanged | + +In version 4.1, the behavior of these methods and arguments has been fixed. + + + +## Upgrading from MI Scripting Toolkit for Python Version 3.x + + + +### Subsets + +* If your code does not use the [`Table.subsets`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.subsets) property and the default subset in your + tables contain all records, you should see no behavior changes. *This is the most common + scenario.* +* If your code sets the [`Table.subsets`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.subsets) property to the default subset, then you should + disable this assignment from your code, since it now occurs automatically. +* If your code sets the [`Table.subsets`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.subsets) property to a non-default subset, then you should + clear the [`Table.subsets`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.subsets) property with `table_object.subsets.clear()` before setting the + non-default subset. +* If your code sets the [`Table.subsets`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.subsets) property to a set containing more than one subset and + you perform any subsequent record fetching or search operations, these operations will raise a + `ValueError`. They would previously not consider all applied subsets, and so would return + incorrect results. + + + +### Searching and browsing for records + +* All searches except [`Database.search_for_records_by_text()`](../streamlined_api/database.md#ansys.grantami.core.mi_tree_classes.Database.search_for_records_by_text) now apply a subset filter when + searching. If a table included in a search has multiple applied subsets, a `ValueError` is + raised. +* The [`Table.search_for_records_where()`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.search_for_records_where) `list_of_criteria` parameter must now only contain + criteria based on pseudo-attributes and attribute definitions from the table being searched. + Otherwise a `ValueError` is raised. +* The [`Database.search_for_records_where()`](../streamlined_api/database.md#ansys.grantami.core.mi_tree_classes.Database.search_for_records_where) `list_of_criteria` parameter must now only + contain criteria based on pseudo-attributes and attribute definitions from at most one table + within the database being searched. Otherwise a `ValueError` is raised. +* Getting records based on the Granta MI tree is generally now subject to subset filtering. If a + table included in a record fetch operation has multiple applied subsets, a `ValueError` is + raised. + + + +### Other changes + +* [`Session.records_from_string()`](../streamlined_api/session.md#ansys.grantami.core.mi.Session.records_from_string) now defaults to `use_strict_version=True`. +* `get_records_by_ids` and `get_record_by_id` methods on [`Session`](../streamlined_api/session.md#ansys.grantami.core.mi.Session), [`Database`](../streamlined_api/database.md#ansys.grantami.core.mi_tree_classes.Database), + and [`Table`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table) classes no longer accept the `identity` argument. Use `history_identity` + instead. +* [`Table.paths_from()`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.paths_from), [`Table.path_from()`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.path_from), and [`Table.get_records_from_path()`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.get_records_from_path) no + longer support `str` and [`Table`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table) inputs. Use `None` to use the table root as starting + node. All three methods now raise a `ValueError` if the record specified as `starting_node` + is not in the current table, and raise a `TypeError` if the argument value is not a + [`Record`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record) or `None`. +* [`Record.color`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record.color) no longer supports `str` inputs. Only [`RecordColor`](../streamlined_api/constants.md#ansys.grantami.core.mi_constants.RecordColor) objects + are supported. +* ‘AttributeFunctional.add_point’ and ‘AttributeFunctional.add_range’ methods now raise `KeyError` exceptions if a + dictionary with incorrect keys is provided. Note: these methods were removed with MI Scripting Toolkit v5.0. +* [`File.load()`](../streamlined_api/supporting.md#ansys.grantami.core.mi_attribute_value_classes.File.load), [`File.save()`](../streamlined_api/supporting.md#ansys.grantami.core.mi_attribute_value_classes.File.save), [`Picture.load()`](../streamlined_api/supporting.md#ansys.grantami.core.mi_attribute_value_classes.Picture.load), and [`Picture.save()`](../streamlined_api/supporting.md#ansys.grantami.core.mi_attribute_value_classes.Picture.save) no longer + accept `file_name` as an argument. Provide the full path including the file name to the `path` + argument. For file attributes, the name of the file is part of the attribute value and can be + accessed via [`AttributeFile.file_name`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeFile.file_name) or [`File.file_name`](../streamlined_api/supporting.md#ansys.grantami.core.mi_attribute_value_classes.File.file_name) to build a full path. +* `File.name` has been removed. Use [`File.file_name`](../streamlined_api/supporting.md#ansys.grantami.core.mi_attribute_value_classes.File.file_name). +* `Picture.name` has been removed. +* [`File`](../streamlined_api/supporting.md#ansys.grantami.core.mi_attribute_value_classes.File) and [`Picture`](../streamlined_api/supporting.md#ansys.grantami.core.mi_attribute_value_classes.Picture) no longer accept `name` or `load` as arguments. Provide + the full path to the file/picture (including the file name) to the keyword only argument `path`. +* [`File.description`](../streamlined_api/supporting.md#ansys.grantami.core.mi_attribute_value_classes.File.description) now only supports `str` inputs. +* `AttributeHyperlink.object` has been removed, use the properties on the [`AttributeHyperlink`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeHyperlink) object + instead. +* Any code which performs bulk export operations on file and picture attributes should be modified + either to access the binary data with an HTTP library such as + [requests](https://pypi.org/project/requests/) or [httpx](https://pypi.org/project/httpx/). + Alternatively, the binary data can be exported directly by specifying + `include_binary_data = True` in the call to [`Table.bulk_fetch()`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.bulk_fetch). However, this is likely + to be less performant for large amounts of data. +* The `Record.id` property has been renamed to [`Record.history_identity`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record.history_identity). + + + +### AsyncJobs + +The AsyncJobQueue functionality has been moved to a new PyAnsys package called PyGranta JobQueue. +If you are using Granta MI 2024 R2 or later, you can use this package to import and export Excel +files and import text data into Granta MI. If you are using Granta MI 2024 R1 or earlier and require +Job Queue functionality, you should continue to use MI Scripting Toolkit v3.3. + + + +## Upgrading from MI Scripting Toolkit for Python Version 2.X + + + +### New `store_password` option on the [`Session`](../streamlined_api/session.md#ansys.grantami.core.mi.Session) class + +**Old behavior:** The `password` for a [`Session`](../streamlined_api/session.md#ansys.grantami.core.mi.Session) is used to connect to Granta MI once, and cannot be stored. + +**New behavior:** The `password` assigned to a [`Session`](../streamlined_api/session.md#ansys.grantami.core.mi.Session) can be stored and used multiple times. You must +specify whether you want to store the password or not using the `store_password` property. If `store_password` is +missing, bulk operations will fail. + + + +### AttributeValue.value property has been standardized + +| Class | Old (2.X) behavior | New (3.0) behavior | +|----------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| [`AttributePoint`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributePoint) | `.points` returns the attribute value or values as a [`list`](https://docs.python.org/3/library/stdtypes.html#list) in all cases. | `AttributePoint.value` returns a [`list`](https://docs.python.org/3/library/stdtypes.html#list) of [`float`](https://docs.python.org/3/library/functions.html#float) values if the attribute is listed
as multi-valued in the schema, and a single [`float`](https://docs.python.org/3/library/functions.html#float) value if single-valued. | +| [`AttributeDiscrete`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeDiscrete) | `AttributeDiscrete.value` always returns a [`list`](https://docs.python.org/3/library/stdtypes.html#list), even when attribute is listed as
single-valued in the schema. | `AttributeDiscrete.value` returns [`list`](https://docs.python.org/3/library/stdtypes.html#list) of [`str`](https://docs.python.org/3/library/stdtypes.html#str) values if the attribute is
multi-valued, and a single [`str`](https://docs.python.org/3/library/stdtypes.html#str) value if single-valued. | +| `AttributeFunctional` | [`.value`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeValue.value) returns an instance of the class. | [`.value`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeValue.value) returns a [`list`](https://docs.python.org/3/library/stdtypes.html#list) of data values. | +| [`AttributeTabular`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeTabular) | [`.value`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeTabular.value) returns an instance of the class. | [`.value`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeTabular.value) returns a [`list`](https://docs.python.org/3/library/stdtypes.html#list) of data values for each column. | +| [`AttributeHyperlink`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeHyperlink) | [`.value`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeHyperlink.value) returns an instance of the class. | [`.value`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeHyperlink.value) returns the URL as a [`str`](https://docs.python.org/3/library/stdtypes.html#str), or [`None`](https://docs.python.org/3/library/constants.html#None) if no URL has been
set. | +| [`AttributeFile`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeFile) | [`.value`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeValue.value) returns an instance of the class. | [`.value`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeValue.value) returns binary data as a [`bytes`](https://docs.python.org/3/library/stdtypes.html#bytes) object. | +| [`AttributePicture`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributePicture) | [`.value`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeValue.value) returns an instance of the class. | [`.value`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeValue.value) returns binary data as a [`bytes`](https://docs.python.org/3/library/stdtypes.html#bytes) object. | + + + +### Additional changes to Version 2.0 scripts + +Version 2.0 scripts may need to be modified to take account of these additional breaking changes: + +| Behavior area | Old (2.X) behavior | New (3.0) behavior | +|------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Search return types | Text and criteria searches returned [`None`](https://docs.python.org/3/library/constants.html#None) when no results are found, whereas other methods return an empty
[`list`](https://docs.python.org/3/library/stdtypes.html#list). | All search methods return an empty [`list`](https://docs.python.org/3/library/stdtypes.html#list) when no records are found. | +| `search_for_records_by_text` return types | The session method returns an `iterator`. The database and table methods return a [`list`](https://docs.python.org/3/library/stdtypes.html#list). | All methods return a [`list`](https://docs.python.org/3/library/stdtypes.html#list). | +| [`Table.path_from()`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.path_from) record color behavior | The color of the records in the path is set to the default record color if `color` is not provided. | The color of records in the path inherits from the parent unless `color` is provided. | +| Identifying databases when both `name` and `db_key` are provided | The search stops once a unique name match is made; `db_key` is only used if the name search does not produce a
single result. | The search continues through until a database matching *both* the name *and* key is found. | +| Date data types | Dates are always handled as strings. | Dates can be provided as [`datetime.datetime`](https://docs.python.org/3/library/datetime.html#datetime.datetime) objects or [`str`](https://docs.python.org/3/library/stdtypes.html#str) objects. Dates are returned as
[`datetime.datetime`](https://docs.python.org/3/library/datetime.html#datetime.datetime) objects. | +| The `search_for_records_where` method | The `search_for_records_where` method on the [`Session`](../streamlined_api/session.md#ansys.grantami.core.mi.Session) class was available. | The `search_for_records_where` method on the [`Session`](../streamlined_api/session.md#ansys.grantami.core.mi.Session) class has been removed. | diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/release_notes/bug_fixes_and_enhancements.md b/2026R1/scripting-toolkit-dev-portal-26-r1/release_notes/bug_fixes_and_enhancements.md new file mode 100644 index 0000000000..9897239c74 --- /dev/null +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/release_notes/bug_fixes_and_enhancements.md @@ -0,0 +1,81 @@ +# Enhancements and bug fixes + + + + + +## Streamlined API + +* Added support for Device Code Flow authentication, making it easier to use the Scripting Toolkit in environments where + a web browser is not available. Use [`OIDCSessionBuilder.with_device_code_flow()`](../streamlined_api/session.md#ansys.grantami.core.mi.OIDCSessionBuilder.with_device_code_flow). +* Fixed an issue where it was not possible to authenticate with Microsoft Entra ID from Linux environments. +* Fixed an issue where it was not possible to refresh the OIDC access token a second time if token rotation was + disabled. +* [`Session.get_db()`](../streamlined_api/session.md#ansys.grantami.core.mi.Session.get_db) called with the argument `version_guid` incorrectly attempted to match the provided value + to database names. It now correctly matches databases by version guid. +* [`Database.version_guid`](../streamlined_api/database.md#ansys.grantami.core.mi_tree_classes.Database.version_guid) incorrectly returned the database name. It now correctly returns the database version + guid. +* Added a [`Table.bulk_fetch_all_record_versions()`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.bulk_fetch_all_record_versions) method, which fetches all versions of one or more records in + bulk. +* Fixed an issue where results from [`Table.bulk_fetch_associated_records()`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.bulk_fetch_associated_records) were created with an incorrect + [`Table`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table) reference. +* The `unit` property has been removed from attribute definition classes that do not have units. The following classes + are now the only ones that have a `unit` property: + - [`AttributeDefinitionPoint`](../streamlined_api/attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinitionPoint) + - [`AttributeDefinitionRange`](../streamlined_api/attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinitionRange) + - [`AttributeDefinitionFloatFunctional`](../streamlined_api/attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinitionFloatFunctional) +* Attribute definition classes that expose the `unit` property now return [`None`](https://docs.python.org/3/library/constants.html#None) if the corresponding attribute + has no associated unit, not an empty string. +* Units returned by [`AttributeDefinitionTabular.column_units`](../streamlined_api/attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinitionTabular.column_units) are now [`None`](https://docs.python.org/3/library/constants.html#None) for attributes with no + associated unit columns, not an empty string. +* Added property [`AttributeDefinitionDiscrete.is_ordered`](../streamlined_api/attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinitionDiscrete.is_ordered), which describes whether the discrete type associated + with the discrete attribute is ordered. +* The `unit` property returned by parameter definitions is now [`None`](https://docs.python.org/3/library/constants.html#None) if the corresponding parameter is + dimensionless, not an empty string. +* [`Record.last_modified_on`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record.last_modified_on), [`Record.created_on`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record.created_on), and [`Record.released_on`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record.released_on) now include timezone + information. This allows these values to be localized correctly. +* Searching for records by date attribute value with naive [`datetime`](https://docs.python.org/3/library/datetime.html#datetime.datetime) objects could cause unexpected + results if the server was set to a non-UTC timezone. This has been resolved by enforcing search with + [`date`](https://docs.python.org/3/library/datetime.html#datetime.date) objects only. +* [`Exporter.save()`](../streamlined_api/supporting.md#ansys.grantami.core.mi_exporters.Exporter.save) no longer raises an exception when saving the output of an FEA Export template configured to + include a byte order mark. +* Fixed an issue where modifying [`AttributeBinary.value`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeBinary.value) did not update the corresponding + [`BinaryType.mime_file_type`](../streamlined_api/supporting.md#ansys.grantami.core.mi_attribute_value_classes.BinaryType.mime_file_type). + + + +## Foundation API + +* The Foundation API has been upgraded to the 23/10 Service Layer SOAP interface, which is supported by Granta MI 2024 + R1 or later. +* Removed methods `GRANTA_Logging.debug`, `GRANTA_Logging.info`, `GRANTA_Logging.warning`, and + `GRANTA_Logging.error`. Use [`GRANTA_Logging.core_logger()`](../foundation_api.md#ansys.grantami.backend.soap.GRANTA_Logging.GRANTA_Logging.core_logger) to obtain the [`Logger`](https://docs.python.org/3/library/logging.html#logging.Logger) object + directly. +* Removed method `OIDC.authorize()`, this has been replaced with + [`OIDC.authorize_with_authorization_code_flow()`](../foundation_api.md#ansys.grantami.backend.soap.OIDC.OIDC.authorize_with_authorization_code_flow) +* Import of tabular attributes now uses separate types. [`TabularDataImportType`](../foundation_api.md#ansys.grantami.backend.soap.TabularDataImportType.TabularDataImportType) now accepts a list of + [`TabularDataImportRow`](../foundation_api.md#ansys.grantami.backend.soap.TabularDataImportRow.TabularDataImportRow) via the [`TabularDataImportType.add_import_row_refs()`](../foundation_api.md#ansys.grantami.backend.soap.TabularDataImportType.TabularDataImportType.add_import_row_refs) property, or a list of + [`TabularDataUpdateRow`](../foundation_api.md#ansys.grantami.backend.soap.TabularDataUpdateRow.TabularDataUpdateRow) via the [`TabularDataImportType.add_update_row_refs()`](../foundation_api.md#ansys.grantami.backend.soap.TabularDataImportType.TabularDataImportType.add_update_row_refs) property. +* Added new classes [`TabularDataImportRow`](../foundation_api.md#ansys.grantami.backend.soap.TabularDataImportRow.TabularDataImportRow), [`TabularDataUpdateRow`](../foundation_api.md#ansys.grantami.backend.soap.TabularDataUpdateRow.TabularDataUpdateRow), and [`TabularDataImportCell`](../foundation_api.md#ansys.grantami.backend.soap.TabularDataImportCell.TabularDataImportCell) + to better support updating tabular attributes. +* Support has been added for Device Code Flow, this makes it easier to use the Scripting Toolkit in environments where a + web browser is not available. Use [`OIDC.authorize_with_device_code_flow()`](../foundation_api.md#ansys.grantami.backend.soap.OIDC.OIDC.authorize_with_device_code_flow) to authenticate. +* The Foundation API now follows PEP 8 formatting guidelines. + + + +## Documentation + +* Added new example [Data with Precision](../samples/streamlined/14_Data_with_Precision.md). +* Removed example `Create Functional Data`. See [Data analytics example notebooks](../examples/data_analytics_examples.md) for examples that show how + to fit raw test data. +* Replaced example `Import Functional Data` with [Float Functional Data](../samples/streamlined/10_Edit_Float_Functional_Data.md). +* Replaced examples `Edit Tabular Data` and `Create and edit tabular data` with new examples + [Local Tabular Data](../samples/streamlined/11_Edit_Local_Tabular_Data.md) and [Linked Tabular Data](../samples/streamlined/12_Edit_Linked_Tabular_Data.md). +* Added new section [Package overview](../user_guide/package_overview.md). This section provides an overview of the structure of MI Scripting Toolkit + and guidance on direct use of the Foundation API. +* Added new section [Exceptions](../user_guide/exceptions.md). This section describes the different exceptions raised by MI Scripting Toolkit, + and how to handle them appropriately. +* Improved [Streamlined API reference](../streamlined_api/index.md) by adding additional cross-reference for parameter types, guidance around which + methods and properties trigger Service Layer calls, and how to obtain correctly-instantiated classes for existing + Granta MI items. diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/release_notes/deprecations.md b/2026R1/scripting-toolkit-dev-portal-26-r1/release_notes/deprecations.md new file mode 100644 index 0000000000..717dc10ea8 --- /dev/null +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/release_notes/deprecations.md @@ -0,0 +1,55 @@ +# Planned changes and deprecations + + + + + +This section describes deprecated functionality which will be removed or changed in a future release. + + + +## Functionality deprecated with version 5.0 + +| Deprecated functionality | Recommended replacement / future functionality | +|-------------------------------------------------------|------------------------------------------------------------------------------| +| Installing `GRANTA_MIScriptingToolkit` | Install `ansys-grantami-core` or `ansys-grantami-backend-soap` | +| `from GRANTA_MIScriptingToolkit import granta as mpy` | Import the streamlined layer with `import ansys.grantami.core as mpy` | +| `import GRANTA_MIScriptingToolkit as gdl` | Import the foundation layer with `import ansys.grantami.backend.soap as gdl` | + + + + + +## Planned file and picture data changes + +The [`BinaryType`](../streamlined_api/supporting.md#ansys.grantami.core.mi_attribute_value_classes.BinaryType) class, all classes derived from [`BinaryType`](../streamlined_api/supporting.md#ansys.grantami.core.mi_attribute_value_classes.BinaryType), and the [`AttributeBinary`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeBinary) +`object` property are currently supported, but will be deprecated from version 5.1 and will generate an +[`APIDeprecationWarning`](../streamlined_api/exceptions.md#ansys.grantami.core.mi_meta_classes.APIDeprecationWarning) if used. + +The table below lists the preferred [`AttributeBinary`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeBinary) methods and properties to use instead, along with any +planned changes to those replacements. In this table, `include_binary_data` refers to the [`Table.bulk_fetch()`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.bulk_fetch) +argument `include_binary_data`, which is used to control the file and picture representation. +`include_binary_data = True` exports the binary data, and `include_binary_data = False` exports a URL. + +| Planned deprecation | Preferred replacement | Preferred replacement behavior changes | +|----------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| [`AttributeBinary`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeBinary) `object` | No replacement | None | +| [`BinaryType.load()`](../streamlined_api/supporting.md#ansys.grantami.core.mi_attribute_value_classes.BinaryType.load) | [`AttributeFile.load()`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeFile.load) or
[`AttributePicture.load()`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributePicture.load) | None | +| [`BinaryType.save()`](../streamlined_api/supporting.md#ansys.grantami.core.mi_attribute_value_classes.BinaryType.save) | [`AttributeFile.save()`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeFile.save) or
[`AttributePicture.save()`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributePicture.save) | None | +| [`BinaryType.is_empty`](../streamlined_api/supporting.md#ansys.grantami.core.mi_attribute_value_classes.BinaryType.is_empty) | [`AttributeBinary.is_empty()`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeBinary.is_empty) | None | +| [`BinaryType.binary_data`](../streamlined_api/supporting.md#ansys.grantami.core.mi_attribute_value_classes.BinaryType.binary_data) | [`AttributeBinary.binary_data`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeBinary.binary_data) | None | +| [`BinaryType.url`](../streamlined_api/supporting.md#ansys.grantami.core.mi_attribute_value_classes.BinaryType.url) | [`AttributeBinary.url`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeBinary.url) | * v5.0: [`AttributeBinary.url`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeBinary.url) returns [`None`](https://docs.python.org/3/library/constants.html#None) if binary data is exported.
* v5.1: An [`APIDeprecationWarning`](../streamlined_api/exceptions.md#ansys.grantami.core.mi_meta_classes.APIDeprecationWarning) will be raised before returning [`None`](https://docs.python.org/3/library/constants.html#None).
* Later release: An exception will be raised. | +| [`BinaryType.value`](../streamlined_api/supporting.md#ansys.grantami.core.mi_attribute_value_classes.BinaryType.value) after
`include_binary_data = True` | [`AttributeBinary.value`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeBinary.value) | * v5.0: [`AttributeBinary.value`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeBinary.value) returns binary data only and raises a
[`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError) if binary data is not exported.
* v5.1: An [`APIDeprecationWarning`](../streamlined_api/exceptions.md#ansys.grantami.core.mi_meta_classes.APIDeprecationWarning) will be raised before the exception.
* Later release: No exception will be raised. The property will return either the
URL or binary data depending on the export type, or [`None`](https://docs.python.org/3/library/constants.html#None) if the attribute is empty. | +| [`BinaryType.value`](../streamlined_api/supporting.md#ansys.grantami.core.mi_attribute_value_classes.BinaryType.value) after
`include_binary_data = False` | No replacement | | +| [`BinaryType.mime_file_type`](../streamlined_api/supporting.md#ansys.grantami.core.mi_attribute_value_classes.BinaryType.mime_file_type) | [`AttributeBinary.mime_file_type`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeBinary.mime_file_type) | None | +| [`File.file_name`](../streamlined_api/supporting.md#ansys.grantami.core.mi_attribute_value_classes.File.file_name) | [`AttributeFile.file_name`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeFile.file_name) | None | +| [`File.description`](../streamlined_api/supporting.md#ansys.grantami.core.mi_attribute_value_classes.File.description) | [`AttributeFile.description`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeFile.description) | None | + +Similar [`PictureValue`](../streamlined_api/tabular.md#ansys.grantami.core._mi_tabular_value_classes.PictureValue), [`LocalPictureValue`](../streamlined_api/tabular.md#ansys.grantami.core._mi_tabular_value_classes.LocalPictureValue), [`FileValue`](../streamlined_api/tabular.md#ansys.grantami.core._mi_tabular_value_classes.FileValue), and [`LocalFileValue`](../streamlined_api/tabular.md#ansys.grantami.core._mi_tabular_value_classes.LocalFileValue) tabular +cell behavior will also be deprecated from version 5.1 and will generate an [`APIDeprecationWarning`](../streamlined_api/exceptions.md#ansys.grantami.core.mi_meta_classes.APIDeprecationWarning) if used. +There are no replacements for the current behavior: + +| Planned deprecation | Behavior changes | +|------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `url` property after `include_binary_data = True` | * v5.0: Returns [`None`](https://docs.python.org/3/library/constants.html#None).
* v5.1: [`APIDeprecationWarning`](../streamlined_api/exceptions.md#ansys.grantami.core.mi_meta_classes.APIDeprecationWarning) raised.
* Later release: Exception raised. | +| `value` property after `include_binary_data = False` | * v5.0: Returns [`None`](https://docs.python.org/3/library/constants.html#None).
* v5.1: Returns [`None`](https://docs.python.org/3/library/constants.html#None).
* Later release: Returns URL. | diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/release_notes/index.md b/2026R1/scripting-toolkit-dev-portal-26-r1/release_notes/index.md new file mode 100644 index 0000000000..30424f06a9 --- /dev/null +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/release_notes/index.md @@ -0,0 +1,11 @@ +# Release notes + + + + + +* [What’s new in 5.0](whats_new.md) +* [Enhancements and bug fixes](bug_fixes_and_enhancements.md) +* [Upgrading from earlier versions](breaking_changes.md) +* [Planned changes and deprecations](deprecations.md) +* [Known issues](known_issues.md) diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/release_notes/known_issues.md b/2026R1/scripting-toolkit-dev-portal-26-r1/release_notes/known_issues.md new file mode 100644 index 0000000000..88654c42ab --- /dev/null +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/release_notes/known_issues.md @@ -0,0 +1,77 @@ +# Known issues + + + + + + + +## OIDC and parallel operation + +`parallelize=True` should not be used for bulk methods when authenticating with OIDC if the script is expected to +run for longer than the lifetime of the issued access token. Authentication issues may occur if the access token +expires during parallel operation. Access tokens typically have a lifetime of 1 hour, though this may vary depending +on the identity provider configuration. + +This impacts the following methods: + +* [`Session.bulk_fetch_release_states()`](../streamlined_api/session.md#ansys.grantami.core.mi.Session.bulk_fetch_release_states) +* [`Session.bulk_delete_or_withdraw_records()`](../streamlined_api/session.md#ansys.grantami.core.mi.Session.bulk_delete_or_withdraw_records) +* [`Table.bulk_fetch()`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.bulk_fetch) +* [`Table.bulk_link_fetch()`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.bulk_link_fetch) +* [`Table.bulk_fetch_associated_records()`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.bulk_fetch_associated_records) +* [`Table.bulk_fetch_data_revision_history()`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.bulk_fetch_data_revision_history) +* [`Table.bulk_fetch_all_record_versions()`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.bulk_fetch_all_record_versions) + + + +## Other known issues + +* If an attribute is exported with the [`Table.bulk_fetch()`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.bulk_fetch) method with `include_binary_data=False`, subsequent + values returned by the `AttributePicture.mime_file_type` property will always return `image/png`, regardless of + the actual image format. The header returned when accessing the URL is unaffected and should be used instead. +* The behavior of [`Table.get_record_by_lookup_value()`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.get_record_by_lookup_value) when a non-unique lookup value is provided is dependent on + the Granta MI version. In Granta MI 2025 R2 and later, if multiple matches are detected, no results are returned. In + earlier Granta MI versions, an exception is raised. +* If an attribute is removed from the Granta MI database after the parent [`Database`](../streamlined_api/database.md#ansys.grantami.core.mi_tree_classes.Database) is first accessed, calls to + [`Table.refresh_attributes()`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.refresh_attributes) raise a [`GRANTA_ServiceLayerError`](../foundation_api.md#ansys.grantami.backend.soap.GRANTA_Exceptions.GRANTA_ServiceLayerError). Use [`Database.refresh_tables()`](../streamlined_api/database.md#ansys.grantami.core.mi_tree_classes.Database.refresh_tables) + instead. +* In version-controlled tables, [`DataRevisionHistory`](../streamlined_api/supporting.md#ansys.grantami.core.mi_meta_classes.DataRevisionHistory) objects have an ambiguous meaning. The + `history.last_modified_date` for the following attribute types is updated when the release state of the parent + record is modified: + - Date + - Hyperlink + - Integer + - Logical + - Range + - Short text + + The `history.last_modified_date` for the following attribute types is *not* updated when the release state of the + parent record is modified: + - Discrete + - File + - Functional + - Long text + - Picture + - Point + - Tabular +* The following hyperlink display options available in MI Viewer are not supported by + [`AttributeHyperlink.hyperlink_display`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeHyperlink.hyperlink_display) or [`LocalHyperlinkValue.hyperlink_display`](../streamlined_api/tabular.md#ansys.grantami.core._mi_tabular_value_classes.LocalHyperlinkValue.hyperlink_display): + - Current pane + - Left browse pane + - Both panes below toolbar + + If a hyperlink attribute value or cell with one of these three display options is exported, the + [`hyperlink_display`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeHyperlink.hyperlink_display) or + [`hyperlink_display`](../streamlined_api/tabular.md#ansys.grantami.core._mi_tabular_value_classes.LocalHyperlinkValue.hyperlink_display) will be set to + `Content`. + If the attribute is subsequently re-imported, the display option in MI Viewer will be changed to “Right content pane”. +* Point and range local tabular data cells do not currently support trailing zeros. Any values with significant figures + information that are imported by setting + [`PointValueWithParameters.sig_figs_for_import`](../foundation_api.md#ansys.grantami.backend.soap.PointValueWithParameters.PointValueWithParameters.sig_figs_for_import), + [`RangeDataType.low_value_sig_figs_for_import`](../foundation_api.md#ansys.grantami.backend.soap.RangeDataType.RangeDataType.low_value_sig_figs_for_import), + or [`RangeDataType.high_value_sig_figs_for_import`](../foundation_api.md#ansys.grantami.backend.soap.RangeDataType.RangeDataType.high_value_sig_figs_for_import) + as part of a tabular data import operation, will have the significant figures information removed. +* [`Session.persist_oidc_token()`](../streamlined_api/session.md#ansys.grantami.core.mi.Session.persist_oidc_token) raises a `win32ctypes.pywin32.pywintypes.error` when it is used to persist + a refresh token longer than 1280 characters in the Windows Credential Manager. If this error is raised, use an + alternative keyring backend. A list of alternative backends are available on the [keyring PyPI page](https://pypi.org/project/keyring/). diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/release_notes/whats_new.md b/2026R1/scripting-toolkit-dev-portal-26-r1/release_notes/whats_new.md new file mode 100644 index 0000000000..1d2e35514c --- /dev/null +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/release_notes/whats_new.md @@ -0,0 +1,471 @@ +# What’s new in 5.0 + + + + + +MI Scripting Toolkit 5.0 is a major release. + +Support has been added for import and export of precision information for point and range values, and is described in +[Trailing zeros and precision](#whats-new-precision). + +Additionally, significant improvements have been made to existing functionality in the following areas: + +* [Installation and imports](#whats-new-installation-and-imports) +* [Session construction](#whats-new-session-construction) +* [Attribute values](#whats-new-attribute-value) +* [Invalid operations on staged records](#whats-new-staged-record-behavior) + + + + + +## Trailing zeros and precision + +Support has been added for precision information on point and range attributes. This allows both the export of trailing +zero information from Granta MI databases and the import of values with specified significant figures. + + + +### Export of trailing zero information + +Trailing zero information can be exported from point and range attributes via the following properties: + +* [`AttributePointSingle.trailing_zero_information`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributePointSingle.trailing_zero_information) +* [`AttributePointMulti.trailing_zero_information`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributePointMulti.trailing_zero_information) +* [`AttributeRange.low_value_trailing_zero_information`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeRange.low_value_trailing_zero_information) and + [`AttributeRange.high_value_trailing_zero_information`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeRange.high_value_trailing_zero_information) + +These properties return [`TrailingZeroInformation`](../streamlined_api/supporting.md#ansys.grantami.core.mi_meta_classes.TrailingZeroInformation) objects, which describe +how many digits in the float value are significant. + + + +### Import of values with significant figures + +Attribute values with significant figures can be imported to point and range attributes via the following properties: + +* [`AttributePointSingle.value`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributePointSingle.value) +* [`AttributePointMulti.value`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributePointMulti.value) +* [`AttributeRange.value`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeRange.value) + +These properties now accept [`ValueWithPrecision`](../streamlined_api/supporting.md#ansys.grantami.core.mi_meta_classes.ValueWithPrecision) instances as alternative inputs to [`float`](https://docs.python.org/3/library/functions.html#float) values. The +number of significant figures [`ValueWithPrecision.significant_figures`](../streamlined_api/supporting.md#ansys.grantami.core.mi_meta_classes.ValueWithPrecision.significant_figures), evaluated from the provided +[`ValueWithPrecision.value`](../streamlined_api/supporting.md#ansys.grantami.core.mi_meta_classes.ValueWithPrecision.value) and [`ValueWithPrecision.number_of_digits`](../streamlined_api/supporting.md#ansys.grantami.core.mi_meta_classes.ValueWithPrecision.number_of_digits), is added to the attribute value +during import. + +See [Data with Precision](../samples/streamlined/14_Data_with_Precision.md) for examples of the new functionality. + + + + + +## Installation and imports + +The MI Scripting Toolkit streamlined API is now provided by `ansys-grantami-core`. This package has a dependency on the +Foundation API, which is provided by `ansys-grantami-backend-soap`. Both packages are delivered together. See +[Getting started](../getting_started/index.md) for how to install the packages, and [Package overview](../user_guide/package_overview.md) for more detail +on how MI Scripting Toolkit is structured. + + + +The `GRANTA_MIScriptingToolkit` package (referred to as the *compatibility package*) is provided for backwards +compatibility purposes and may be installed if required. It will be installed by default if upgrading an existing +installation. + + + +### Streamlined API + +The streamlined API should be accessed by importing `ansys.grantami.core`. Imports from +`GRANTA_MIScriptingToolkit.granta` are allowed if the *compatibility package* is installed, but are deprecated. +Imports from `GRANTA_MIScriptingToolkit.granta` subpackages are not allowed: + +* `from GRANTA_MIScriptingToolkit import granta as mpy` is permitted, but emits an [`APIDeprecationWarning`](../streamlined_api/exceptions.md#ansys.grantami.core.mi_meta_classes.APIDeprecationWarning). +* `from GRANTA_MIScriptingToolkit.granta import Record` is permitted, but emits an [`APIDeprecationWarning`](../streamlined_api/exceptions.md#ansys.grantami.core.mi_meta_classes.APIDeprecationWarning). +* `from GRANTA_MIScriptingToolkit.granta.mi_record_classes import Record` is no longer allowed and raises an + [`ImportError`](https://docs.python.org/3/library/exceptions.html#ImportError). + + + +### Foundation API + +The foundation API should be accessed by importing `ansys.grantami.backend.soap`. Imports from +`GRANTA_MIScriptingToolkit` are allowed if the *compatibility package* is installed, but are deprecated. Imports from +`GRANTA_MIScriptingToolkit` subpackages are not allowed: + +* `import GRANTA_MIScriptingToolkit as gdl` is permitted, but emits an [`APIDeprecationWarning`](../streamlined_api/exceptions.md#ansys.grantami.core.mi_meta_classes.APIDeprecationWarning). +* `from GRANTA_MIScriptingToolkit import RecordReference` is permitted, but emits an [`APIDeprecationWarning`](../streamlined_api/exceptions.md#ansys.grantami.core.mi_meta_classes.APIDeprecationWarning). +* `from GRANTA_MIScriptingToolkit.RecordReference import RecordReference` is no longer allowed and raises an + [`ImportError`](https://docs.python.org/3/library/exceptions.html#ImportError). + + + + + +## Session construction + +Connecting to Granta MI is now done with a [`SessionBuilder`](../streamlined_api/session.md#ansys.grantami.core.mi.SessionBuilder) class. Once the connection is complete, a +[`Session`](../streamlined_api/session.md#ansys.grantami.core.mi.Session) object is returned. New [`OIDCSessionBuilder`](../streamlined_api/session.md#ansys.grantami.core.mi.OIDCSessionBuilder) and [`SessionConfiguration`](../streamlined_api/session.md#ansys.grantami.core.mi.SessionConfiguration) classes have +also been introduced to support the [`SessionBuilder`](../streamlined_api/session.md#ansys.grantami.core.mi.SessionBuilder) class. + +Direct use of the [`Session`](../streamlined_api/session.md#ansys.grantami.core.mi.Session) constructor is available if importing the Streamlined API via the +[compatibility package](#whats-new-compatibility-package), but is deprecated. + + + + + +## Attribute values + +Significant changes have been made to [`AttributeValue`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeValue) in this release, to better +represent the underlying Granta MI behavior. These changes bring the following benefits: + +* Better client-side validation. More checks are performed when the Python objects are modified, ensuring the data is + compatible with Granta MI when imported. +* More representative classes for attribute sub-types, for example multi-value vs single-value attributes and series vs + grid functional data. The allowed types are now narrower and more specific, making the streamlined API easier to use. +* More predictable behavior via the use of immutable types. Attribute values now make use of tuples instead of lists, + which allows for additional validation and fewer side effects. + +The following attribute values have changed significantly in this release and are described in the following +sub-sections: + +* [AttributeDate](#whats-new-attribute-date) +* [AttributePoint](#whats-new-attribute-point) +* [AttributeDiscrete](#whats-new-attribute-discrete) +* [AttributeRange](#whats-new-attribute-range) +* [AttributeHyperlink](#whats-new-attribute-hyperlink) +* [Float functional attributes](#whats-new-attribute-float-functional) +* [AttributeTabular](#whats-new-attribute-tabular) + +Additionally, the following changes have been made to other attribute values: + +* [`AttributeLogical.value`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeLogical.value) now defaults to [`None`](https://docs.python.org/3/library/constants.html#None). +* [`AttributePicture.value`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributePicture.value), [`AttributePicture.mime_file_type`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributePicture.mime_file_type), and + [`AttributePicture.url`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributePicture.url) now default to [`None`](https://docs.python.org/3/library/constants.html#None). +* [`AttributeFile.value`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeFile.value), [`AttributeFile.mime_file_type`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeFile.mime_file_type), and + [`AttributeFile.url`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeFile.url) now default to [`None`](https://docs.python.org/3/library/constants.html#None). +* [`AttributeFile.file_name`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeFile.file_name) now defaults to the attribute name instead of an empty string. +* [`AttributeBinary`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeBinary), [`AttributeDate`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeDate), [`AttributeDiscrete`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeDiscrete), [`AttributeHyperlink`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeHyperlink), + [`AttributeInteger`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeInteger), [`AttributeLogical`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeLogical), [`AttributeTabular`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeTabular), [`AttributeShortText`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeShortText), + [`AttributeLongText`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeLongText), and [`AttributeUnsupported`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeUnsupported) no longer have `unit` properties. + + + + + +### [`AttributeDate`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeDate) + +[`AttributeDate.value`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeDate.value) now only supports [`date`](https://docs.python.org/3/library/datetime.html#datetime.date) objects: + +* Values exported from Granta MI are represented as [`date`](https://docs.python.org/3/library/datetime.html#datetime.date) objects instead of + [`datetime`](https://docs.python.org/3/library/datetime.html#datetime.datetime) objects set to midnight on the appropriate date. +* Values to be imported to Granta MI must be specified as [`date`](https://docs.python.org/3/library/datetime.html#datetime.date) objects. [`datetime`](https://docs.python.org/3/library/datetime.html#datetime.datetime) + and [`str`](https://docs.python.org/3/library/stdtypes.html#str) objects are no longer supported. + +The following additional enhancements have been made to [`AttributeDate`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeDate): + +* The `AttributeDate.value_as_string` property has been removed. Instead, use [`isoformat()`](https://docs.python.org/3/library/datetime.html#datetime.date.isoformat) on + the output of [`AttributeDate.value`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeDate.value). +* Setting a date attribute to a value earlier than 1st January 1753 now raises a [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError) immediately. + Previously, a non-descriptive error would be raised on import. + + + + + +### [`AttributePoint`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributePoint) + +[`AttributePoint`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributePoint) has been split into [`AttributePointSingle`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributePointSingle) and [`AttributePointMulti`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributePointMulti). + +[`AttributePointSingle`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributePointSingle) represents attribute values for point attributes defined as not allowing multiple +values: + +* [`AttributePointSingle.value`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributePointSingle.value) only accepts scalar inputs. +* Single point attributes do not include parameters. + +[`AttributePointMulti`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributePointMulti) represents attribute values for point attributes defined as allowing multiple values: + +* [`AttributePointMulti.value`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributePointMulti.value) only accepts tuples of [`ParameterizedPointValue`](../streamlined_api/supporting.md#ansys.grantami.core._mi_value_classes.ParameterizedPointValue) as input. +* Parameter values are included in the [`ParameterizedPointValue`](../streamlined_api/supporting.md#ansys.grantami.core._mi_value_classes.ParameterizedPointValue) values. +* The property `AttributePointMulti.parameter_definitions` has been removed. [`AttributePointMulti`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributePointMulti) defines + an [`AttributePointMulti.parameters`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributePointMulti.parameters) property, which describes parameters of the attribute and their current + unit. + +The following additional enhancements have been made to point attribute values: + +* [`AttributePointSingle.value`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributePointSingle.value) and [`AttributePointMulti.value`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributePointMulti.value) both default to [`None`](https://docs.python.org/3/library/constants.html#None) for empty or + not applicable attribute values. +* Invalid inputs now raise a [`TypeError`](https://docs.python.org/3/library/exceptions.html#TypeError). +* [`AttributePointSingle.default_unit`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributePointSingle.default_unit) and [`AttributePointMulti.default_unit`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributePointMulti.default_unit) return the default unit for + the point attribute as defined in the attribute definition, but converted to the active unit system. +* The methods [`AttributePointMulti.set_value()`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributePointMulti.set_value) and [`AttributePointSingle.set_value()`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributePointSingle.set_value) have been added to + support setting the attribute value from a broader set of types. +* The `unit` property now returns [`None`](https://docs.python.org/3/library/constants.html#None) for dimensionless attributes, instead of an empty string. +* Point attribute values now support precision information. See [Trailing zeros and precision](#whats-new-precision) for more + details. + + + + + +### [`AttributeDiscrete`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeDiscrete) + +[`AttributeDiscrete`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeDiscrete) has been split into [`AttributeDiscreteSingle`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeDiscreteSingle) and [`AttributeDiscreteMulti`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeDiscreteMulti). + +[`AttributeDiscreteSingle`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeDiscreteSingle) represents attribute values for discrete attributes defined as not allowing multiple +values: + +* [`AttributeDiscreteSingle.value`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeDiscreteSingle.value) only accepts string inputs. A list of strings is not permitted. +* [`AttributeDiscreteSingle.order`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeDiscreteSingle.order) is now a single integer value. + +[`AttributeDiscreteMulti`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeDiscreteMulti) represents attribute values for discrete attributes defined as allowing multiple +values: + +* [`AttributeDiscreteMulti.value`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeDiscreteMulti.value) now returns a tuple of strings, and only accepts a tuple of strings as input. A + single string is not permitted. +* [`AttributeDiscreteMulti.order`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeDiscreteMulti.order) is a tuple of integers. + +The following additional enhancements have been made to discrete attribute values: + +* [`AttributeDiscreteSingle.value`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeDiscreteSingle.value) and [`AttributeDiscreteMulti.order`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeDiscreteMulti.order) both default to [`None`](https://docs.python.org/3/library/constants.html#None) for empty + or not applicable attribute values. +* Properties [`AttributeDiscreteSingle.order`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeDiscreteSingle.order) and [`AttributeDiscreteMulti.order`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeDiscreteMulti.order) are now updated when + [`AttributeDiscreteSingle.value`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeDiscreteSingle.value) or [`AttributeDiscreteMulti.value`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeDiscreteMulti.value) are modified. + + + + + +### [`AttributeRange`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeRange) + +The interface for range attribute values has changed significantly since the previous release. + +#### WARNING +Any code that uses the v4.2 `AttributeRange` class will need to be modified when upgrading to v5.0. + +[`AttributeRange.value`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeRange.value) can now only be set to an instance of [`Range`](../streamlined_api/supporting.md#ansys.grantami.core._mi_value_classes.Range): + +* [`Range`](../streamlined_api/supporting.md#ansys.grantami.core._mi_value_classes.Range) is a frozen dataclass. +* The alternative constructor [`Range.from_data()`](../streamlined_api/supporting.md#ansys.grantami.core._mi_value_classes.Range.from_data) supports previously accepted range values (see + [`Range_Value_Type`](../streamlined_api/supporting.md#ansys.grantami.core._mi_value_classes.Range_Value_Type)). +* [`Range.as_dict()`](../streamlined_api/supporting.md#ansys.grantami.core._mi_value_classes.Range.as_dict) returns a dictionary of low and high values, identical to the value previously returned by + [`AttributeRange.value`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeRange.value) for exported attribute values. +* [`AttributeRange.value`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeRange.value) returns [`None`](https://docs.python.org/3/library/constants.html#None) for empty or not applicable attribute values, and a [`Range`](../streamlined_api/supporting.md#ansys.grantami.core._mi_value_classes.Range) + object otherwise. + +The following additional enhancements have been made to [`AttributeRange`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeRange): + +* Added properties [`AttributeRange.low`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeRange.low) and [`AttributeRange.high`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeRange.high) to access the low and high values of a + range attribute. These properties always return [`float`](https://docs.python.org/3/library/functions.html#float), [`ValueWithPrecision`](../streamlined_api/supporting.md#ansys.grantami.core.mi_meta_classes.ValueWithPrecision), or [`None`](https://docs.python.org/3/library/constants.html#None) (for + open-ended ranges), not [`int`](https://docs.python.org/3/library/functions.html#int). +* [`AttributeRange.default_unit`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeRange.default_unit) returns the default unit for the attribute as defined in the attribute + definition, but converted to the active unit system. +* [`AttributeRange.unit`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeRange.unit) now returns [`None`](https://docs.python.org/3/library/constants.html#None) for dimensionless attributes, instead of an empty string. +* Range attribute values now support precision information. See [Trailing zeros and precision](#whats-new-precision) for more details. + + + + + +### [`AttributeHyperlink`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeHyperlink) + +* The property `.object` has been removed from [`AttributeHyperlink`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeHyperlink). Use the properties + [`AttributeHyperlink.value`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeHyperlink.value), [`AttributeHyperlink.hyperlink_display`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeHyperlink.hyperlink_display), and + [`AttributeHyperlink.hyperlink_description`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeHyperlink.hyperlink_description) + instead. +* Properties [`AttributeHyperlink.hyperlink_description`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeHyperlink.hyperlink_description), [`AttributeFile.description`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeFile.description), + [`AttributeFile.url`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeFile.url), and [`AttributePicture.url`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributePicture.url) now return [`None`](https://docs.python.org/3/library/constants.html#None) if properties are not set, + instead of an empty string. + + + + + +### Float functional attributes + +The interface for float functional attribute values has changed significantly since the previous release. + +#### WARNING +Any code that uses the v4.2 `AttributeFunctional` class will need to be modified when upgrading to v5.0. + +These changes were required for the following reasons: + +* To support series functional data where multiple series share the same set of parameter values. In previous versions, + it was not possible to determine which data points belonged to which series. +* To support enhanced validation. In previous versions, it was possible to create invalid functional data objects + that would only fail when import was attempted. +* To support greater control over datum-level parameter settings. In previous versions, it was not possible to + fully specify datum-level parameter settings, or to determine if a parameter setting was inherited or set directly. + +As a result of these changes, there is now a greater reliance on immutable data types in the functional data interface. +Immutable data types allow for enhanced validation of the data, because the data can be validated when it is assigned +to the attribute, and cannot subsequently be modified to an invalid state. New classes have been defined to represent +grid and series functional data for both point and range data types. These classes ensure that the data provided is +compatible with the schema definition of the attribute. + +See [Float Functional Data](../samples/streamlined/10_Edit_Float_Functional_Data.md) for an example of interacting with the new float +functional data interface. + + + +#### Attribute value changes + +* `FunctionalSeries` has been split into two new classes to represent point and range series data. These changes allow + the representation of series data where multiple series share the same set of parameter values. The list below + contains the new classes, and the specific types accepted by the `.value` property: + * [`AttributeFunctionalSeriesPoint.value`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalSeriesPoint.value) accepts a [`tuple`](https://docs.python.org/3/library/stdtypes.html#tuple) of [`SeriesPoint`](../streamlined_api/supporting.md#ansys.grantami.core._mi_value_classes.SeriesPoint) objects. + * [`AttributeFunctionalSeriesRange.value`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalSeriesRange.value) accepts a [`tuple`](https://docs.python.org/3/library/stdtypes.html#tuple) of [`SeriesRange`](../streamlined_api/supporting.md#ansys.grantami.core._mi_value_classes.SeriesRange) objects. +* `FunctionalGrid` has been split into two separate classes to represent point and range grid data. The `.value` + property for each of these classes accepts specific objects as described below: + * [`AttributeFunctionalGridPoint.value`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalGridPoint.value) accepts a [`GridPoint`](../streamlined_api/supporting.md#ansys.grantami.core._mi_value_classes.GridPoint) object. + * [`AttributeFunctionalGridRange.value`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalGridRange.value) accepts a [`GridRange`](../streamlined_api/supporting.md#ansys.grantami.core._mi_value_classes.GridRange) object. +* `FunctionalSeries.hide_graph` has been renamed to `show_as_table`. This is available on + [`AttributeFunctionalSeriesPoint`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalSeriesPoint.show_as_table) and + [`AttributeFunctionalSeriesRange`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalSeriesRange.show_as_table) classes. +* By default, the methods `generate_grid_version()` or `generate_series_version()` on + [`AttributeFunctionalSeriesPoint`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalSeriesPoint.generate_grid_version), + [`AttributeFunctionalSeriesRange`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalSeriesRange.generate_grid_version), + [`AttributeFunctionalGridPoint`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalGridPoint.generate_series_version), and + [`AttributeFunctionalGridRange`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalGridRange.generate_series_version) classes + copy the data, unit, datum parameter settings, and applicableness to the new attribute value. The + optional parameter `create_empty` can be set to `True` to create empty versions of the attribute values + instead. +* Removed `AttributeFunctionalSeries.series_linestyles` and `AttributeFunctionalGrid.linestyle`. Use the + `decoration` property available for [`SeriesPoint`](../streamlined_api/supporting.md#ansys.grantami.core._mi_value_classes.SeriesPoint.decoration), + [`SeriesRange`](../streamlined_api/supporting.md#ansys.grantami.core._mi_value_classes.SeriesRange.decoration), [`GridPoint`](../streamlined_api/supporting.md#ansys.grantami.core._mi_value_classes.GridPoint.decoration) and + [`GridRange`](../streamlined_api/supporting.md#ansys.grantami.core._mi_value_classes.GridRange.decoration) classes instead. +* Removed `AttributeFunctional.clear()`. Set the `.value` to [`None`](https://docs.python.org/3/library/constants.html#None). +* The functional data representation from previous versions is available as the read-only property `table_view` for + [`AttributeFunctionalSeriesPoint`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalSeriesPoint.table_view), + [`AttributeFunctionalSeriesRange`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalSeriesRange.table_view), + [`AttributeFunctionalGridPoint`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalGridPoint.table_view), and + [`AttributeFunctionalGridRange`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalGridRange.table_view) classes. +* The methods [`AttributeFunctionalSeriesPoint.set_value()`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalSeriesPoint.set_value) and [`AttributeFunctionalSeriesRange.set_value()`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalSeriesRange.set_value) + have been added to support setting the attribute value from any sequence of series objects. +* The `unit` property on functional attribute classes now returns [`None`](https://docs.python.org/3/library/constants.html#None) for dimensionless attributes, instead of + an empty string. + + + +#### X-axis changes + +* `AttributeFunctional.xaxis_parameter` has been removed. To access x-axis parameter information, use the `x_axis` + property to obtain the x-axis parameter name, and provide the result to the `parameters` mapping. The `x_axis` + property is available for [`AttributeFunctionalSeriesPoint`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalSeriesPoint.x_axis), + [`AttributeFunctionalSeriesRange`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalSeriesRange.x_axis), + [`AttributeFunctionalGridPoint`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalGridPoint.x_axis), and + [`AttributeFunctionalGridRange`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalGridRange.x_axis) classes. +* The mapping `AttributeFunctional.xaxis` has been removed. Use `with_new_x_axis()`, to create an attribute value + with a different x-axis. This method is available for + [`AttributeFunctionalSeriesPoint`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalSeriesPoint.with_new_x_axis), + [`AttributeFunctionalSeriesRange`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalSeriesRange.with_new_x_axis), + [`AttributeFunctionalGridPoint`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalGridPoint.with_new_x_axis), and + [`AttributeFunctionalGridRange`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalGridRange.with_new_x_axis) classes. + + + +#### Parameter changes + +* The `parameters` property, available for + [`AttributeFunctionalSeriesPoint`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalSeriesPoint.parameters), + [`AttributeFunctionalSeriesRange`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalSeriesRange.parameters), + [`AttributeFunctionalGridPoint`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalGridPoint.parameters), and + [`AttributeFunctionalGridRange`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalGridRange.parameters), + now returns a mapping of parameter names to [`FunctionalValueParameter`](../streamlined_api/supporting.md#ansys.grantami.core.mi_attribute_value_classes.FunctionalValueParameter) objects. +* [`FunctionalValueParameter`](../streamlined_api/supporting.md#ansys.grantami.core.mi_attribute_value_classes.FunctionalValueParameter) objects hold information about datum level parameter settings. If these properties + are set, they represent a datum-specific setting for that parameter which may override an attribute-level setting. If + they are set to [`None`](https://docs.python.org/3/library/constants.html#None), this specifies that the particular setting is inherited from the attribute parameter + definition. In this case, the inherited value is available in the corresponding ‘effective’ property. See the API + reference for more details. + + + + + +### [`AttributeTabular`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeTabular) + +The interface for tabular attribute values has changed significantly since the previous release. + +#### WARNING +Any code that uses the v4.2 `AttributeTabular` class will need to be modified when upgrading to v5.0. + +These changes were required to allow a more granular and efficient way to edit and import data. In previous versions of +MI Scripting Toolkit, tabular data was imported as a whole object, even when updating a single cell. This could cause a large +overhead when interacting with tabular attributes with many rows, and with binary columns. + +As a result of these changes, the interface now provides more information about rows and cells, and improves performance +in scenarios where only a subset of the table data is modified. + +New classes have been added to represent tabular rows and cells. These ensure that data provided is consistent with the +schema definition of the attribute. + + + +#### Attribute value changes + +* New class [`TabularRow`](../streamlined_api/tabular.md#ansys.grantami.core.mi_attribute_value_classes.TabularRow) represents a row in a tabular attribute value. The row provides access to the linking + value of the row, the row identifier and the cells in the row. The cells can be accessed as a tuple via + [`TabularRow.cells`](../streamlined_api/tabular.md#ansys.grantami.core.mi_attribute_value_classes.TabularRow.cells), or as a mapping from column name to cell via [`TabularRow.cells_by_column`](../streamlined_api/tabular.md#ansys.grantami.core.mi_attribute_value_classes.TabularRow.cells_by_column). +* A new property [`AttributeTabular.rows`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeTabular.rows) provides access to the rows of the table as a sequence of + [`TabularRow`](../streamlined_api/tabular.md#ansys.grantami.core.mi_attribute_value_classes.TabularRow) objects. +* The `.value` property on [`AttributeTabular`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeTabular) is now read-only, replicating where possible the existing + interface. All updates should be performed via the new interface. +* The `.add_row` method on [`AttributeTabular`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeTabular) has been renamed to [`AttributeTabular.append_row()`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeTabular.append_row), to + better reflect its behavior. +* The `.units` property has been removed from [`AttributeTabular`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeTabular). To access the units as defined on the + column, use the [`AttributeDefinitionTabular.column_units`](../streamlined_api/attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinitionTabular.column_units) property. To access the unit for a specific cell, + use the [`RangeValue.unit`](../streamlined_api/tabular.md#ansys.grantami.core._mi_tabular_value_classes.RangeValue.unit) or [`PointValue.unit`](../streamlined_api/tabular.md#ansys.grantami.core._mi_tabular_value_classes.PointValue.unit) property on the cell. +* Direct indexing of the tabular attribute value to access rows has been removed. +* Operations which can cause data loss for users of Data Updater have been disabled by default. To enable them for a + specific attribute value, call [`AttributeTabular.enable_destructive_editing()`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeTabular.enable_destructive_editing). + + + +#### Cell changes + +* New classes [`ShortTextValue`](../streamlined_api/tabular.md#ansys.grantami.core._mi_tabular_value_classes.ShortTextValue), [`LongTextValue`](../streamlined_api/tabular.md#ansys.grantami.core._mi_tabular_value_classes.LongTextValue), [`LogicalValue`](../streamlined_api/tabular.md#ansys.grantami.core._mi_tabular_value_classes.LogicalValue), [`IntegerValue`](../streamlined_api/tabular.md#ansys.grantami.core._mi_tabular_value_classes.IntegerValue), + [`DateValue`](../streamlined_api/tabular.md#ansys.grantami.core._mi_tabular_value_classes.DateValue), [`PictureValue`](../streamlined_api/tabular.md#ansys.grantami.core._mi_tabular_value_classes.PictureValue), and [`FileValue`](../streamlined_api/tabular.md#ansys.grantami.core._mi_tabular_value_classes.FileValue) represent individual linked cells in a tabular + attribute value. The corresponding Local versions of these classes are used to represent local cells. + + + + + +## Invalid operations on staged records + +The behavior when invalid operations are performed on staged records has been standardized. The following methods and +properties now all raise [`InvalidRecordStateError`](../streamlined_api/exceptions.md#ansys.grantami.core.mi_meta_classes.InvalidRecordStateError) when called on staged records: + +| Member | Previous behavior | +|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------| +| [`Exporter.get_parameters_required_for_export()`](../streamlined_api/supporting.md#ansys.grantami.core.mi_exporters.Exporter.get_parameters_required_for_export) | Raised [`GRANTA_Exception`](../foundation_api.md#ansys.grantami.backend.soap.GRANTA_Exceptions.GRANTA_Exception) | +| [`Exporter.run_exporter()`](../streamlined_api/supporting.md#ansys.grantami.core.mi_exporters.Exporter.run_exporter) | Raised [`IndexError`](https://docs.python.org/3/library/exceptions.html#IndexError) | +| [`Session.bulk_delete_or_withdraw_records()`](../streamlined_api/session.md#ansys.grantami.core.mi.Session.bulk_delete_or_withdraw_records) | Silently ignored staged records. | +| [`Session.bulk_fetch_release_states()`](../streamlined_api/session.md#ansys.grantami.core.mi.Session.bulk_fetch_release_states) | Raised [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError) | +| [`Session.update_links()`](../streamlined_api/session.md#ansys.grantami.core.mi.Session.update_links) | Raised [`AssertionError`](https://docs.python.org/3/library/exceptions.html#AssertionError) | +| [`Table.bulk_fetch_data_revision_history()`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.bulk_fetch_data_revision_history) | Raised [`AttributeError`](https://docs.python.org/3/library/exceptions.html#AttributeError) | +| [`Table.bulk_fetch_associated_records()`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.bulk_fetch_associated_records) | Raised [`AttributeError`](https://docs.python.org/3/library/exceptions.html#AttributeError) | +| [`Table.bulk_link_fetch()`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.bulk_link_fetch) | Raised [`AttributeError`](https://docs.python.org/3/library/exceptions.html#AttributeError) | +| [`Table.bulk_fetch()`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.bulk_fetch) | Silently ignored staged records | +| [`Table.get_records_from_path()`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.get_records_from_path) | Raised [`TypeError`](https://docs.python.org/3/library/exceptions.html#TypeError) if the provided `starting_node` was a staged record | +| [`Table.path_from()`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.path_from) and [`Table.paths_from()`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.paths_from) | Raised [`GRANTA_ServiceLayerError`](../foundation_api.md#ansys.grantami.backend.soap.GRANTA_Exceptions.GRANTA_ServiceLayerError) | +| [`Record.children`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record.children) | Raised [`TypeError`](https://docs.python.org/3/library/exceptions.html#TypeError) | +| [`Record.refetch_children()`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record.refetch_children) | Raised [`TypeError`](https://docs.python.org/3/library/exceptions.html#TypeError) | +| [`Record.refetch_pseudo_attributes()`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record.refetch_pseudo_attributes) | Silently performed no action | +| Pseudo-attribute properties on [`Record`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record) | Raised an [`AttributeError`](https://docs.python.org/3/library/exceptions.html#AttributeError) | +| [`Record.refresh_properties()`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record.refresh_properties) | Silently performed no action | +| [`Record.refresh_path()`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record.refresh_path) | Raised [`AttributeError`](https://docs.python.org/3/library/exceptions.html#AttributeError) | +| [`Record.path`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record.path) | Raised [`AttributeError`](https://docs.python.org/3/library/exceptions.html#AttributeError) | +| [`Record.viewer_url`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record.viewer_url) | Raised [`AttributeError`](https://docs.python.org/3/library/exceptions.html#AttributeError) | +| [`Record.get_descendants()`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record.get_descendants) | Raised [`GRANTA_ServiceLayerError`](../foundation_api.md#ansys.grantami.backend.soap.GRANTA_Exceptions.GRANTA_ServiceLayerError) | +| [`Record.get_associated_records()`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record.get_associated_records) | Raised [`AttributeError`](https://docs.python.org/3/library/exceptions.html#AttributeError) | +| [`Record.move_to()`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record.move_to) | Raised [`GRANTA_ServiceLayerError`](../foundation_api.md#ansys.grantami.backend.soap.GRANTA_Exceptions.GRANTA_ServiceLayerError) | +| [`Record.refetch_record_release_state()`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record.refetch_record_release_state) | Would set the release state to `Non-existent on server` | +| [`Record.record_history`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record.record_history) | Raised [`AttributeError`](https://docs.python.org/3/library/exceptions.html#AttributeError) | +| [`Record.release_state`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record.release_state) | Incorrectly returned [`None`](https://docs.python.org/3/library/constants.html#None) | +| [`Record.refetch_record_versions()`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record.refetch_record_versions) | Raised [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError) | +| [`Record.all_versions`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record.all_versions) | Raised [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError) | +| [`Record.delete_or_withdraw_record_on_server()`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record.delete_or_withdraw_record_on_server) | Raised [`AssertionError`](https://docs.python.org/3/library/exceptions.html#AssertionError) | +| [`Record.data_revision_history`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record.data_revision_history) | Raised [`AttributeError`](https://docs.python.org/3/library/exceptions.html#AttributeError) | diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/00_Create_scatter_plots.md b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/00_Create_scatter_plots.md index 8d044c2f05..ce729085b8 100644 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/00_Create_scatter_plots.md +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/00_Create_scatter_plots.md @@ -12,9 +12,9 @@ replacing `my.server.name` with the name of your Granta MI server. Specify a dat ```python -from GRANTA_MIScriptingToolkit import granta as mpy +import ansys.grantami.core as mpy -mi = mpy.connect("http://my.server.name/mi_servicelayer", autologon=True) +mi = mpy.SessionBuilder("http://my.server.name/mi_servicelayer").with_autologon() db = mi.get_db(db_key="MI_Training") db.unit_system = "SI (Consistent)" material_universe = db.get_table("MaterialUniverse") @@ -101,50 +101,50 @@ df.head() 7075 Al (Aluminum) Opaque - {'low': 69000000000.0, 'high': 72538459777.83203} - {'low': 2781.691551208496, 'high': 2809.648036... - {'low': 386000000.0, 'high': 510000000.0} - {'low': 4.199999809265137e-08, 'high': 4.40000... + Range(low=69000000000.0, high=72538459777.8320... + Range(low=2781.691551208496, high=2809.6480369... + Range(low=386000000.0, high=510000000.0, low_v... + Range(low=4.199999809265137e-08, high=4.400000... 00000e38-000e-4fff-8fff-dd92ffff0000 7075 Al (Aluminum) Opaque - {'low': 69000000000.0, 'high': 76000000000.0} - {'low': 2769.9999809265137, 'high': 2829.99992... - {'low': 434000000.0, 'high': 580000000.0} - {'low': 5.0999999046325684e-08, 'high': 5.3000... + Range(low=69000000000.0, high=76000000000.0, l... + Range(low=2769.9999809265137, high=2829.999923... + Range(low=434000000.0, high=580000000.0, low_v... + Range(low=5.0999999046325684e-08, high=5.30000... 02401a77-c3e7-4b68-875c-7be3b735b703 Tungsten Carbide Carbide Opaque - {'low': 599999999999.9996, 'high': 67000000000... - {'low': 15299.99999999999, 'high': 15900.00000... - {'low': 372999999.9999999, 'high': 529999999.9... - {'low': 6.309999847412099e-07, 'high': 1.00000... + Range(low=599999999999.9996, high=670000000000... + Range(low=15299.99999999999, high=15900.000000... + Range(low=372999999.9999999, high=529999999.99... + Range(low=6.309999847412099e-07, high=1.000000... 000009cc-000e-4fff-8fff-dd92ffff0000 AISI 4130 Fe (Iron) Opaque - {'low': 200000000000.0, 'high': 210256408691.4... - {'low': 7790.849685668945, 'high': 7869.149684... - {'low': 862000000.0, 'high': 1241000000.0} - {'low': 2e-07, 'high': 2.5e-07} + Range(low=200000000000.0, high=210256408691.40... + Range(low=7790.849685668945, high=7869.1496849... + Range(low=862000000.0, high=1241000000.0, low_... + Range(low=2e-07, high=2.5e-07, low_value_is_in... 000009cb-000e-4fff-8fff-dd92ffff0000 AISI 4130 Fe (Iron) Opaque - {'low': 200000000000.0, 'high': 210256408691.4... - {'low': 7794.244766235352, 'high': 7872.578620... - {'low': 621000000.0, 'high': 686368408.203125} - {'low': 2e-07, 'high': 2.5e-07} + Range(low=200000000000.0, high=210256408691.40... + Range(low=7794.244766235352, high=7872.5786209... + Range(low=621000000.0, high=686368408.203125, ... + Range(low=2e-07, high=2.5e-07, low_value_is_in... @@ -165,22 +165,22 @@ geometric mean (depending on the signs of the input values). ```python import math -def granta_mean(value): +def granta_mean(value: mpy.Range | None): if value is None: return None - if "high" not in value: - return value["low"] - if "low" not in value: - return value["high"] - product = value["low"] * value["high"] + if value.high is None: + return value.low + if value.low is None: + return value.high + product = value.low * value.high if product > 0: gm = math.sqrt(product) - if value["low"] > 0: + if value.low > 0: return gm else: return -gm else: - return sum(value.values())/2 + return sum([value.low, value.high]) / 2 ``` Apply the `granta_mean` function to each cell in the *Density*, *Young's modulus*, *Tensile strength*, and *Electrical @@ -449,7 +449,7 @@ separate `dict` that provides a simple mapping between column headings and units units = { mi_attr: material_universe.attributes[mi_attr].unit for mi_attr in attributes - if material_universe.attributes[mi_attr].unit + if getattr(material_universe.attributes[mi_attr], "unit", None) is not None } units ``` @@ -591,7 +591,8 @@ ax.scatter( df_processed["Density"], df_processed["Young's modulus"], df_processed["Electrical resistivity"], - s=50) + s=50, +) _ = ax.set_title(r"$\rho$ vs E vs Density") ``` @@ -603,7 +604,7 @@ _ = ax.set_title(r"$\rho$ vs E vs Density") ### Adding a continuous color axis to a 2D scatter plot -Add a continuous color axis using the `c` and `cmap` arguments to the `plot.scatter()` constructor. +Add a continuous color axis using the `c` and `cmap` arguments to the `plot.scatter()` constructor. This example uses the optional `norm` argument to specify an alternative method of mapping numeric values to a color in the colormap. The **color_norm** variable contains a logarithmic normalization which ensures color variation is @@ -657,6 +658,7 @@ the continuous *Electrical resistivity* values to those categories. ```python import numpy as np + min_value = df_processed["Electrical resistivity"].min() max_value = df_processed["Electrical resistivity"].max() @@ -664,9 +666,10 @@ max_value = df_processed["Electrical resistivity"].max() spacing = np.geomspace(min_value, max_value, 6) df_processed["Electrical resistivity (binned)"] = pd.cut( - df_processed['Electrical resistivity'], + df_processed["Electrical resistivity"], spacing, - labels=['Very low', 'Low', 'Medium', 'High', 'Very high'], + labels=["Very low", "Low", "Medium", "High", "Very high"], + include_lowest=True, ) df_processed.head() ``` @@ -710,7 +713,7 @@ df_processed.head() Opaque Al (Aluminum) 7075 - NaN + Very low 00000e38-000e-4fff-8fff-dd92ffff0000 @@ -823,20 +826,12 @@ ax.set_xscale("log") ax.set_xlabel(density_label) ax.set_yscale("log") ax.set_ylabel(ym_label) -ax.set_title("E vs Density grouped by Base (using seaborn)") -``` - - - -*Previous cell output:* -```output -Text(0.5, 1.0, 'E vs Density grouped by Base (using seaborn)') +_ = ax.set_title("E vs Density grouped by Base (using seaborn)") ``` - -![png](00_Create_scatter_plots_files/00_Create_scatter_plots_51_1.png) +![png](00_Create_scatter_plots_files/00_Create_scatter_plots_51_0.png) @@ -878,8 +873,8 @@ g = sns.pairplot( for i in range(len(g.axes)): for j in range(len(g.axes[i])): - g.axes[i,j].set_xscale("log") - g.axes[i,j].set_yscale("log") + g.axes[i, j].set_xscale("log") + g.axes[i, j].set_yscale("log") _ = g.fig.suptitle(r"Pair plot comparing Density, E, $F_{{{tu}}}$ and $\rho$, grouped by Base", y=1.03) ``` diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/00_Create_scatter_plots_files/00_Create_scatter_plots_31_0.png b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/00_Create_scatter_plots_files/00_Create_scatter_plots_31_0.png index 38ac59956b..47c9a80870 100644 Binary files a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/00_Create_scatter_plots_files/00_Create_scatter_plots_31_0.png and b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/00_Create_scatter_plots_files/00_Create_scatter_plots_31_0.png differ diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/00_Create_scatter_plots_files/00_Create_scatter_plots_34_0.png b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/00_Create_scatter_plots_files/00_Create_scatter_plots_34_0.png index 5c9e9ff3a8..cba14af988 100644 Binary files a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/00_Create_scatter_plots_files/00_Create_scatter_plots_34_0.png and b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/00_Create_scatter_plots_files/00_Create_scatter_plots_34_0.png differ diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/00_Create_scatter_plots_files/00_Create_scatter_plots_37_0.png b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/00_Create_scatter_plots_files/00_Create_scatter_plots_37_0.png index aca889cafe..5154b09dd4 100644 Binary files a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/00_Create_scatter_plots_files/00_Create_scatter_plots_37_0.png and b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/00_Create_scatter_plots_files/00_Create_scatter_plots_37_0.png differ diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/00_Create_scatter_plots_files/00_Create_scatter_plots_40_0.png b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/00_Create_scatter_plots_files/00_Create_scatter_plots_40_0.png index eb1fa9da04..f423b830be 100644 Binary files a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/00_Create_scatter_plots_files/00_Create_scatter_plots_40_0.png and b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/00_Create_scatter_plots_files/00_Create_scatter_plots_40_0.png differ diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/00_Create_scatter_plots_files/00_Create_scatter_plots_43_0.png b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/00_Create_scatter_plots_files/00_Create_scatter_plots_43_0.png index d6f96317cf..741ea8b324 100644 Binary files a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/00_Create_scatter_plots_files/00_Create_scatter_plots_43_0.png and b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/00_Create_scatter_plots_files/00_Create_scatter_plots_43_0.png differ diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/00_Create_scatter_plots_files/00_Create_scatter_plots_48_0.png b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/00_Create_scatter_plots_files/00_Create_scatter_plots_48_0.png index 7bae5cab79..428f3bff72 100644 Binary files a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/00_Create_scatter_plots_files/00_Create_scatter_plots_48_0.png and b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/00_Create_scatter_plots_files/00_Create_scatter_plots_48_0.png differ diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/00_Create_scatter_plots_files/00_Create_scatter_plots_51_0.png b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/00_Create_scatter_plots_files/00_Create_scatter_plots_51_0.png new file mode 100644 index 0000000000..8a4e9e4e4f Binary files /dev/null and b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/00_Create_scatter_plots_files/00_Create_scatter_plots_51_0.png differ diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/00_Create_scatter_plots_files/00_Create_scatter_plots_54_1.png b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/00_Create_scatter_plots_files/00_Create_scatter_plots_54_1.png index e3ba85d921..d30f52bb74 100644 Binary files a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/00_Create_scatter_plots_files/00_Create_scatter_plots_54_1.png and b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/00_Create_scatter_plots_files/00_Create_scatter_plots_54_1.png differ diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/01_Compare_datasets_graphically.md b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/01_Compare_datasets_graphically.md index 82ba1a90a1..468899f9d5 100644 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/01_Compare_datasets_graphically.md +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/01_Compare_datasets_graphically.md @@ -9,14 +9,14 @@ Connect to MI and specify a database. ```python -from GRANTA_MIScriptingToolkit import granta as mpy +import ansys.grantami.core as mpy -mi = mpy.connect("http://my.server.name/mi_servicelayer", autologon=True) +mi = mpy.SessionBuilder("http://my.server.name/mi_servicelayer").with_autologon() db = mi.get_db(db_key="MI_Training") db.unit_system = "Metric" ``` -Specify the records and attributes you want to export from the first table. +Specify the records and attributes you want to export from the first table. For this example, we need *Build ID* and *Travel Speed* for all records in the *AM Builds* table. @@ -367,7 +367,7 @@ Finally, create a `units` dict so you can create plots with meaningful axis labe ```python attr_defs = [am_builds.attributes[attr] for attr in build_attributes] + \ [tensile_test_data.attributes[attr] for attr in tensile_attributes] -units = {attr.name: attr.unit for attr in attr_defs if attr.unit} +units = {attr.name: attr.unit for attr in attr_defs if getattr(attr, "unit", None) is not None} units ``` @@ -418,7 +418,7 @@ _ = ax.set_title("$F_{{tu}}$ vs Travel Speed") There is a clear dependence of the *Ultimate Tensile Strength* on the *Travel Speed*. It is also clear that *Travel Speed* -is an independent variable, with the values chosen for each build falling into a set of well-defined bins. +is an independent variable, with the values chosen for each build falling into a set of well-defined bins. Instead of judging the distribution by eye, we can use box plots to describe the distribution of values. @@ -454,7 +454,7 @@ _ = ax.set_title("$F_{{tu}}$ vs Travel Speed (Violin Plot)") ### Investigate the impact of a third property -The orientation of each specimen during the test was also exported, but not included on the plots above. +The orientation of each specimen during the test was also exported, but not included on the plots above. The simplest way to visualize this data is to add it to the original scatter plot as a color axis. @@ -504,7 +504,7 @@ Name: count, dtype: int64 ``` -There are only 7 values for 'AT', which is less than 10% of the overall dataset. +There are only 7 values for 'AT', which is less than 10% of the overall dataset. The code below creates a series of `True` or `False` values in `rows_to_keep` (set to `True` if the value is in the specified list). `rows_to_keep` is then passed as a selector into the DataFrame, which maps the list onto the @@ -512,7 +512,7 @@ DataFrame rows and returns a new DataFrame with only the `True` rows included. ```python -rows_to_keep = df_processed["Specimen Orientation"].map(lambda x: x in ['L', 'LT']) +rows_to_keep = df_processed["Specimen Orientation"].map(lambda x: x in ["L", "LT"]) df_L_or_LT = df_processed[rows_to_keep] df_L_or_LT.head() ``` diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/01_Compare_datasets_graphically_files/01_Compare_datasets_graphically_30_0.png b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/01_Compare_datasets_graphically_files/01_Compare_datasets_graphically_30_0.png index ed0e933029..730e86c0b4 100644 Binary files a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/01_Compare_datasets_graphically_files/01_Compare_datasets_graphically_30_0.png and b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/01_Compare_datasets_graphically_files/01_Compare_datasets_graphically_30_0.png differ diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/01_Compare_datasets_graphically_files/01_Compare_datasets_graphically_32_0.png b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/01_Compare_datasets_graphically_files/01_Compare_datasets_graphically_32_0.png index 60565fc8d0..baeb604c77 100644 Binary files a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/01_Compare_datasets_graphically_files/01_Compare_datasets_graphically_32_0.png and b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/01_Compare_datasets_graphically_files/01_Compare_datasets_graphically_32_0.png differ diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/01_Compare_datasets_graphically_files/01_Compare_datasets_graphically_34_0.png b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/01_Compare_datasets_graphically_files/01_Compare_datasets_graphically_34_0.png index 289bfef1cb..f92a4727d6 100644 Binary files a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/01_Compare_datasets_graphically_files/01_Compare_datasets_graphically_34_0.png and b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/01_Compare_datasets_graphically_files/01_Compare_datasets_graphically_34_0.png differ diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/01_Compare_datasets_graphically_files/01_Compare_datasets_graphically_37_0.png b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/01_Compare_datasets_graphically_files/01_Compare_datasets_graphically_37_0.png index 0822003db4..93c536ee02 100644 Binary files a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/01_Compare_datasets_graphically_files/01_Compare_datasets_graphically_37_0.png and b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/01_Compare_datasets_graphically_files/01_Compare_datasets_graphically_37_0.png differ diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/01_Compare_datasets_graphically_files/01_Compare_datasets_graphically_45_0.png b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/01_Compare_datasets_graphically_files/01_Compare_datasets_graphically_45_0.png index 9d70ee8ea1..8c76316ed9 100644 Binary files a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/01_Compare_datasets_graphically_files/01_Compare_datasets_graphically_45_0.png and b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/01_Compare_datasets_graphically_files/01_Compare_datasets_graphically_45_0.png differ diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/02_Plot_data_by_category.md b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/02_Plot_data_by_category.md index f03976d6e8..7f01198a36 100644 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/02_Plot_data_by_category.md +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/02_Plot_data_by_category.md @@ -9,9 +9,9 @@ Connect to Granta MI and specify a database. ```python -from GRANTA_MIScriptingToolkit import granta as mpy +import ansys.grantami.core as mpy -mi = mpy.connect("http://my.server.name/mi_servicelayer", autologon=True) +mi = mpy.SessionBuilder("http://my.server.name/mi_servicelayer").with_autologon() db = mi.get_db(db_key="MI_Training") db.unit_system = "Metric" ``` @@ -45,7 +45,8 @@ tensile_test_records = {tr for pr in pedigree_records for tr in pr.links[link_gr tensile_test_records = list(tensile_test_records) ``` -Specify the attributes you want to export from the second table. *Panel number* will be used to relate the tensile tests to the layup data. +Specify the attributes you want to export from the second table. *Panel number* will be used to relate the tensile +tests to the layup data. ```python @@ -198,14 +199,14 @@ tensile_df.head() LBJ14 LBJ1413A - [] + NaN 1613.614663 0° tension LBJ14 LBJ1415A - [] + NaN 1611.201497 0° tension @@ -291,7 +292,7 @@ df.head() 1.431636 0.238044 LBJ1413A - [] + NaN 1613.614663 0° tension @@ -301,7 +302,7 @@ df.head() 1.431636 0.238044 LBJ1415A - [] + NaN 1611.201497 0° tension @@ -317,7 +318,7 @@ Finally, create a `units` dict so you can create plots with meaningful axis labe ```python attr_defs = [comp_pedigree.attributes[attr] for attr in pedigree_attributes] + \ [tensile_test_data.attributes[attr] for attr in tensile_attributes] -units = {attr.name: attr.unit for attr in attr_defs if attr.unit} +units = {attr.name: attr.unit for attr in attr_defs if getattr(attr, "unit", None) is not None} units ``` @@ -379,7 +380,7 @@ each column. ```python -df.describe(include='all') +df.describe(include="all") ``` @@ -406,7 +407,7 @@ df.describe(include='all') 67.000000 67.000000 67 - 67 + 18.000000 67.000000 67 @@ -416,7 +417,7 @@ df.describe(include='all') NaN NaN 67 - 19 + NaN NaN 2 @@ -426,7 +427,7 @@ df.describe(include='all') NaN NaN LBJ1311A - [] + NaN NaN 0° tension @@ -436,7 +437,7 @@ df.describe(include='all') NaN NaN 1 - 49 + NaN NaN 56 @@ -446,7 +447,7 @@ df.describe(include='all') 1.534167 0.235604 NaN - NaN + 42.775844 1288.110261 NaN @@ -456,7 +457,7 @@ df.describe(include='all') 0.294450 0.005039 NaN - NaN + 13.523385 557.743977 NaN @@ -466,7 +467,7 @@ df.describe(include='all') 1.379415 0.229948 NaN - NaN + 13.217251 44.629768 NaN @@ -476,7 +477,7 @@ df.describe(include='all') 1.385455 0.231279 NaN - NaN + 47.022249 1353.613343 NaN @@ -486,7 +487,7 @@ df.describe(include='all') 1.410677 0.234618 NaN - NaN + 47.973725 1545.653034 NaN @@ -496,7 +497,7 @@ df.describe(include='all') 1.438564 0.240007 NaN - NaN + 49.364743 1603.610369 NaN @@ -506,7 +507,7 @@ df.describe(include='all') 2.213429 0.245727 NaN - NaN + 51.400420 1639.559637 NaN @@ -599,7 +600,7 @@ ax2.set_ylabel(ftu_90_label) h1, l1 = ax1.get_legend_handles_labels() h2, l2 = ax2.get_legend_handles_labels() -ax1.legend(h1+h2, [ftu_0_label, ftu_90_label], loc="lower right") +ax1.legend(h1 + h2, [ftu_0_label, ftu_90_label], loc="lower right") _ = ax1.set_title(r"$F_{tu}, 0^{{\circ}}$ and $90^{{\circ}}$ vs Average ply thickness") ``` diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/02_Plot_data_by_category_files/02_Plot_data_by_category_28_0.png b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/02_Plot_data_by_category_files/02_Plot_data_by_category_28_0.png index a05cbd4219..645738fa3b 100644 Binary files a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/02_Plot_data_by_category_files/02_Plot_data_by_category_28_0.png and b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/02_Plot_data_by_category_files/02_Plot_data_by_category_28_0.png differ diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/02_Plot_data_by_category_files/02_Plot_data_by_category_36_0.png b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/02_Plot_data_by_category_files/02_Plot_data_by_category_36_0.png index 41e0849e39..426cab0997 100644 Binary files a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/02_Plot_data_by_category_files/02_Plot_data_by_category_36_0.png and b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/02_Plot_data_by_category_files/02_Plot_data_by_category_36_0.png differ diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/02_Plot_data_by_category_files/02_Plot_data_by_category_38_0.png b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/02_Plot_data_by_category_files/02_Plot_data_by_category_38_0.png index ceebe1a6b0..02707e70e7 100644 Binary files a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/02_Plot_data_by_category_files/02_Plot_data_by_category_38_0.png and b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/02_Plot_data_by_category_files/02_Plot_data_by_category_38_0.png differ diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/03_Fit_series_data_and_import.md b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/03_Fit_series_data_and_import.md index b800a10a62..057f34873f 100644 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/03_Fit_series_data_and_import.md +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/03_Fit_series_data_and_import.md @@ -9,9 +9,9 @@ Specify a database and tables. ```python -from GRANTA_MIScriptingToolkit import granta as mpy +import ansys.grantami.core as mpy -mi = mpy.connect("http://my.server.name/mi_servicelayer", autologon=True) +mi = mpy.SessionBuilder("http://my.server.name/mi_servicelayer").with_autologon() db = mi.get_db(db_key="MI_Training") statistics_table = db.get_table("Fatigue Statistical Data") @@ -29,11 +29,11 @@ First, perform a criteria search to find the target record. ```python criterion_type = statistics_table.attributes["Material type"].search_criterion(contains="Aluminum alloys") criterion_status = statistics_table.attributes["Statistical Analysis Status"].search_criterion(contains="In Progress") -records = statistics_table.search_for_records_where([criterion_type, criterion_status]) -print(f"Found {len(records)} corresponding HCF test results.") +statistical_records = statistics_table.search_for_records_where([criterion_type, criterion_status]) +print(f"Found {len(statistical_records)} corresponding HCF test results.") -r = records[0] -print(f"Analyzing fatigue data for {r.name}.") +record = statistical_records[0] +print(f"Analyzing fatigue data for {record.name}.") ``` *Previous cell output:* ```output @@ -50,36 +50,35 @@ the attribute values from the test result records into a `pandas` DataFrame for import pandas as pd import statistics -r_ratio_mean = statistics.mean(r.attributes["Target R-Ratio Range"].value.values()) -test_temperature_mean = statistics.mean(r.attributes["Test Temperature Range"].value.values()) -material_id_value = f"{r.attributes['Alloy'].value}-{r.attributes['Condition'].value}/{r.attributes['Form'].value}" +r_ratio = record.attributes["Target R-Ratio Range"].value +r_ratio_mean = statistics.mean([r_ratio.low, r_ratio.high]) +test_temperature = record.attributes["Test Temperature Range"].value +test_temperature_mean = statistics.mean([test_temperature.low, test_temperature.high]) +material_id_value = f"{record.attributes['Alloy'].value}-{record.attributes['Condition'].value}/{record.attributes['Form'].value}" target_r_ratio = test_data_table.attributes["Target r-ratio"] target_r_ratio_criterion = target_r_ratio.search_criterion( less_than=r_ratio_mean, greater_than=r_ratio_mean, ) -test_temperature = test_data_table.attributes['Test temperature'] +test_temperature = test_data_table.attributes["Test temperature"] test_temperature_criterion = test_temperature.search_criterion( less_than=test_temperature_mean, greater_than=test_temperature_mean, ) -material_id = test_data_table.attributes['Material ID'] +material_id = test_data_table.attributes["Material ID"] material_id_criterion = material_id.search_criterion(contains=material_id_value) -records = test_data_table.search_for_records_where( +test_records = test_data_table.search_for_records_where( [target_r_ratio_criterion, test_temperature_criterion, material_id_criterion] ) -print(f"Found {len(records)} corresponding HCF test results.") +print(f"Found {len(test_records)} corresponding HCF test results.") t_results = ["Cyclic life", "Maximum stress", "Fatigue failure"] -test_data_table.bulk_fetch( - records=records, - attributes=t_results -) +test_data_table.bulk_fetch(records=test_records, attributes=t_results) -rs_dict = {attribute: [r.attributes[attribute].value for r in records] for attribute in t_results} -rs_dict.update({"ShortName": [r.short_name for r in records]}) +rs_dict = {attribute: [r.attributes[attribute].value for r in test_records] for attribute in t_results} +rs_dict.update({"ShortName": [r.short_name for r in test_records]}) rs_df = pd.DataFrame(rs_dict) ``` @@ -90,7 +89,13 @@ Found 66 corresponding HCF test results. ## Fit the data Fit the fatigue test data using the SciPy `curve_fit()` function, and create a new DataFrame for the fitted data and -the lower bound. +the lower bound. Define an expression for fitting as follows: + +![y = 10\^(-A1)x\^(A2)](assets/03_Expression.svg) + +To maximize the fit precision, normalize the y values to a single order of magnitude. The y values are of the order of +100 MPa, so use a scale factor of 0.01. Based on the expression being used, multiplying by a scale factor +requires adding log10 of the scale factor to the A1 result. ```python @@ -98,36 +103,36 @@ from scipy.optimize import curve_fit import numpy as np def fatigue_func(x, A1, A2): - return 10 **(A2 * np.log10(x) - A1) - + return 10 ** (-A1) * x ** A2 + +SCALE_FACTOR = 0.01 + (A1, A2), pcov = curve_fit( fatigue_func, rs_df["Cyclic life"], - rs_df["Maximum stress"], + rs_df["Maximum stress"] * SCALE_FACTOR, bounds=([-500.0, -500.0], [500.0, 500.0]), ) +A1 += np.log10(SCALE_FACTOR) + min_coefficient = 0.9 x = np.geomspace( start=rs_df["Cyclic life"].min(), stop=rs_df["Cyclic life"].max(), num=rs_df["Cyclic life"].count(), ) -fitted_series = 10 **(A2 * np.log10(x) - A1) +fitted_series = 10 ** (-A1) * x ** A2 fitted_df = ( pd.DataFrame( index=x, - data=np.transpose([fitted_series, min_coefficient*fitted_series]), + data=np.transpose([fitted_series, min_coefficient * fitted_series]), columns=["Fitted Data", "Minimum"], ) .reset_index() .melt(id_vars=["index"]) - .rename(columns={ - "index": "Cyclic life", - "value": "Maximum stress", - "variable": "Type" - }) + .rename(columns={"index": "Cyclic life", "value": "Maximum stress", "variable": "Type"}) ) fitted_df.head() @@ -151,31 +156,31 @@ fitted_df.head() 0 5000.000000 Fitted Data - 527.961774 + 527.961676 1 5870.634799 Fitted Data - 520.792043 + 520.791950 2 6892.870589 Fitted Data - 513.719678 + 513.719590 3 8093.105189 Fitted Data - 506.743355 + 506.743272 4 9502.332991 Fitted Data - 499.861771 + 499.861692 @@ -206,7 +211,7 @@ plt.show() -![png](03_Fit_series_data_and_import_files/03_Fit_series_data_and_import_10_0.png) +![png](03_Fit_series_data_and_import_files/03_Fit_series_data_and_import_12_0.png) @@ -224,7 +229,7 @@ fig -![png](03_Fit_series_data_and_import_files/03_Fit_series_data_and_import_12_0.png) +![png](03_Fit_series_data_and_import_files/03_Fit_series_data_and_import_14_0.png) @@ -236,42 +241,61 @@ fitted data. Use `Session.update()` to push the changes to Granta MI. ```python -fit = r.attributes["Maximum Stress v Cycles (Equivalent Stress)"] -fit.clear() +fit = record.attributes["Maximum Stress v Cycles (Equivalent Stress)"] fit.unit = test_data_table.attributes["Maximum stress"].unit -for _, row in fitted_df.iterrows(): - point = { - "y": row["Maximum stress"], - "Number of Cycles": row["Cyclic life"], - "Data Type": row["Type"], - "Stress Ratio": r_ratio_mean, - } - fit.add_point(point) -for _, row in rs_df.iterrows(): - point = { - "y": row["Maximum stress"], - "Number of Cycles": row["Cyclic life"], - "Data Type": "Test Data", - "Stress Ratio": r_ratio_mean, - } - fit.add_point(point) - -fit.series_linestyles[3] = "Markers" - -r.attributes["Equivalent Stress, A1"].value = A1 -r.attributes["Equivalent Stress, A2"].value = A2 -r.attributes["Statistical Analysis Status"].value = "Complete" -r.set_attributes([ - r.attributes["Equivalent Stress, A1"], - r.attributes["Equivalent Stress, A2"], - # The status is not updated; this allows the notebook to be re-run. - # r.attributes["Statistical Analysis Status"], - fit -]) -fit.value -mi.update([r]) -print(f"Updated attributes in {r.name}.") +fitted_data = fitted_df[fitted_df["Type"]=="Fitted Data"] +series_fitted = mpy.SeriesPoint( + y=tuple(fitted_data["Maximum stress"]), + x=tuple(fitted_data["Cyclic life"]), + parameters=( + mpy.SeriesParameterValue("Data Type", "Fitted Data"), + mpy.SeriesParameterValue("Stress Ratio", r_ratio_mean), + ), + decoration=mpy.GraphDecoration.LINES, +) + +minimum_data = fitted_df[fitted_df["Type"]=="Minimum"] +series_minimum = mpy.SeriesPoint( + y=tuple(minimum_data["Maximum stress"]), + x=tuple(minimum_data["Cyclic life"]), + parameters=( + mpy.SeriesParameterValue("Data Type", "Minimum"), + mpy.SeriesParameterValue("Stress Ratio", r_ratio_mean), + ), + decoration=mpy.GraphDecoration.LINES, +) + +series_test_data = mpy.SeriesPoint( + y=tuple(rs_df["Maximum stress"]), + x=tuple(rs_df["Cyclic life"]), + parameters=( + mpy.SeriesParameterValue("Data Type", "Test Data"), + mpy.SeriesParameterValue("Stress Ratio", r_ratio_mean), + ), + decoration=mpy.GraphDecoration.MARKERS, +) +fit.value = ( + series_fitted, + series_minimum, + series_test_data, +) + +record.attributes["Equivalent Stress, A1"].value = A1 +record.attributes["Equivalent Stress, A2"].value = A2 +record.attributes["Statistical Analysis Status"].value = "Complete" +record.set_attributes( + [ + record.attributes["Equivalent Stress, A1"], + record.attributes["Equivalent Stress, A2"], + # The status is not updated; this allows the notebook to be re-run. + # r.attributes["Statistical Analysis Status"], + fit, + ] +) + +mi.update([record]) +print(f"Updated attributes in {record.name}.") ``` *Previous cell output:* ```output @@ -283,12 +307,12 @@ Add a record link group, and use `Session.update_links()` to push the changes to ```python -rec_link_group = r.links["Fatigue Test Data"] -for rsi in records: +rec_link_group = record.links["Fatigue Test Data"] +for rsi in test_records: rec_link_group.add(rsi) -r.set_links("Fatigue Test Data", rec_link_group) -mi.update_links([r]) -print(f"Updated links in {r.name}.") +record.set_links("Fatigue Test Data", rec_link_group) +mi.update_links([record]) +print(f"Updated links in {record.name}.") ``` *Previous cell output:* ```output diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/03_Fit_series_data_and_import_files/03_Fit_series_data_and_import_12_0.png b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/03_Fit_series_data_and_import_files/03_Fit_series_data_and_import_12_0.png index 2dddf4d398..cae7c157ff 100644 Binary files a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/03_Fit_series_data_and_import_files/03_Fit_series_data_and_import_12_0.png and b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/03_Fit_series_data_and_import_files/03_Fit_series_data_and_import_12_0.png differ diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/03_Fit_series_data_and_import_files/03_Fit_series_data_and_import_14_0.png b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/03_Fit_series_data_and_import_files/03_Fit_series_data_and_import_14_0.png new file mode 100644 index 0000000000..80013e36d1 Binary files /dev/null and b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/03_Fit_series_data_and_import_files/03_Fit_series_data_and_import_14_0.png differ diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/04_Process_datasets_and_import.md b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/04_Process_datasets_and_import.md index 1b2096c567..d9f5f67116 100644 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/04_Process_datasets_and_import.md +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/04_Process_datasets_and_import.md @@ -241,7 +241,7 @@ _ = ax.set_title("Stress vs Strain") -Since the plastic region extends over a large strain range, it is difficult to see detail in the elastic region. +Since the plastic region extends over a large strain range, it is difficult to see detail in the elastic region. Create an inset and plot the elastic and yield region only. @@ -272,7 +272,7 @@ fig ### Calculate Ultimate tensile strength -*Ultimate tensile strength* can be calculated by taking the maximum value of the `df.Stress` column. +*Ultimate tensile strength* can be calculated by taking the maximum value of the `df.Stress` column. Calculate and store the tensile strength in SI units and MPa (the latter will be used later). @@ -292,12 +292,22 @@ strength*. ```python strain_at_uts = df.Strain[df.Stress == tens_strength].iloc[0] -ax.scatter(x=[strain_at_uts], y=[tens_strength_MPa], color="black", marker="x", alpha=0.75, s=50, zorder=1) -ax.annotate(rf"$\sigma_{{ts}}$: {tens_strength_MPa:.2f} MPa", - xy=(strain_at_uts, tens_strength_MPa), - xytext=(0,-14), - textcoords="offset points", - fontsize=8) +ax.scatter( + x=[strain_at_uts], + y=[tens_strength_MPa], + color="black", + marker="x", + alpha=0.75, + s=50, + zorder=1, +) +ax.annotate( + rf"$\sigma_{{ts}}$: {tens_strength_MPa:.2f} MPa", + xy=(strain_at_uts, tens_strength_MPa), + xytext=(0, -14), + textcoords="offset points", + fontsize=8, +) fig ``` @@ -327,7 +337,7 @@ def get_stress_strain_at_fraction_of_tensile_strength(fraction): nearest_row_number = stress_difference.abs().argsort()[0] nearest_row = df.iloc[nearest_row_number] return nearest_row.Strain, nearest_row.Stress - + lower_strain, lower_stress = get_stress_strain_at_fraction_of_tensile_strength(LOWER_FRACTION) upper_strain, upper_stress = get_stress_strain_at_fraction_of_tensile_strength(UPPER_FRACTION) @@ -446,9 +456,10 @@ ax_inset.scatter( ax_inset.annotate( rf"$\sigma_y$: {yield_stress_MPa:.2f} MPa", xy=(strain_at_yield, yield_stress_MPa), - xytext=(-60,6), + xytext=(-60, 6), textcoords="offset points", - fontsize=8) + fontsize=8, +) fig ``` @@ -509,7 +520,7 @@ ax.legend(handles, labels, bbox_to_anchor=legend_position, prop={"size": 8}) ax.annotate( rf"$\epsilon_f$: {elongation:.3}", xy=(elongation, 0), - xytext=(-40,5), + xytext=(-40, 5), textcoords="offset points", fontsize=8, ) @@ -660,7 +671,7 @@ plastic_strain = df.True_Strain - df.True_Stress / youngs_modulus - STRAIN_OFFSE df_plastic["Strain"] = plastic_strain[plastic_strain > 0] # Get only the stress values with a corresponding strain -df_plastic["Stress"] = df.True_Stress.align(df_plastic.Strain, join='right')[0] +df_plastic["Stress"] = df.True_Stress.align(df_plastic.Strain, join="right")[0] # Manually add the first point Strain = 0, Stress = yield stress first_point = pd.DataFrame({"Strain": [0], "Stress": [yield_stress]}) @@ -735,21 +746,21 @@ _ = ax.set_title("True Stress vs True Plastic Strain") ## Import data and results into Granta MI -Finally, import the raw data, processed data and results into a new Granta MI record. +Finally, import the raw data, processed data and results into a new Granta MI record. Connect to Granta MI and specify a database and table. ```python -from GRANTA_MIScriptingToolkit import granta as mpy +import ansys.grantami.core as mpy -mi = mpy.connect("http://my.server.name/mi_servicelayer", autologon=True) -db = mi.get_db(db_key='MI_Training') +mi = mpy.SessionBuilder("http://my.server.name/mi_servicelayer").with_autologon() +db = mi.get_db(db_key="MI_Training") -tensile_test_table = db.get_table('Tensile Test Data') +tensile_test_table = db.get_table("Tensile Test Data") ``` -Create a new record to import the data into, using `datetime.now()` to ensure the record name is unique. +Create a new record to import the data into, using `datetime.now()` to ensure the record name is unique. At this stage, the record has only been created in the MI Scripting Toolkit. The changes will be pushed to Granta MI when `session.update()` is called at the end of the notebook. @@ -788,7 +799,7 @@ dimensionless but will be imported as a percentage, so they are multiplied by 10 stress_attrs = { "Ultimate Tensile Strength": tens_strength, "Young's Modulus (11-axis)": youngs_modulus, - "0.2% Offset Yield Stress": yield_stress + "0.2% Offset Yield Stress": yield_stress, } strain_attrs = { "Strain at Ultimate Tensile Strength": strain_at_uts * 100, @@ -828,10 +839,10 @@ could easily be read from the source file. ```python range_text = f"Linear fit between [{LOWER_FRACTION:.1%}:{UPPER_FRACTION:.1%}] of Tensile strength" text_attrs = { - "Young's Modulus Calculation": 'Chord', - "Test Type": 'Tensile', - "Testing Standards": 'ASTM E8', - "Alloy": 'AMS 6520', + "Young's Modulus Calculation": "Chord", + "Test Type": "Tensile", + "Testing Standards": "ASTM E8", + "Alloy": "AMS 6520", "Modulus Calculation Range": range_text, } write_text(text_attrs) @@ -847,9 +858,12 @@ def write_functional(attr_name, y_unit, x_unit, x_name, y_values, x_values): a = record.attributes[attr_name] a.unit = y_unit a.parameters[x_name].unit = x_unit - a.xaxis[x_name] = True - for x, y in zip(x_values, y_values): - a.add_point({'y': y, x_name: x}) + a.value = ( + mpy.SeriesPoint( + x=tuple(x_values), + y=tuple(y_values), + ), + ) record.set_attributes([a]) ``` @@ -896,6 +910,6 @@ mi.update([record]) *Previous cell output:* ```output -[] +[] ``` diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/04_Process_datasets_and_import_files/04_Process_datasets_and_import_12_0.png b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/04_Process_datasets_and_import_files/04_Process_datasets_and_import_12_0.png index 2270552562..a75a45b15e 100644 Binary files a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/04_Process_datasets_and_import_files/04_Process_datasets_and_import_12_0.png and b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/04_Process_datasets_and_import_files/04_Process_datasets_and_import_12_0.png differ diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/04_Process_datasets_and_import_files/04_Process_datasets_and_import_17_0.png b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/04_Process_datasets_and_import_files/04_Process_datasets_and_import_17_0.png index 0f7d2ec831..9c76f011e8 100644 Binary files a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/04_Process_datasets_and_import_files/04_Process_datasets_and_import_17_0.png and b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/04_Process_datasets_and_import_files/04_Process_datasets_and_import_17_0.png differ diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/04_Process_datasets_and_import_files/04_Process_datasets_and_import_19_0.png b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/04_Process_datasets_and_import_files/04_Process_datasets_and_import_19_0.png index 47728e183b..c9d861c0b3 100644 Binary files a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/04_Process_datasets_and_import_files/04_Process_datasets_and_import_19_0.png and b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/04_Process_datasets_and_import_files/04_Process_datasets_and_import_19_0.png differ diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/04_Process_datasets_and_import_files/04_Process_datasets_and_import_24_0.png b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/04_Process_datasets_and_import_files/04_Process_datasets_and_import_24_0.png index 0fbb692e2d..eabc56e56e 100644 Binary files a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/04_Process_datasets_and_import_files/04_Process_datasets_and_import_24_0.png and b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/04_Process_datasets_and_import_files/04_Process_datasets_and_import_24_0.png differ diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/04_Process_datasets_and_import_files/04_Process_datasets_and_import_29_0.png b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/04_Process_datasets_and_import_files/04_Process_datasets_and_import_29_0.png index 77e1b0d080..56432156ea 100644 Binary files a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/04_Process_datasets_and_import_files/04_Process_datasets_and_import_29_0.png and b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/04_Process_datasets_and_import_files/04_Process_datasets_and_import_29_0.png differ diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/04_Process_datasets_and_import_files/04_Process_datasets_and_import_32_0.png b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/04_Process_datasets_and_import_files/04_Process_datasets_and_import_32_0.png index e77e6e7acb..26d7397bf9 100644 Binary files a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/04_Process_datasets_and_import_files/04_Process_datasets_and_import_32_0.png and b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/04_Process_datasets_and_import_files/04_Process_datasets_and_import_32_0.png differ diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/04_Process_datasets_and_import_files/04_Process_datasets_and_import_36_0.png b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/04_Process_datasets_and_import_files/04_Process_datasets_and_import_36_0.png index 675468199c..070086c949 100644 Binary files a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/04_Process_datasets_and_import_files/04_Process_datasets_and_import_36_0.png and b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/04_Process_datasets_and_import_files/04_Process_datasets_and_import_36_0.png differ diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/04_Process_datasets_and_import_files/04_Process_datasets_and_import_41_0.png b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/04_Process_datasets_and_import_files/04_Process_datasets_and_import_41_0.png index 9961c2c393..4265b166c3 100644 Binary files a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/04_Process_datasets_and_import_files/04_Process_datasets_and_import_41_0.png and b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/04_Process_datasets_and_import_files/04_Process_datasets_and_import_41_0.png differ diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/04_Process_datasets_and_import_files/04_Process_datasets_and_import_46_0.png b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/04_Process_datasets_and_import_files/04_Process_datasets_and_import_46_0.png index b9240b5073..1df7863964 100644 Binary files a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/04_Process_datasets_and_import_files/04_Process_datasets_and_import_46_0.png and b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/04_Process_datasets_and_import_files/04_Process_datasets_and_import_46_0.png differ diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/04_Process_datasets_and_import_files/04_Process_datasets_and_import_51_0.png b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/04_Process_datasets_and_import_files/04_Process_datasets_and_import_51_0.png index c539d62f71..606b15be20 100644 Binary files a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/04_Process_datasets_and_import_files/04_Process_datasets_and_import_51_0.png and b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/04_Process_datasets_and_import_files/04_Process_datasets_and_import_51_0.png differ diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/05_Find_area_under_a_curve.md b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/05_Find_area_under_a_curve.md index c0a6da7a09..5c6a0e00c9 100644 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/05_Find_area_under_a_curve.md +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/05_Find_area_under_a_curve.md @@ -9,9 +9,9 @@ Create a session, and specify a database and table. ```python -from GRANTA_MIScriptingToolkit import granta as mpy +import ansys.grantami.core as mpy -mi = mpy.connect("http://my.server.name/mi_servicelayer", autologon=True) +mi = mpy.SessionBuilder("http://my.server.name/mi_servicelayer").with_autologon() db = mi.get_db(db_key="MI_Training") db.unit_system = "SI (Consistent)" @@ -48,8 +48,7 @@ you separate the datum into the first list item (the column headers) and the sub import pandas as pd def functional_to_dataframe(attr): - headers = attr.value[0] - func_data = attr.value[1:] + headers, *func_data = attr.table_view.table_view df = pd.DataFrame(func_data, columns=headers) return df @@ -72,8 +71,8 @@ df_stress_strain.head() Strain [strain] Temperature [°C] Time [s] - Other [] - Stress/Strain Curve Type [] + Other [None] + Stress/Strain Curve Type [None] Estimated point? @@ -156,7 +155,7 @@ def clean_dataframe(df, y_name, x_name, columns_to_drop=None, columns_to_keep=No columns_to_drop = [] if not columns_to_keep: columns_to_keep = [] - new_df = df.drop(columns=[f"Y max ({y_name})"]+[f"Y min ({y_name})"]+columns_to_drop) + new_df = df.drop(columns=[f"Y max ({y_name})"] + [f"Y min ({y_name})"] + columns_to_drop) new_df["y"] = df[[f"Y max ({y_name})", f"Y min ({y_name})"]].mean(axis=1) new_df = new_df.rename(columns={x_name: "x"}) new_df[columns_to_keep] = df[columns_to_keep] @@ -175,8 +174,8 @@ df_stress_strain_clean = clean_dataframe( "Y max (Tensile Stress/Strain, L [Pa])", "Time [s]", "Estimated point?", - "Other []", - "Stress/Strain Curve Type []" + "Other [None]", + "Stress/Strain Curve Type [None]", ], columns_to_keep=["Temperature [°C]"], ) @@ -244,7 +243,7 @@ df_yield_stress_clean = clean_dataframe( "Y max (Tens. Yield Stress (L-dir) with Temp. [Pa])", "Time [s]", "Estimated point?", - "Other []", + "Other [None]", ], ) df_yield_stress_clean.head() @@ -304,7 +303,7 @@ df_youngs_modulus_clean = clean_dataframe( "Y max (Tensile Modulus (L-dir) with Temp. [Pa])", "Time [s]", "Estimated point?", - "Other []", + "Other [None]", ], ) df_youngs_modulus_clean.head() @@ -531,7 +530,7 @@ _ = ax.set_title("Deformation Energy $U_T$ vs Temperature") ### Compare Deformation Energy at temperature extrema The area under the high- and low-temperature *Stress-Strain* curves can be shown graphically, providing a -more visual comparison. +more visual comparison. Create a basic *Stress-Strain* plot at both temperatures, dividing the plotted y values by $10^6$ and changing the y-axis units to MPa. Add the legend manually. @@ -632,7 +631,7 @@ fig -Finally, add a chart title and annotate the filled areas with the corresponding *Deformation Energy*. +Finally, add a chart title and annotate the filled areas with the corresponding *Deformation Energy*. To render the *Deformation Energy* value in standard form, we've defined a function which returns the mantissa and exponent, and inserted them into LaTeX-formatted strings. diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/05_Find_area_under_a_curve_files/05_Find_area_under_a_curve_39_0.png b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/05_Find_area_under_a_curve_files/05_Find_area_under_a_curve_39_0.png index 08221620aa..da402f400a 100644 Binary files a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/05_Find_area_under_a_curve_files/05_Find_area_under_a_curve_39_0.png and b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/05_Find_area_under_a_curve_files/05_Find_area_under_a_curve_39_0.png differ diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/05_Find_area_under_a_curve_files/05_Find_area_under_a_curve_43_0.png b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/05_Find_area_under_a_curve_files/05_Find_area_under_a_curve_43_0.png index b051382b2a..fab91ef9f1 100644 Binary files a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/05_Find_area_under_a_curve_files/05_Find_area_under_a_curve_43_0.png and b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/05_Find_area_under_a_curve_files/05_Find_area_under_a_curve_43_0.png differ diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/05_Find_area_under_a_curve_files/05_Find_area_under_a_curve_47_0.png b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/05_Find_area_under_a_curve_files/05_Find_area_under_a_curve_47_0.png index 72737aa45e..b0656a9baa 100644 Binary files a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/05_Find_area_under_a_curve_files/05_Find_area_under_a_curve_47_0.png and b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/05_Find_area_under_a_curve_files/05_Find_area_under_a_curve_47_0.png differ diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/05_Find_area_under_a_curve_files/05_Find_area_under_a_curve_49_0.png b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/05_Find_area_under_a_curve_files/05_Find_area_under_a_curve_49_0.png index dc1a3485e7..cf751f8dcc 100644 Binary files a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/05_Find_area_under_a_curve_files/05_Find_area_under_a_curve_49_0.png and b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/05_Find_area_under_a_curve_files/05_Find_area_under_a_curve_49_0.png differ diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/06_Calculate_statistics_for_records.md b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/06_Calculate_statistics_for_records.md index 3e82b63211..b7dda4b312 100644 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/06_Calculate_statistics_for_records.md +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/06_Calculate_statistics_for_records.md @@ -1,6 +1,6 @@ # Calculate statistics for a set of records -Summarise (roll up) test results into new statistical data records. +Summarise (roll up) test results into new statistical data records. In this example, the tests are stored in *Tensile Test Data* table and the statistical data is stored in *Tensile Statistical Data*. Since the sample data is arranged by specimen, the mean and other statistics will be stored by @@ -29,18 +29,18 @@ To simplify your own roll-up, you can: ```python import statistics from typing import List -from GRANTA_MIScriptingToolkit import granta as mpy +import ansys.grantami.core as mpy def rollup_point_attribute( source_attributes: List[mpy.AttributeValue], target_attribute: mpy.AttributeValue, record: mpy.Record, ) -> None: - + if any(isinstance(attr, mpy.AttributePointMulti) for attr in source_attributes): + raise TypeError("Multi-valued points are not supported by this script") + values = [attr.value for attr in source_attributes if attr.value] - assert all([isinstance(value, float) for value in values]), "Multi-valued points are not supported by this script" - if len(values) == 0: return @@ -96,28 +96,29 @@ def copy_attribute( target_attribute: mpy.AttributeValue, record: mpy.Record, ) -> None: - if target_attribute.type == "POIN": - values = set([attr.value for attr in source_attributes if attr.value]) - - assert all( - [isinstance(value, float) for value in values] - ), "Multi-valued points are not supported by this script" - - assert len(values) == 1, "Values must be identical to copy, received '{0}'".format(', '.join(values)) + if any(isinstance(attr, mpy.AttributePointMulti) for attr in source_attributes): + raise TypeError("Multi-valued points are not supported by this script") + values = {attr.value for attr in source_attributes if attr.value} + if len(values) != 1: + formatted_values = ", ".join(values) + raise ValueError(f"Values must be identical to copy, received '{formatted_values}'") target_attribute.value = values.pop() elif target_attribute.type == "DISC": - # No support for multivalued - if any(attr.is_multivalued for attr in source_attributes): - raise TypeError("No support for multivalued") - values = set([attr.value for attr in source_attributes if attr.value]) - assert len(values) == 1, "Values must be identical to copy, received '{0}'".format(', '.join(values)) + if any(isinstance(attr, mpy.AttributeDiscreteMulti) for attr in source_attributes): + raise TypeError("Multi-valued discretes are not supported by this script") + values = {attr.value for attr in source_attributes if attr.value} + if len(values) != 1: + formatted_values = ", ".join(values) + raise ValueError(f"Values must be identical to copy, received '{formatted_values}'") target_attribute.value = values.pop() else: - values = set([attr.value for attr in source_attributes if attr.value]) - assert len(values) == 1, "Values must be identical to copy, received '{0}'".format(', '.join(values)) + values = {attr.value for attr in source_attributes if attr.value} + if len(values) != 1: + formatted_values = ", ".join(values) + raise ValueError(f"Values must be identical to copy, received '{formatted_values}'") target_attribute.value = values.pop() record.set_attributes([target_attribute]) @@ -132,19 +133,24 @@ Connect to Granta MI and fetch the folder corresponding to the composite *3M, S- ```python -mi = mpy.connect("http://my.server.name/mi_servicelayer", autologon=True) +mi = mpy.SessionBuilder("http://my.server.name/mi_servicelayer").with_autologon() db = mi.get_db(db_key="MI_Training") test_table = db.get_table("Tensile Test Data") statistics_table = db.get_table("Tensile Statistical Data") material_record = test_table.search_for_records_by_name("3M, S-Glass Unitape S2/SP381")[0] -print(material_record) +material_record ``` + + + *Previous cell output:* ```output ``` + + To make processing easier, convert the structure of the data from Material => Orientation => RTD => Specimen => Test result @@ -167,8 +173,8 @@ to dealing with advanced tree-traversal. orientation_records = material_record.children test_records = { orientation.name: { - specimen.name: specimen.children for specimen in - test_table.get_records_from_path( + specimen.name: specimen.children + for specimen in test_table.get_records_from_path( starting_node=orientation, tree_path=["RTD"], use_short_names=True, @@ -181,7 +187,7 @@ test_records = { Define the attributes you want to calculate statistics for, and those you want to copy from the test records. To fetch large numbers of records or attributes efficiently, use the `table.bulk_fetch()` method (see -[Performance optimization](./../../user_guide/performance_optimization.rst)). +[Performance optimization](../../user_guide/performance_optimization.rst)). ```python @@ -259,18 +265,19 @@ statistical data record and the test records it summarises. ```python import datetime + timestamp = datetime.datetime.now().isoformat() for orientation, specimens in test_records.items(): folder = statistics_table.path_from( starting_node=None, - tree_path = [ + tree_path=[ "Epoxy/Glass", "3M, S-Glass Unitape S2/SP381", timestamp, orientation, "RTD", ], - color=mpy.RecordColor.Aqua + color=mpy.RecordColor.Aqua, ) for specimen, test_runs in specimens.items(): rollup_record = statistics_table.create_record(name=specimen, parent=folder) @@ -279,7 +286,7 @@ for orientation, specimens in test_records.items(): try: target_attribute = rollup_record.attributes[rollup] rollup_point_attribute(source_attributes, target_attribute, rollup_record) - except AssertionError: # Attribute contains multivalued data + except TypeError: # Attribute contains multivalued data continue except KeyError: print("No attribute in target table to roll attribute '{0}' into.".format(rollup)) @@ -290,7 +297,7 @@ for orientation, specimens in test_records.items(): try: target_attribute = rollup_record.attributes[copy_attr] copy_attribute(source_attributes, target_attribute, rollup_record) - except AssertionError: # Attribute contains multivalued data + except TypeError: # Attribute contains multivalued data continue except KeyError: print("No attribute in target table to copy attribute '{0}' into.".format(copy_attr)) @@ -307,12 +314,12 @@ for orientation, specimens in test_records.items(): ``` *Previous cell output:* ```output -Rollup completed for the specimen 'LBU15', view this record at 'http://my.server.name/mi/datasheet.aspx?dbKey=MI_Training&recordHistoryGuid=32d98e87-d538-4958-bf4d-93d4cf4bf61e' -Rollup completed for the specimen 'LBU14', view this record at 'http://my.server.name/mi/datasheet.aspx?dbKey=MI_Training&recordHistoryGuid=58b52053-d236-447d-b5fd-7fa0e66cd1c3' -Rollup completed for the specimen 'LBJ83', view this record at 'http://my.server.name/mi/datasheet.aspx?dbKey=MI_Training&recordHistoryGuid=021bf20b-d0a8-4be6-99f3-9ee57993b1a3' -Rollup completed for the specimen 'LBJ62', view this record at 'http://my.server.name/mi/datasheet.aspx?dbKey=MI_Training&recordHistoryGuid=baab458e-ebd3-486c-9e50-d6da39493e27' -Rollup completed for the specimen 'LBJ53', view this record at 'http://my.server.name/mi/datasheet.aspx?dbKey=MI_Training&recordHistoryGuid=dbab2acf-fdc2-4444-9e0a-a2551063f3e4' -Rollup completed for the specimen 'LBJ42', view this record at 'http://my.server.name/mi/datasheet.aspx?dbKey=MI_Training&recordHistoryGuid=7a59d226-e6bb-4f55-97cc-b68157ef9355' -Rollup completed for the specimen 'LBJ14', view this record at 'http://my.server.name/mi/datasheet.aspx?dbKey=MI_Training&recordHistoryGuid=ab4a3789-6adf-4302-b220-acd899a829ae' -Rollup completed for the specimen 'LBJ13', view this record at 'http://my.server.name/mi/datasheet.aspx?dbKey=MI_Training&recordHistoryGuid=6266db70-d0b5-4acd-95aa-6864b9ed2da0' +Rollup completed for the specimen 'LBU15', view this record at 'http://my.server.name/mi/datasheet.aspx?dbKey=MI_Training&recordHistoryGuid=de12216b-85c0-49c9-b605-3448a89e13c5' +Rollup completed for the specimen 'LBU14', view this record at 'http://my.server.name/mi/datasheet.aspx?dbKey=MI_Training&recordHistoryGuid=00addbdf-1631-4bef-99cc-6c0a962f1833' +Rollup completed for the specimen 'LBJ83', view this record at 'http://my.server.name/mi/datasheet.aspx?dbKey=MI_Training&recordHistoryGuid=2395f499-c293-4446-acb3-1e904fafab90' +Rollup completed for the specimen 'LBJ62', view this record at 'http://my.server.name/mi/datasheet.aspx?dbKey=MI_Training&recordHistoryGuid=f44b6cb6-749e-4913-861d-5cd07d8db2d7' +Rollup completed for the specimen 'LBJ53', view this record at 'http://my.server.name/mi/datasheet.aspx?dbKey=MI_Training&recordHistoryGuid=f94cfc30-d44c-4100-b2f2-a7b57abf4d85' +Rollup completed for the specimen 'LBJ42', view this record at 'http://my.server.name/mi/datasheet.aspx?dbKey=MI_Training&recordHistoryGuid=219396fd-ad80-4def-a91c-f435074ef72c' +Rollup completed for the specimen 'LBJ14', view this record at 'http://my.server.name/mi/datasheet.aspx?dbKey=MI_Training&recordHistoryGuid=6d964778-afc3-42e3-808f-c86f3253815f' +Rollup completed for the specimen 'LBJ13', view this record at 'http://my.server.name/mi/datasheet.aspx?dbKey=MI_Training&recordHistoryGuid=9de8cc1b-c728-4ed4-844c-ae47ee57f929' ``` \ No newline at end of file diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/06_Calculate_statistics_for_records_files/06_Calculate_statistics_for_records_12_0.png b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/06_Calculate_statistics_for_records_files/06_Calculate_statistics_for_records_12_0.png index cd0e21c8fd..6af1709cb3 100644 Binary files a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/06_Calculate_statistics_for_records_files/06_Calculate_statistics_for_records_12_0.png and b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/06_Calculate_statistics_for_records_files/06_Calculate_statistics_for_records_12_0.png differ diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/07_Calculate_statistics_for_functional_attributes.md b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/07_Calculate_statistics_for_functional_attributes.md index 73bd21b2e1..99a100ca80 100644 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/07_Calculate_statistics_for_functional_attributes.md +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/07_Calculate_statistics_for_functional_attributes.md @@ -9,9 +9,9 @@ Connect to Granta MI and specify a database and tables. ```python -from GRANTA_MIScriptingToolkit import granta as mpy +import ansys.grantami.core as mpy -mi = mpy.connect("http://my.server.name/mi_servicelayer", autologon=True) +mi = mpy.SessionBuilder("http://my.server.name/mi_servicelayer").with_autologon() db = mi.get_db(db_key="MI_Training") test_table = db.get_table("Tensile Test Data") @@ -45,11 +45,7 @@ test_records = plate_folder.get_descendants() test_records = bulk_fetch_attributes_and_return_populated_records( table=test_table, records=test_records, - attributes=[ - "Specimen ID", - "Tensile Response (11 axis)", - "Test Temperature" - ] + attributes=["Specimen ID", "Tensile Response (11 axis)", "Test Temperature"], ) temperature_unit = test_table.attributes["Test Temperature"].unit temperature_column_name = f"Test Temperature [{temperature_unit}]" @@ -73,7 +69,9 @@ for record in test_records: specimen_id = record.attributes["Specimen ID"].value test_temperature = record.attributes["Test Temperature"].value - df_functional_data = pd.DataFrame(response_attr.value[1:], columns=response_attr.value[0]) + df_functional_data = pd.DataFrame( + response_attr.table_view.table_view[1:], columns=response_attr.table_view.table_view[0] + ) df_current = pd.concat( [ @@ -85,7 +83,7 @@ for record in test_records: ] ] .mean(axis=1) - .rename("Tensile Response (11 axis) [MPa]") + .rename("Tensile Response (11 axis) [MPa]"), ], axis=1, ) @@ -143,7 +141,7 @@ for temperature_index, temperature in enumerate(grouped_by.groups): data=zip( *[ [row[temperature_index] for row in confidence_intervals[0]], - [row[temperature_index] for row in confidence_intervals[1]] + [row[temperature_index] for row in confidence_intervals[1]], ], ), index=df_interpolated.index, @@ -156,7 +154,7 @@ for temperature_index, temperature in enumerate(grouped_by.groups): grouped_by.mean().T[temperature].rename("mean"), grouped_by.min().T[temperature].rename("min"), grouped_by.max().T[temperature].rename("max"), - df_cis + df_cis, ], axis=1, ).dropna() @@ -224,7 +222,7 @@ plt.show() ## Import roll-up data into Granta MI Define two helper functions: one that resamples a DataFrame linearly based on a target column's values, and one that -appends a series of range values to a `FloatFunctionalAttributeValue`, skipping any `NaN` values. +creates a series of range values. (Although `pandas` has a built-in `resample()` function, it only operates on time-series data.) @@ -235,23 +233,22 @@ import numpy as np def subsample_dataframe(df, x_axis, n_samples): new_index = np.linspace(df[x_axis].min(), df[x_axis].max(), n_samples) df.index = df[x_axis] - df_subsampled = ( - df - .reindex(df.index.union(new_index)) - .interpolate("index") - .reindex(index=new_index) - ) + df_subsampled = df.reindex(df.index.union(new_index)).interpolate("index").reindex(index=new_index) df_subsampled.index = range(n_samples) return df_subsampled -def append_series(functional_attribute, x_data, y_low_data, y_high_data=None, data_type=None): +def make_series(x_data, y_low_data, y_high_data=None, data_type=None) -> mpy.SeriesRange: if y_high_data is None: y_high_data = y_low_data - for x, y_low, y_high in zip(x_data, y_low_data, y_high_data): - if pd.isna(y_low) or pd.isna(y_high): - continue - functional_attribute.value.append([y_low, y_high, x, data_type, False]) + return mpy.SeriesRange( + x=tuple(x_data), + y_low=tuple(y_low_data), + y_high=tuple(y_high_data), + parameters=( + mpy.SeriesParameterValue("Data Type", data_type), + ) if data_type is not None else tuple() + ) ``` Import the roll-up data into a Granta MI database. Use `path_from()` to create a folder path, and then create a @@ -279,44 +276,44 @@ for plot_index, temperature in enumerate(grouped_by.groups): name=f"Functional Rollup ({round(temperature, 0)} {temperature_unit})", parent=folder, ) - + temp_attribute = rec.attributes["Test Temperature"] temp_attribute.value = temperature temp_attribute.unit = temperature_unit - func_attr = rec.attributes["Tensile Response Analysis (11 axis)"] + func_attr: mpy.AttributeFunctionalSeriesRange = rec.attributes["Tensile Response Analysis (11 axis)"] func_attr.unit = "MPa" # Get the rows corresponding to the current temperature df_current = df_all_plots.loc[df_all_plots["temperature"] == temperature] df_current = subsample_dataframe(df_current, "strain", 101) - append_series( - func_attr, - df_current["strain"], - df_current["mean"], - data_type="Mean", - ) - append_series( - func_attr, - df_current["strain"], - df_current["lower_ci"], - df_current["upper_ci"], - data_type="95% Confidence Interval", - ) - append_series( - func_attr, - df_current["strain"], - df_current["min"], - df_current["max"], - data_type="Range", + func_attr.value = ( + make_series( + df_current["strain"], + df_current["mean"], + data_type="Mean", + ), + make_series( + df_current["strain"], + df_current["lower_ci"], + df_current["upper_ci"], + data_type="95% Confidence Interval", + ), + make_series( + df_current["strain"], + df_current["min"], + df_current["max"], + data_type="Range", + ), ) rec.set_attributes([temp_attribute, func_attr]) rec = mi.update([rec])[0] associated_test_records = [ - test_record for test_record in test_records + test_record + for test_record in test_records if round(test_record.attributes["Test Temperature"].value, 1) == temperature ] rec.set_links("Tensile Test Data", associated_test_records) diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/07_Calculate_statistics_for_functional_attributes_files/07_Calculate_statistics_for_functional_attributes_12_0.png b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/07_Calculate_statistics_for_functional_attributes_files/07_Calculate_statistics_for_functional_attributes_12_0.png index 4c18215e80..683ffa631e 100644 Binary files a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/07_Calculate_statistics_for_functional_attributes_files/07_Calculate_statistics_for_functional_attributes_12_0.png and b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/07_Calculate_statistics_for_functional_attributes_files/07_Calculate_statistics_for_functional_attributes_12_0.png differ diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/08_Fit_model_to_series_data.md b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/08_Fit_model_to_series_data.md index 7b1bdc0428..7c777add26 100644 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/08_Fit_model_to_series_data.md +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/08_Fit_model_to_series_data.md @@ -11,9 +11,9 @@ Set the unit system explicitly to ensure repeatable results. ```python -from GRANTA_MIScriptingToolkit import granta as mpy +import ansys.grantami.core as mpy -mi = mpy.connect("http://my.server.name/mi_servicelayer", autologon=True) +mi = mpy.SessionBuilder("http://my.server.name/mi_servicelayer").with_autologon() db = mi.get_db(db_key="MI_Training") db.unit_system = "Metric" @@ -28,13 +28,7 @@ to iterate through the different values of *Test Temperature*. ```python -all_records = test_data_table.get_records_from_path( - starting_node=None, - tree_path=[ - "High Alloy Steels", - "AMS 6520" - ] -) +all_records = test_data_table.get_records_from_path(starting_node=None, tree_path=["High Alloy Steels", "AMS 6520"]) plate_record = all_records[0] temperature_test_groups = plate_record.children @@ -60,7 +54,7 @@ temperature_unit = test_temperature.unit tensile_response = test_data_table.attributes["Tensile Response (11 axis)"] tensile_response_unit = tensile_response.unit strain_unit = tensile_response.parameters["Strain"].unit -record_name = mpy.PseudoAttributeDefinition(name="name") +record_name = mpy.RecordProperties.name test_record_dict = {} for test_group in temperature_test_groups: @@ -71,7 +65,8 @@ for test_group in temperature_test_groups: ) test_records = [ - test_record for test_record in test_records + test_record + for test_record in test_records if not test_record.attributes["Test Temperature"].is_empty() and not test_record.attributes["Tensile Response (11 axis)"].is_empty() ] @@ -103,14 +98,14 @@ import numpy as np def ramberg_osgood_model(stress_: np.ndarray, modulus_: float, k_: float, n_: float) -> np.ndarray: hook_strain = stress_ / modulus_ - return hook_strain + k_ * hook_strain ** n_ + return hook_strain + k_ * hook_strain**n_ ``` ## Define a helper function to fit the model to a series Using the `scipy.optimize` package, fit the Ramberg-Osgood model to the stress-strain data at each temperature. -Provide initial values and constrain the parameters to positive and realistic values. These values are material +Provide initial values and constrain the parameters to positive and realistic values. These values are material dependent - for Steel we use the following: | Parameter | Minimum | Maximum | Initial Value | @@ -127,20 +122,16 @@ The goodness of fit can be estimated by inspecting the diagonal of the covarianc from typing import Tuple, List from scipy.optimize import curve_fit -def fit_ramberg_osgood_model(stress_strain_data: np.ndarray) -> Tuple[np.ndarray, Tuple[float, float, float]]: +def fit_ramberg_osgood_model( + stress_strain_data: np.ndarray, +) -> Tuple[np.ndarray, Tuple[float, float, float]]: parameter_bounds = ((1, 0, 0), (1e5, 1e2, 1e2)) f_init = (1e3, 1, 1) stress = stress_strain_data[:, 0] strain = stress_strain_data[:, 1] - fitted_parameters, covariance = curve_fit( - ramberg_osgood_model, - stress, - strain, - f_init, - bounds=parameter_bounds - ) + fitted_parameters, covariance = curve_fit(ramberg_osgood_model, stress, strain, f_init, bounds=parameter_bounds) # Compute the sum-of-squared error for each model parameter sse = np.sqrt(np.diag(covariance)) @@ -162,20 +153,16 @@ Define three more helper functions to make the main loop easier to understand: ```python def get_response_data(records: List[mpy.Record]) -> np.ndarray: - # Iterate through records, extract the appropriate attribute and ensure the units are set correctly - test_response_attributes = [] + # Iterate through records, extract the appropriate attribute + test_response_series = [] for record in records: tensile_response = record.attributes["Tensile Response (11 axis)"] - test_response_attributes.append(tensile_response) - - # Convert the AttributeValue objects into numpy arrays: - # 1. Trim off the first row, which contains the column headers - # 2. Cast each element to float (numpy treats these values as an object unless told otherwise) - test_response_data = [np.array(attribute.value[1:]).astype(float) for attribute in test_response_attributes] + # Test records are expected to include a single series + if len(tensile_response.value) != 1: + raise ValueError + test_response_series.append(tensile_response.value[0]) - # The MI Scripting Toolkit stores all functional data as ranges. Since both values are the same, - # take the first. - stress_strain_response = [np.column_stack((curve[1:, 0], curve[1:, 2])) for curve in test_response_data] + stress_strain_response = [np.column_stack((series.y, series.x)) for series in test_response_series] return stress_strain_response @@ -200,7 +187,7 @@ def compute_yield_point(stress_strain_data: np.ndarray, modulus: float) -> Tuple ## Fit to the data -For each set of test records, extract the stress-strain curve and fit to the Ramberg-Osgood model using the helper +For each set of test records, extract the stress-strain curve and fit to the Ramberg-Osgood model using the helper functions defined above. Combine all the test runs into one dataset and fit the model to the aggregate data. In your own scripts, you will also need to take into account multiple series, range data, and other features of your @@ -229,7 +216,7 @@ for test_temperature, tests_at_temperature in sorted(test_record_dict.items()): "modulus": modulus, "yield_point": (yield_strain, yield_stress), "k": k, - "n": n + "n": n, } print(f"Fit parameters at Temperature {test_temperature:.1f}{temperature_unit}:") pprint.pprint(tests_at_temperature["model_parameters"]) @@ -238,51 +225,50 @@ for test_temperature, tests_at_temperature in sorted(test_record_dict.items()): *Previous cell output:* ```output Fit parameters at Temperature 194.3K: -{'k': np.float64(0.14863494441724703), - 'modulus': np.float64(2062.0202035684933), - 'n': np.float64(8.791864160782794), - 'yield_point': (np.float64(1.2342202393471564), - np.float64(2132.5830284732797))} +{'k': np.float64(0.1486344480944722), + 'modulus': np.float64(2062.019771768718), + 'n': np.float64(8.791873200741906), + 'yield_point': (np.float64(1.234217805863505), np.float64(2132.5775640058087))} Fit parameters at Temperature 296.1K: -{'k': np.float64(0.1791326818346526), - 'modulus': np.float64(1981.6619869624521), - 'n': np.float64(9.114593900403749), - 'yield_point': (np.float64(1.2120542799247618), - np.float64(2005.5494952695572))} +{'k': np.float64(0.17913223713103874), + 'modulus': np.float64(1981.6616644768533), + 'n': np.float64(9.114602167742552), + 'yield_point': (np.float64(1.2120572321072252), + np.float64(2005.5550191234408))} Fit parameters at Temperature 422.0K: -{'k': np.float64(0.30688860274078), - 'modulus': np.float64(1904.622968058874), - 'n': np.float64(8.456684372086439), - 'yield_point': (np.float64(1.1505510048627243), - np.float64(1810.4412761729873))} +{'k': np.float64(0.30688819443104687), + 'modulus': np.float64(1904.6227482778297), + 'n': np.float64(8.456689311588288), + 'yield_point': (np.float64(1.1505438661129421), + np.float64(1810.4274706346653))} Fit parameters at Temperature 588.7K: -{'k': np.float64(0.46386736088140446), - 'modulus': np.float64(1825.4403056571182), - 'n': np.float64(8.486132455089072), - 'yield_point': (np.float64(1.1055238461378185), - np.float64(1652.9797264736287))} +{'k': np.float64(0.4638673295642107), + 'modulus': np.float64(1825.4402932299422), + 'n': np.float64(8.486132687862076), + 'yield_point': (np.float64(1.1055222098943815), + np.float64(1652.9767283558251))} Fit parameters at Temperature 699.8K: -{'k': np.float64(0.4788380313466644), - 'modulus': np.float64(1720.6433395354948), - 'n': np.float64(7.1629878083927006), - 'yield_point': (np.float64(1.0851718213011277), - np.float64(1523.0649986662886))} +{'k': np.float64(0.47884481281833274), + 'modulus': np.float64(1720.646273499455), + 'n': np.float64(7.162934830935863), + 'yield_point': (np.float64(1.0851710034728455), + np.float64(1523.0661885353247))} Fit parameters at Temperature 810.9K: -{'k': np.float64(3.0310550950006268), - 'modulus': np.float64(1501.671776811084), - 'n': np.float64(6.911013554765233), - 'yield_point': (np.float64(0.8747695429959347), - np.float64(1013.2823785687083))} +{'k': np.float64(3.0310724717671658), + 'modulus': np.float64(1501.6751764376415), + 'n': np.float64(6.910966909404485), + 'yield_point': (np.float64(0.8747594343770989), + np.float64(1013.2694926711931))} ``` ## Plot the results @@ -312,13 +298,11 @@ for test_temperature, tests_at_temperature in sorted(test_record_dict.items()): # Plot source data series for series in response_data: - ax_current.plot( - series[:, 1], series[:, 0], alpha=0.3 - ) + ax_current.plot(series[:, 1], series[:, 0], alpha=0.3) # Plot fitted model fitted_data = tests_at_temperature["fitted_model_data"] - fit_curve = ax_current.plot(fitted_data[:, 1], fitted_data[:, 0], '--', label="Fitted Model") + fit_curve = ax_current.plot(fitted_data[:, 1], fitted_data[:, 0], "--", label="Fitted Model") # Add the yield point yield_strain, yield_stress = model_parameters["yield_point"] @@ -329,16 +313,13 @@ for test_temperature, tests_at_temperature in sorted(test_record_dict.items()): xytext=(-50, -60), textcoords="offset points", size=8, - arrowprops={ - "arrowstyle": "->", - "connectionstyle": "arc3,rad=.2" - } + arrowprops={"arrowstyle": "->", "connectionstyle": "arc3,rad=.2"}, ) # Add the elastic response line - elastic_strain_region = [0., yield_strain] - elastic_stress = [0., model_parameters["modulus"] * yield_strain] - elastic_curve = ax_current.plot(elastic_strain_region, elastic_stress, '-.', label="Elastic Response") + elastic_strain_region = [0.0, yield_strain] + elastic_stress = [0.0, model_parameters["modulus"] * yield_strain] + elastic_curve = ax_current.plot(elastic_strain_region, elastic_stress, "-.", label="Elastic Response") # Add Legend to last subplot (where there is more whitespace) if current_plot_index == 5: diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/08_Fit_model_to_series_data_files/08_Fit_model_to_series_data_16_0.png b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/08_Fit_model_to_series_data_files/08_Fit_model_to_series_data_16_0.png index db9681078b..1eef387093 100644 Binary files a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/08_Fit_model_to_series_data_files/08_Fit_model_to_series_data_16_0.png and b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/08_Fit_model_to_series_data_files/08_Fit_model_to_series_data_16_0.png differ diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/09_Compare_test_data_to_specification_values.md b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/09_Compare_test_data_to_specification_values.md index ea72ea32e0..8de68dae7b 100644 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/09_Compare_test_data_to_specification_values.md +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/09_Compare_test_data_to_specification_values.md @@ -9,14 +9,14 @@ test data. Connect to Granta MI and specify the database and table containing the test results. Since this operation is likely to be performed as a batch operation, see -[Authentication](./../../user_guide/authentication.rst) for more information about connecting to Granta MI securely in +[Authentication](../../user_guide/authentication.rst) for more information about connecting to Granta MI securely in batch mode operation. ```python -from GRANTA_MIScriptingToolkit import granta as mpy +import ansys.grantami.core as mpy -mi = mpy.connect("http://my.server.name/mi_servicelayer", autologon=True) +mi = mpy.SessionBuilder("http://my.server.name/mi_servicelayer").with_autologon() db = mi.get_db(db_key="MI_Training") test_data_table = db.get_table("Tensile Test Data") print(test_data_table) @@ -53,7 +53,6 @@ where the attribute is populated, but the meta-attribute is empty. ```python from typing import List - def find_unprocessed_records_for_attribute(test_attribute_name: str) -> List[mpy.Record]: test_attribute_definition = test_data_table.attributes[test_attribute_name] spec_result_attribute_definition = test_attribute_definition.meta_attributes[SPEC_STATUS_META_ATTRIBUTE] @@ -138,7 +137,7 @@ for attribute_name in COMPARISON_ATTRIBUTES.values(): attribute = test_data_table.attributes[attribute_name] meta_attribute = attribute.meta_attributes[SPEC_STATUS_META_ATTRIBUTE] test_data_attributes.extend([attribute, meta_attribute]) - + test_data_table.bulk_fetch(records=records_to_process, attributes=test_data_attributes) print(f"Bulk fetched {len(test_data_attributes)} attributes across {len(records_to_process)} records") ``` @@ -160,7 +159,7 @@ spec_records = set() for r in records_to_process: spec_records.update(r.links[SPEC_LINK_GROUP_NAME]) spec_records = list(spec_records) - + # Step 2: Get the specification table object specification_table_name = spec_records[0].table_name specification_table = db.get_table(specification_table_name) @@ -188,9 +187,9 @@ def compare_test_to_spec(test_attribute: mpy.AttributePoint, spec_attribute: mpy if test_attribute.is_empty() or spec_attribute.is_empty(): return None test_value = test_attribute.value - low_spec_value = spec_attribute.value["low"] or float("-inf") - high_spec_value = spec_attribute.value["high"] or float("inf") - + low_spec_value = spec_attribute.value.low if spec_attribute.value.low is not None else float("-inf") + high_spec_value = spec_attribute.value.high if spec_attribute.value.high is not None else float("inf") + if low_spec_value <= test_value <= high_spec_value: return "Test meets specification" else: @@ -199,7 +198,7 @@ def compare_test_to_spec(test_attribute: mpy.AttributePoint, spec_attribute: mpy ### Compare the data Finally, iterate over all records in the `records_to_process` list and all attributes in the `COMPARISON_ATTRIBUTES` -constant. For each combination of record and attribute, call the function defined above and store the result in the +constant. For each combination of record and attribute, call the function defined above and store the result in the *Specification Status* meta-attribute. The comparison is skipped if the meta-attribute is already populated. @@ -209,22 +208,22 @@ records_to_update = [] for test_record in records_to_process: test_specimen_id = test_record.attributes[SPECIMEN_ID_ATTRIBUTE].value print(f"{test_specimen_id}") - + spec_record = next(iter(test_record.links[SPEC_LINK_GROUP_NAME])) modified_attributes = [] for spec_attribute_name, test_attribute_name in COMPARISON_ATTRIBUTES.items(): test_attribute = test_record.attributes[test_attribute_name] - spec_status_meta_attribute = test_attribute.meta_attributes[SPEC_STATUS_META_ATTRIBUTE] + spec_status_meta_attribute = test_attribute.meta_attributes[SPEC_STATUS_META_ATTRIBUTE] if not spec_status_meta_attribute.is_empty(): print(f" - {test_attribute_name} skipped: ") continue - + spec_attribute = spec_record.attributes[spec_attribute_name] status = compare_test_to_spec(test_attribute, spec_attribute) if not status: print(f" - {test_attribute_name} skipped: ") continue - + print(f" - {test_attribute_name} result: {status}") spec_status_meta_attribute.value = status modified_attributes.append(spec_status_meta_attribute) @@ -275,8 +274,7 @@ if records_to_update: modified_records = mi.update(records_to_update) print(f"{len(modified_records)} records modified. Links to the MI Viewer datasheets are provided below.") for modified_record in modified_records: - print(f"{modified_record.attributes[SPECIMEN_ID_ATTRIBUTE].value}" - f": {modified_record.viewer_url}") + print(f"{modified_record.attributes[SPECIMEN_ID_ATTRIBUTE].value}: {modified_record.viewer_url}") else: print("No records modified") ``` diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/10_Material_datasheet_report.md b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/10_Material_datasheet_report.md index c2e02e836b..f6b6ddeee5 100644 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/10_Material_datasheet_report.md +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/10_Material_datasheet_report.md @@ -86,9 +86,9 @@ Export the data for all the required attributes for the 'released' version of th ```python -from GRANTA_MIScriptingToolkit import granta as mpy +import ansys.grantami.core as mpy -mi = mpy.connect("http://my.server.name/mi_servicelayer", autologon=True) +mi = mpy.SessionBuilder("http://my.server.name/mi_servicelayer").with_autologon() db = mi.get_db(db_key="MI_Training") db.unit_system = UNIT_SYSTEM @@ -132,7 +132,7 @@ instead. ```python from docx import Document -report = Document(docx="supporting_files/10_report_template.docx") +report = Document(docx="./supporting_files/10_report_template.docx") ```
@@ -170,13 +170,13 @@ style respectively. from typing import Optional from docx import table -def write_value_to_cell(cell: table._Cell, value: str, style: Optional[str]=None) -> None: +def write_value_to_cell(cell: table._Cell, value: str, style: Optional[str] = None) -> None: paragraph = next(cell.iter_inner_content()) paragraph.text = value paragraph.style = style ``` -### Write the datasheet title +### Write the datasheet title The first table in the template contains identifying information about the material. The first row contains the title, and subsequent rows contain additional information about the material. @@ -249,15 +249,15 @@ def format_attribute( format_spec: str = ".3g", include_unit: bool = False, ) -> Optional[str]: - value = attribute.value + # A null value may either be None or an empty list if not value and value != 0: return None # Switch based on the attribute type if attribute.type == "RNGE": - formatted_value = f"{value['low']:{format_spec}} - {value['high']:{format_spec}}" + formatted_value = f"{value.low:{format_spec}} - {value.high:{format_spec}}" elif attribute.type == "POIN": # Single-valued point only if isinstance(attribute.value, (float, int)): @@ -270,7 +270,7 @@ def format_attribute( raise NotImplementedError(f'Attribute type "{attribute.type}" not supported.') # Include the unit in the output if requested and if it exists - if include_unit and attribute.unit: + if include_unit and hasattr(attribute, "unit") and attribute.unit: return f"{formatted_value} {attribute.unit}" else: return formatted_value @@ -349,11 +349,11 @@ for idx, (attribute_name, label) in enumerate(SINGLE_VALUED_PROPERTIES.items()): write_value_to_cell(label_cell, label, "Property Label") # Write the value to the cell in the center column (column 1 or 4) with the style "Property Value" - value_cell = property_table.cell(target_row, target_column_offset+1) + value_cell = property_table.cell(target_row, target_column_offset + 1) write_value_to_cell(value_cell, value, "Property Value") # Write the unit to the cell in the rightmost column (column 2 or 5) with the style "Property Unit" - unit_cell = property_table.cell(target_row, target_column_offset+2) + unit_cell = property_table.cell(target_row, target_column_offset + 2) write_value_to_cell(unit_cell, unit, "Property Unit") ``` @@ -388,7 +388,7 @@ import seaborn as sns sns.set_theme( palette=["black"], # Datasheet reports are typically black and white - rc={"figure.figsize": (7, 5)} # This size produces plots suitable for printing + rc={"figure.figsize": (7, 5)}, # This size produces plots suitable for printing ) sns.set_style("ticks") # Include tickmarks on axes ``` @@ -403,38 +403,31 @@ import io import pandas as pd def make_graph( - attribute: mpy.AttributeFunctional, + attribute: mpy.AttributeFunctionalSeriesPoint, plot_title: str, y_label: str, x_label: str, constraint_param_name: Optional[str] = None, constraint_label: Optional[str] = None, ) -> io.BytesIO: - value = attribute.value # This dictionary will be used to construct a dataframe data = {"y": list(), "x": list(), "constraint": list()} - + # If a constraint_param_name was provided, set a CONSTRAINT flag to True if constraint_param_name: CONSTRAINT = True else: CONSTRAINT = False - # Get the position of the constraint parameter in the functional data value object - if CONSTRAINT: - param_idx = attribute.constraint_column_index[constraint_param_name] - else: - param_idx = None - parameter_unit = None - # Add the functional data to the dataframe dictionary - for row in value[1:]: - data["y"].append(row[0]) - data["x"].append(row[2]) + for series in value: + data["y"].extend(series.y) + data["x"].extend(series.x) if CONSTRAINT: - data["constraint"].append(f"{row[param_idx]:.3g}") + constraint_value = f"{series.parameters_by_name[constraint_param_name]:.3g}" + data["constraint"].extend([constraint_value]*len(series.x)) if not CONSTRAINT: # Remove the constraint key from the dictionary before converting to a dataframe @@ -459,21 +452,21 @@ def make_graph( y="y", marker="o", ) - - x_unit = attribute.xaxis_parameter.unit + + x_unit = attribute.parameters[attribute.x_axis].unit y_unit = attribute.unit plt.set( title=plot_title, xlabel=f"{x_label} / {x_unit}", ylabel=f"{y_label} / {y_unit}", ) - + # If we have a constraint, add a legend if CONSTRAINT: parameter_unit = attribute.parameters[constraint_param_name].unit legend_title = f"{constraint_label} [{parameter_unit}]" plt.legend(title=legend_title) - + png = convert_plot_to_png(plt) return png ``` diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/11_Powerpoint_summary_example.md b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/11_Powerpoint_summary_example.md index 0c4f2a167b..902d19894c 100644 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/11_Powerpoint_summary_example.md +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/11_Powerpoint_summary_example.md @@ -71,7 +71,7 @@ refers to: ```python GRAPHS = { - "Thermal Conductivity with Temp.": ("Thermal conductivity vs Temperature", "Thermal conductivity", "Temperature", None), + "Thermal Conductivity with Temp.": ("Thermal conductivity vs Temperature", "Thermal conductivity", "Temperature", None), "Thermal Expansion with Temp.": ("Thermal expansion vs Temperature", "Thermal expansion", "Temperature", None), "Specific Heat with Temp.": ("Specific heat vs Temperature", "Specific heat", "Temperature", None), "Tensile Stress/Strain, L": ("Stress vs Strain and Temperature", "Stress", "Strain", ("Temperature", "Temperature")), @@ -84,9 +84,9 @@ Export the data for all the required attributes for the 'released' version of th ```python -from GRANTA_MIScriptingToolkit import granta as mpy +import ansys.grantami.core as mpy -mi = mpy.connect("http://my.server.name/mi_servicelayer", autologon=True) +mi = mpy.SessionBuilder("http://my.server.name/mi_servicelayer").with_autologon() db = mi.get_db(db_key=DATABASE) db.unit_system = UNIT_SYSTEM @@ -130,7 +130,7 @@ instead. ```python from pptx import Presentation -prs = Presentation(pptx="supporting_files/11_presentation_template.pptx") +prs = Presentation(pptx="./supporting_files/11_presentation_template.pptx") ```
@@ -187,13 +187,13 @@ title = f"{material_name} [v{record_version_number}]" # Since the title placeholder is so commonly used, it is available via the title property title_slide.shapes.title.text = title -# The subtitle placeholder does not have a dedicated property. To determine the +# The subtitle placeholder does not have a dedicated property. To determine the # correct placeholder shape, iterate through each one and identify it by name. # If the same placeholder is used multiple times, the idx value is static for # each layout and can be used directly once identified. subtitle = placeholder_idx = None for shape in title_slide.placeholders: - print('%d %s' % (shape.placeholder_format.idx, shape.name)) + print("%d %s" % (shape.placeholder_format.idx, shape.name)) if shape.name.startswith("Subtitle"): placeholder_idx = shape.placeholder_format.idx subtitle = shape @@ -214,6 +214,10 @@ was run previously that saved a file to disk. ```python from pathlib import Path +``` + + +```python output_folder = Path("./output") output_folder.mkdir(exist_ok=True) ``` @@ -270,7 +274,6 @@ def format_attribute( format_spec: str = ".3g", include_unit: bool = False, ) -> Optional[str]: - value = attribute.value # A null value may either be None or an empty list if not value and value != 0: @@ -278,7 +281,7 @@ def format_attribute( # Switch based on the attribute type if attribute.type == "RNGE": - formatted_value = f"{value['low']:{format_spec}} - {value['high']:{format_spec}}" + formatted_value = f"{value.low:{format_spec}} - {value.high:{format_spec}}" elif attribute.type == "POIN": # Single-valued point only if isinstance(attribute.value, (float, int)): @@ -291,10 +294,11 @@ def format_attribute( raise NotImplementedError(f'Attribute type "{attribute.type}" not supported.') # Include the unit in the output if requested and if it exists - if include_unit and attribute.unit: + if include_unit and hasattr(attribute, "unit") and attribute.unit: return f"{formatted_value} {attribute.unit}" else: return formatted_value + ``` Next, create the content slide and populate with the exported data. @@ -402,7 +406,7 @@ value, and unit to the table. ```python for (attribute_name, label), row in zip(SINGLE_VALUED_PROPERTIES.items(), property_table.rows): attribute = released_record.attributes[attribute_name] - + # Use standard form for numeric attributes value = format_attribute(attribute, format_spec=".4e", include_unit=False) unit = attribute.unit @@ -410,7 +414,7 @@ for (attribute_name, label), row in zip(SINGLE_VALUED_PROPERTIES.items(), proper # If there is no value for this attribute, set the value and unit to a dash if value is None: value = unit = "-" - elif unit == "": + elif unit is None: unit = "-" # Write the label to the cell in the leftmost column (column 0 or 3) with the style "Property Label" @@ -454,6 +458,7 @@ def convert_plot_to_png(plt: pyplot) -> io.BytesIO: fig.clf() buffer.seek(0) return buffer + ``` Next, import `seaborn` and set the plot style. @@ -478,37 +483,30 @@ import io import pandas as pd def make_graph( - attribute: mpy.AttributeFunctional, + attribute: mpy.AttributeFunctionalSeriesPoint, y_label: str, x_label: str, constraint_param_name: Optional[str] = None, constraint_label: Optional[str] = None, ) -> io.BytesIO: - value = attribute.value # This dictionary will be used to construct a dataframe data = {"y": list(), "x": list(), "constraint": list()} - + # If a constraint_param_name was provided, set a CONSTRAINT flag to True if constraint_param_name: CONSTRAINT = True else: CONSTRAINT = False - # Get the position of the constraint parameter in the functional data value object - if CONSTRAINT: - param_idx = attribute.constraint_column_index[constraint_param_name] - else: - param_idx = None - parameter_unit = None - # Add the functional data to the dataframe dictionary - for row in value[1:]: - data["y"].append(row[0]) - data["x"].append(row[2]) + for series in value: + data["y"].extend(series.y) + data["x"].extend(series.x) if CONSTRAINT: - data["constraint"].append(f"{row[param_idx]:.3g}") + constraint_value = f"{series.parameters_by_name[constraint_param_name]:.3g}" + data["constraint"].extend([constraint_value]*len(series.x)) if not CONSTRAINT: # Remove the constraint key from the dictionary before converting to a dataframe @@ -534,22 +532,23 @@ def make_graph( y="y", marker="o", ) - - x_unit = attribute.xaxis_parameter.unit + + x_unit = attribute.parameters[attribute.x_axis].unit y_unit = attribute.unit plt.set( xlabel=f"{x_label} / {x_unit}", ylabel=f"{y_label} / {y_unit}", ) - + # If we have a constraint, add a legend if CONSTRAINT: parameter_unit = attribute.parameters[constraint_param_name].unit legend_title = f"{constraint_label} [{parameter_unit}]" plt.legend(title=legend_title) - + png = convert_plot_to_png(plt) return png + ``` Finally, use this function to create a plot image for each functional attribute and add it to the @@ -575,7 +574,7 @@ for attribute_name, (title, y_label, x_label, constraint_info) in GRAPHS.items() ) # Create a new slide based on the graph layout graph_slide = prs.slides.add_slide(graph_layout) - + # Set the title of the slide to be the graph title graph_slide.shapes.title.text = title for shape in graph_slide.placeholders: diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/12_Preparing_data_for_Power_BI.md b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/12_Preparing_data_for_Power_BI.md index 60efac7e23..0e7f5db741 100644 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/12_Preparing_data_for_Power_BI.md +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/12_Preparing_data_for_Power_BI.md @@ -72,10 +72,10 @@ DataFrames have unique variable names. ```python -from GRANTA_MIScriptingToolkit import granta as mpy -import pandas +import ansys.grantami.core as mpy +import pandas as pd -mi = mpy.connect("http://my.server.name/mi_servicelayer", autologon=True) +mi = mpy.SessionBuilder("http://my.server.name/mi_servicelayer").with_autologon() # Create a DataFrame of all databases. _databases = [ @@ -86,7 +86,7 @@ _databases = [ } for db in mi.dbs ] -databases = pandas.DataFrame.from_records(_databases) +databases = pd.DataFrame.from_records(_databases) # Create a DataFrame of all tables in all databases. _tables = [ @@ -97,7 +97,7 @@ _tables = [ } for db in mi.dbs for table in db.tables ] -tables = pandas.DataFrame.from_records(_tables) +tables = pd.DataFrame.from_records(_tables) # Create a DataFrame of all attributes in all tables in all databases. _all_attributes = [ @@ -106,13 +106,13 @@ _all_attributes = [ "Table.Guid": table.guid, "Attribute.Name": attribute.name, "Attribute.Type": attribute.type, - "Attribute.Unit": attribute.unit, + "Attribute.Unit": getattr(attribute, "unit", None) or "", "Attribute.Created": attribute.history.created_at, "Attribute.LastModified": attribute.history.last_modified_at, } for db in mi.dbs for table in db.tables for attribute in table.attributes.values() ] -all_attributes = pandas.DataFrame.from_records(_all_attributes) +all_attributes = pd.DataFrame.from_records(_all_attributes) ``` ## Advanced usage @@ -152,7 +152,7 @@ example_table.bulk_fetch( mpy.RecordProperties.last_modified_on, mpy.RecordProperties.created_by, mpy.RecordProperties.last_modified_by, - ] + ], ) _example_records_properties = [ { @@ -167,7 +167,7 @@ _example_records_properties = [ } for record in example_records ] -example_records_revision = pandas.DataFrame.from_records(_example_records_properties) +example_records_revision = pd.DataFrame.from_records(_example_records_properties) # Create a DataFrame with the data revision information for all attributes for all records in the example table. example_table.bulk_fetch_data_revision_history(example_records) @@ -187,7 +187,7 @@ _example_records_data_revision = [ } for record in example_records for attribute_name, attribute_revision in record.data_revision_history.items() ] -example_records_data_revision = pandas.DataFrame.from_records(_example_records_data_revision) +example_records_data_revision = pd.DataFrame.from_records(_example_records_data_revision) ``` ### Performance considerations diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/13_Data_validation.md b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/13_Data_validation.md index 81fec5420c..266ddc9afa 100644 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/13_Data_validation.md +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/13_Data_validation.md @@ -18,7 +18,7 @@ Before we define the rules, import the Scripting Toolkit so we can use Python ty ```python -from GRANTA_MIScriptingToolkit import granta as mpy +import ansys.grantami.core as mpy ``` ### check_attribute_is_populated @@ -29,7 +29,7 @@ Next, define the first data validation rule. This rule will check that an attrib ```python def check_attribute_is_populated(record: mpy.Record, attribute_name: str) -> tuple[bool, str | None]: attribute = record.attributes[attribute_name] - if attribute.is_empty(): + if attribute.is_empty(): return False, f'Attribute "{attribute_name}" is not populated for record "{record.name}"' return True, None ``` @@ -70,33 +70,24 @@ monotonically increasing for each individual series. ```python def check_attribute_is_monotonically_increasing(record: mpy.Record, attribute_name: str) -> tuple[bool, str | None]: - attribute = record.attributes[attribute_name] - - # Initialize values for the previous datapoint and series - previous_y = previous_x = -float("inf") - current_series = 0 - - # Iterate over each row in the database, splitting the data by series - for row in attribute.data_with_series_number[1:]: - y = row[0] # First value is always the y attribute - x = row[2] # Third value is always the x parameter - series = row[-1] # The final value is the series number - - # If the series has changed, then update the series value - if series != current_series: - current_series = series - - # If the series hasn't changed, then check values - elif y <= previous_y or x <= previous_x: - return ( - False, - f'Attribute "{attribute_name}", series {series} is not monotonically increasing for record ' - f'"{record.name}"' - ) - - # Update the previous values - previous_y = y - previous_x = x + attribute: mpy.AttributeFunctionalSeriesPoint = record.attributes[attribute_name] + + for series_index, series in enumerate(attribute.value): + # Initialize values + previous_y = previous_x = -float("inf") + for y, x in zip(series.y, series.x): + # Check values + if y <= previous_y or x <= previous_x: + return ( + False, + f'Attribute "{attribute_name}", series {series_index} is not monotonically increasing for record ' + f'"{record.name}"', + ) + + # Update the previous values + previous_y = y + previous_x = x + return True, None ``` @@ -137,7 +128,7 @@ produces a list of records, for example searching for a last modified date, or u ```python -mi = mpy.connect("http://my.server.name/mi_servicelayer", autologon=True) +mi = mpy.SessionBuilder("http://my.server.name/mi_servicelayer").with_autologon() db = mi.get_db(db_key="MI_Training") table = db.get_table("Design Data") @@ -189,7 +180,7 @@ for record in records: # Iterate over all validation rules for this attribute for rule in validation_rules: - + # These column values describe the check that will be performed. check_result = { "Record Name": record.name, @@ -440,7 +431,7 @@ the following ways: temperature is equal to a certain attribute. * Automatically modifying the database to ensure consistency. * Running the script automatically in batch mode. For more information see - [Authentication](./../../user_guide/authentication.rst). + [Authentication](../../user_guide/authentication.rst). * Tracking previous failures to provide a delta between multiple validation runs. * Using a Python testing framework like [pytest](https://docs.pytest.org/en/stable/) to organize test cases and provide result reports. diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/assets/03_Expression.svg b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/assets/03_Expression.svg new file mode 100644 index 0000000000..85023b986f --- /dev/null +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/data-analytics/assets/03_Expression.svg @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/foundation/01_Exporting_data.md b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/foundation/01_Exporting_data.md index f077c16da6..567a58eef8 100644 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/foundation/01_Exporting_data.md +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/foundation/01_Exporting_data.md @@ -12,13 +12,13 @@ This example demonstrates: ## Create a Granta MI Session -Import the GRANTA_MIScriptingToolkit package, and create a connection to a Granta MI server. +Import the ansys.grantami.backend.soap package, and create a connection to a Granta MI server. ```python -import GRANTA_MIScriptingToolkit as gdl +import ansys.grantami.backend.soap as gdl -session = gdl.GRANTA_MISession("http://my.server.name/mi_servicelayer", autoLogon=True) +session = gdl.GRANTA_MISession("http://my.server.name/mi_servicelayer", auto_logon=True) ``` ## Get the Databases @@ -27,12 +27,12 @@ Access the browse service from the session and execute the *GetDatabases* method ```python -browseService = session.browseService -databases = browseService.GetDatabases().databases +browse_service = session.browse_service +databases = browse_service.get_databases().databases print(f"Found {len(databases)} databases on the Granta MI Server") for d in databases: - print(f"Database key: {d.DBKey}, database name: {d.volumeName}") + print(f"Database key: {d.db_key}, database name: {d.volume_name}") ``` *Previous cell output:* ```output @@ -47,8 +47,8 @@ import pandas as pd df = pd.DataFrame( { - "DBKey": [db.DBKey for db in databases], - "DBName": [db.volumeName for db in databases] + "DBKey": [db.db_key for db in databases], + "DBName": [db.volume_name for db in databases], } ) df @@ -86,12 +86,12 @@ Use the *GetTables* method from the browse service to see what tables are availa ```python dbKey = "MI_Training" -tables = browseService.GetTables(gdl.GetTables(DBKey=dbKey)).tableDetails +tables = browse_service.get_tables(gdl.GetTables(db_key=dbKey)).table_details print(f"Found {len(tables)} tables in database {dbKey}") print("Printing the first 5") for t in tables[:5]: - print(f"Table name: {t.tableReference.name}") + print(f"Table name: {t.table_reference.name}") ``` *Previous cell output:* ```output @@ -113,22 +113,22 @@ normalized)* table = "Tensile Test Data" attribute = "Young's modulus (11-axis) (normalized)" -tableRef = gdl.PartialTableReference(tableName=table) -attrRef = gdl.AttributeReference( +table_ref = gdl.PartialTableReference(table_name=table) +attr_ref = gdl.AttributeReference( name=attribute, - DBKey=dbKey, - partialTableReference=tableRef, + db_key=dbKey, + partial_table_reference=table_ref, ) -searchCriterion = gdl.RecordSearchCriterion( - searchAttribute=attrRef, - existsSearchValue=gdl.ExistsSearchValue(), +search_criterion = gdl.RecordSearchCriterion( + search_attribute=attr_ref, + exists_search_value=gdl.ExistsSearchValue(), ) request = gdl.CriteriaSearch( - DBKey=dbKey, - searchCriteria=[searchCriterion], + db_key=dbKey, + search_criteria=[search_criterion], ) -searchResults = session.searchService.CriteriaSearch(request).searchResults +search_results = session.search_service.criteria_search(request).search_results ``` Print the *shortName* and *longName* of the first 5 records returned by the search. @@ -137,8 +137,8 @@ Print the *shortName* and *longName* of the first 5 records returned by the sear ```python df2 = pd.DataFrame( { - "ShortName": [r.shortName for r in searchResults], - "LongName": [r.longName for r in searchResults] + "ShortName": [r.short_name for r in search_results], + "LongName": [r.long_name for r in search_results], } ) df2.head() @@ -201,20 +201,21 @@ attributes = [ "Elastic Poisson's Ratio (12-plane)", ] -attrRefs = [ +attribute_refs = [ gdl.AttributeReference( name=a, - DBKey=dbKey, - partialTableReference=tableRef, - ) for a in attributes + db_key=dbKey, + partial_table_reference=table_ref, + ) + for a in attributes ] -recordRefs = [r.recordReference for r in searchResults] +record_refs = [r.record_reference for r in search_results] request = gdl.GetRecordAttributesByRefRequest( - recordReferences=recordRefs, - attributeReferences=attrRefs, + record_references=record_refs, + attribute_references=attribute_refs, ) - -recordData = session.dataExportService.GetRecordAttributesByRef(request).recordData + +record_data = session.data_export_service.get_record_attributes_by_ref(request).record_data ``` Print the values of the attributes from the first 5 exported records. Note that some records may not have values for @@ -222,13 +223,13 @@ all attributes. ```python -s = [None]*len(df2) +s = [None] * len(df2) for attribute in attributes: - for idx, record in enumerate(recordData): - attrValue = next((x for x in record.attributeValues if x.attributeName == attribute), None) - s[idx] = attrValue.pointDataType.points[0].value if attrValue else None + for idx, record in enumerate(record_data): + attr_value = next((x for x in record.attribute_values if x.attribute_name == attribute), None) + s[idx] = attr_value.point_data_value.points[0].value if attr_value else None df2[attribute] = s - + df2.head() ``` diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/foundation/01_Exporting_data_files/01_Exporting_data_17_1.png b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/foundation/01_Exporting_data_files/01_Exporting_data_17_1.png index aa92889473..89f975a382 100644 Binary files a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/foundation/01_Exporting_data_files/01_Exporting_data_17_1.png and b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/foundation/01_Exporting_data_files/01_Exporting_data_17_1.png differ diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/foundation/02_Exporting_data_using_EngineeringDataService.md b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/foundation/02_Exporting_data_using_EngineeringDataService.md index 43036460ae..77f0536276 100644 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/foundation/02_Exporting_data_using_EngineeringDataService.md +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/foundation/02_Exporting_data_using_EngineeringDataService.md @@ -11,13 +11,13 @@ This example demonstrates: ## Create a Granta MI Session -Import the GRANTA_MIScriptingToolkit package, and create a connection to a Granta MI server. +Import the ansys.grantami.backend.soap package, and create a connection to a Granta MI server. ```python -import GRANTA_MIScriptingToolkit as gdl +import ansys.grantami.backend.soap as gdl -session = gdl.GRANTA_MISession("http://my.server.name/mi_servicelayer", autoLogon=True) +session = gdl.GRANTA_MISession("http://my.server.name/mi_servicelayer", auto_logon=True) ``` ## List the available exporters @@ -26,33 +26,33 @@ Retrieve the list of FEA exporters that will export data from the database MI_Tr ```python dbKey = "MI_Training" -request = gdl.GetAvailableExportersRequest(DBKey=dbKey, package="ANSYS Workbench", matchDB=True) +avail_exp_request = gdl.GetAvailableExportersRequest(db_key=dbKey, package="ANSYS Workbench", match_db=True) print("Output of available Exporters for Ansys Workbench") -response = session.engineeringDataService.GetAvailableExporters(request) +avail_exp_response = session.engineering_data_service.get_available_exporters(avail_exp_request) -for exporter in response.exporters: +for exporter in avail_exp_response.exporters: print(f"{exporter.name} ({exporter.package}) - {exporter.description}") ``` *Previous cell output:* ```output Output of available Exporters for Ansys Workbench -458E9A7E-C268-4ED0-9CC1-FF7438521B4F (ANSYS Workbench) - Exports linear, temperature-independent, isotropic data to the Ansys Workbench format CE8DCFA2-B3EE-4545-8D3E-82810FA92AFC (ANSYS Workbench) - Exports linear, temperature-dependent, isotropic data to the Ansys Workbench format +458E9A7E-C268-4ED0-9CC1-FF7438521B4F (ANSYS Workbench) - Exports linear, temperature-independent, isotropic data to the Ansys Workbench format 4B0B1EA3-8760-43DF-8060-2C79CA471D4C (ANSYS Workbench) - Exports linear, temperature-independent, isotropic with simple failure data to the Ansys Workbench format ``` Get a record by name. ```python -req = gdl.RecordNameSearchRequest( - recordName="Nickel alloys, Inconel 718, Forging", - table=gdl.TableReference(DBKey=dbKey, name="Design Data"), - searchShortNames=True +search_req = gdl.RecordNameSearchRequest( + record_name="Nickel alloys, Inconel 718, Forging", + table=gdl.TableReference(db_key=dbKey, name="Design Data"), + search_short_names=True, ) -resp = session.searchService.RecordNameSearch(req) -print(f"Found {len(resp.searchResults)} record(s)") -rec = resp.searchResults[0].recordReference +search_resp = session.search_service.record_name_search(search_req) +print(f"Found {len(search_resp.search_results)} record(s)") +record = search_resp.search_results[0].record_reference ``` *Previous cell output:* ```output @@ -63,23 +63,23 @@ Use the engineering data service to find valid FEA exporters for Inconel 718. ```python -request = gdl.ExportersForRecordsRequest(records=[rec]) -resp = session.engineeringDataService.ExportersForRecords(request) +exp_rec_request = gdl.ExportersForRecordsRequest(records=[record]) +exp_rec_resp = session.engineering_data_service.exporters_for_records(exp_rec_request) print("Output of exporters for Inconel 718") -for exporter in resp.records[0].exporters: +for exporter in exp_rec_resp.records[0].exporters: print(f"{exporter.name} ({exporter.package}) - {exporter.description}") ``` *Previous cell output:* ```output Output of exporters for Inconel 718 +CE8DCFA2-B3EE-4545-8D3E-82810FA92AFC (ANSYS Workbench) - Exports linear, temperature-dependent, isotropic data to the Ansys Workbench format 71CE1C21-FDEA-4119-B481-81BDC41BD900 (Abaqus 6) - Exports temperature dependent, isotropic data to the Abaqus format. -5C560880-4FD3-4E5C-992B-4B6CEF6A055A (Abaqus 6) - Exports temperature independent, isotropic data to the Abaqus 6 format. 911AF055-B388-439A-8AF6-EB18480E2D80 (Abaqus 6) - Linear, temperature-independent, isotropic, simple failure +5C560880-4FD3-4E5C-992B-4B6CEF6A055A (Abaqus 6) - Exports temperature independent, isotropic data to the Abaqus 6 format. 3AE2BEA5-B1DB-45D3-A431-48915B8D1317 (Abaqus 6) - Linear, temperature-independent, isotropic, simple failure with thermal expansion -722E5C46-3633-4B72-BF93-74E8112C20C3 (Abaqus 6) - Exports temperature dependent, isotropic data to the Abaqus 6 format. B653C213-8BEB-42A7-8512-5F340EEBFAB4 (Abaqus 6) - Exports temperature independent, isotropic data to the Abaqus 6 format. +722E5C46-3633-4B72-BF93-74E8112C20C3 (Abaqus 6) - Exports temperature dependent, isotropic data to the Abaqus 6 format. 458E9A7E-C268-4ED0-9CC1-FF7438521B4F (ANSYS Workbench) - Exports linear, temperature-independent, isotropic data to the Ansys Workbench format -CE8DCFA2-B3EE-4545-8D3E-82810FA92AFC (ANSYS Workbench) - Exports linear, temperature-dependent, isotropic data to the Ansys Workbench format 4B0B1EA3-8760-43DF-8060-2C79CA471D4C (ANSYS Workbench) - Exports linear, temperature-independent, isotropic with simple failure data to the Ansys Workbench format ``` ## Get a list of parameters that can be exported @@ -87,10 +87,14 @@ Get the parameters that can be exported from Inconel 718 using an exporter that ```python -exporter = resp.records[0].exporters[7] -req = gdl.GetExporterParametersRequest(records=[rec], exporterKey=exporter.key) -expParams = session.engineeringDataService.GetExporterParameters(req) -for attrib in expParams.records[0].attributes: +exporter = next( + exp for exp in exp_rec_resp.records[0].exporters + if exp.model == "Linear, temperature-dependent, isotropic" + and exp.package == "ANSYS Workbench" +) +exp_param_req = gdl.GetExporterParametersRequest(records=[record], exporter_key=exporter.key) +exporter_parameters = session.engineering_data_service.get_exporter_parameters(exp_param_req) +for attrib in exporter_parameters.records[0].attributes: print(attrib.attribute.name) for param in attrib.parameters: print(f"\t{param.name}") @@ -107,8 +111,8 @@ Get all applicable attributes for this record. ```python -req = gdl.GetRecordAttributesRequest(recordReferences=[rec]) -attribs = session.browseService.GetRecordAttributes(req) +gra_req = gdl.GetRecordAttributesRequest(record_references=[record]) +attribs = session.browse_service.get_record_attributes(gra_req) ``` If exporting a functional data attribute, you also need to define a parameter value to evaluate the attribute at. @@ -116,15 +120,15 @@ Here, a parameter is fixed at 1.337. ```python -myParam = expParams.records[0].attributes[0].parameters[0] +parameter = exporter_parameters.records[0].attributes[0].parameters[0] pwv = gdl.ParameterReferenceAndValue( - parameterValue=gdl.ParameterValue(numericValue=1.337), - parameter=myParam.parameterReference, + parameter_value=gdl.ParameterValue(numeric_value=1.337), + parameter=parameter.parameter_reference, ) pv = gdl.UnittedParameterValue( - unitSymbol=myParam.unit.unitSymbol, - parameterWithValues=pwv, + unit_symbol=parameter.unit.unit_symbol, + parameter_with_values=pwv, ) ``` @@ -132,14 +136,14 @@ Run the FEA exporter, and print the output. ```python -expReq = gdl.ExportRecordDataRequest( - attributeReferences=[a.attribute.attribute for a in attribs.recordAttributes], - records=[rec], - exporterKey=exporter.key, - parameterValues=[pv] +export_data_request = gdl.ExportRecordDataRequest( + attribute_references=[a.attribute.attribute for a in attribs.record_attributes], + records=[record], + exporter_key=exporter.key, + parameter_values=[pv], ) -resp = session.engineeringDataService.ExportRecordData(expReq) +resp = session.engineering_data_service.export_record_data(export_data_request) print(resp.text[:200] + "...") ``` @@ -156,11 +160,10 @@ directory. ```python from pathlib import Path -Path("./output").mkdir(exist_ok=True) -``` +output_dir = Path("./output") +output_dir.mkdir(exist_ok=True) -```python -with open("output/engineering_data.xml", "wb") as f: +with open(output_dir / "engineering_data.xml", "wb") as f: f.write(resp.text.encode("utf-8")) ``` diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/foundation/03_Text_search.md b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/foundation/03_Text_search.md index 05b9c17c64..493c6ddea9 100644 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/foundation/03_Text_search.md +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/foundation/03_Text_search.md @@ -10,13 +10,13 @@ This example demonstrates: ## Create a Granta MI Session -Import the GRANTA_MIScriptingToolkit package, and create a connection to a Granta MI server. +Import the ansys.grantami.backend.soap package, and create a connection to a Granta MI server. ```python -import GRANTA_MIScriptingToolkit as gdl +import ansys.grantami.backend.soap as gdl -session = gdl.GRANTA_MISession("http://my.server.name/mi_servicelayer", autoLogon=True) +session = gdl.GRANTA_MISession("http://my.server.name/mi_servicelayer", auto_logon=True) ``` ## Select a database @@ -25,11 +25,11 @@ View the databases available on your Granta MI server. ```python -databases = session.browseService.GetDatabases().databases +databases = session.browse_service.get_databases().databases print(f"Found {len(databases)} databases on the Granta MI Server") for d in databases: - print(f"Database key: {d.DBKey}, Database name: {d.volumeName}") + print(f"Database key: {d.db_key}, Database name: {d.volume_name}") ``` *Previous cell output:* ```output @@ -42,19 +42,19 @@ Search in the MI Training database for records containing the text *Leather*. ```python -dbKey = "MI_Training" -searchText = "leather" +db_key = "MI_Training" +search_text = "leather" -simpleTextSearch = gdl.SimpleTextSearch(searchValue=searchText, DBKey=dbKey) -simpleTextSearchResponse = session.searchService.SimpleTextSearch(simpleTextSearch) +simple_text_search = gdl.SimpleTextSearch(search_value=search_text, db_key=db_key) +search_response = session.search_service.simple_text_search(simple_text_search) ``` Print the results returned by the search. ```python -for result in simpleTextSearchResponse.searchResults: - print(result.shortName) +for result in search_response.search_results: + print(result.short_name) ``` *Previous cell output:* ```output diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/foundation/04_Deleting_records.md b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/foundation/04_Deleting_records.md index 5ebb71949c..174f0714e5 100644 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/foundation/04_Deleting_records.md +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/foundation/04_Deleting_records.md @@ -1,62 +1,62 @@ # Deleting records (DeleteOrWithdrawIfLatestRecordVersion) -Let's start by creating a new record (Note: added receiveTimeout to the MISession) +Let's start by creating a new record (Note: added receive_timeout to the MISession) ```python from datetime import datetime -import GRANTA_MIScriptingToolkit as gdl +import ansys.grantami.backend.soap as gdl -session = gdl.GRANTA_MISession("http://my.server.name/mi_servicelayer/", autoLogon=True, receiveTimeout=5000) +session = gdl.GRANTA_MISession("http://my.server.name/mi_servicelayer/", auto_logon=True, receive_timeout=5000) now = datetime.now().strftime("%c") -record_name = f"Scripting toolkit foundation layer example 04:{now}" +record_name = f"Scripting Toolkit Foundation Layer Example 4:{now}" table_name = "Tensile Test Data" subset_name = table_name db_key = "MI_Training" -import_service = session.dataImportService -browse_service = session.browseService +import_service = session.data_import_service +browse_service = session.browse_service -test_table_ref = gdl.TableReference(name=table_name, DBKey=db_key) -partial_table_ref = gdl.PartialTableReference(tableName=table_name) +test_table_ref = gdl.TableReference(name=table_name, db_key=db_key) +partial_table_ref = gdl.PartialTableReference(table_name=table_name) subset_ref = gdl.SubsetReference( - DBKey=db_key, - partialTableReference=partial_table_ref, + db_key=db_key, + partial_table_reference=partial_table_ref, name=subset_name, ) -table_root_ref = browse_service.GetRootNode(gdl.GetRootNode(table=test_table_ref)).rootNode.recordReference +table_root_ref = browse_service.get_root_node(gdl.GetRootNode(table=test_table_ref)).root_node.record_reference import_record = gdl.ImportRecord( - recordName=record_name, - importAttributeValues=None, - isFolder=False, - existingRecord=table_root_ref, - subsetReferences=[subset_ref], + record_name=record_name, + import_attribute_values=None, + is_folder=False, + existing_record=table_root_ref, + subset_references=[subset_ref], ) -import_request = gdl.SetRecordAttributesRequest(importRecords=[import_record]) -imported_records = import_service.SetRecordAttributes(import_request).recordsImported -imported_record_ref = imported_records[0].recordReference -print(f'Imported record "{imported_records[0].longName}" to table "{table_name}"') +import_request = gdl.SetRecordAttributesRequest(import_records=[import_record]) +imported_records = import_service.set_record_attributes(import_request).records_imported +imported_record_ref = imported_records[0].record_reference +print(f'Imported record "{imported_records[0].long_name}" to table "{table_name}"') ``` *Previous cell output:* ```output -Imported record "Scripting toolkit foundation layer example 04:Mon May 12 16:19:46 2025" to table "Tensile Test Data" +Imported record "Scripting Toolkit Foundation Layer Example 4:Wed Jan 7 19:30:39 2026" to table "Tensile Test Data" ``` Now let's delete it! ```python -delete_record = gdl.DeleteOrWithdrawRecord(recordReference=imported_record_ref) +delete_record = gdl.DeleteOrWithdrawRecord(record_reference=imported_record_ref) records_to_delete = [delete_record] -delete_records_request = gdl.DeleteOrWithdrawIfLatestRecordVersionRequest(deleteOrWithdrawRecords=records_to_delete) -delete_records_response = import_service.DeleteOrWithdrawIfLatestRecordVersion(delete_records_request) -print(f"Record {imported_records[0].longName} was deleted") +delete_records_request = gdl.DeleteOrWithdrawIfLatestRecordVersionRequest(delete_or_withdraw_records=records_to_delete) +delete_records_response = import_service.delete_or_withdraw_if_latest_record_version(delete_records_request) +print(f"Record {imported_records[0].long_name} was deleted") ``` *Previous cell output:* ```output -Record Scripting toolkit foundation layer example 04:Mon May 12 16:19:46 2025 was deleted +Record Scripting Toolkit Foundation Layer Example 4:Wed Jan 7 19:30:39 2026 was deleted ``` \ No newline at end of file diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/foundation/05_Functional_data_and_importing_data.md b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/foundation/05_Functional_data_and_importing_data.md index 51a19b4fd4..8e14580918 100644 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/foundation/05_Functional_data_and_importing_data.md +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/foundation/05_Functional_data_and_importing_data.md @@ -11,15 +11,14 @@ This example demonstrates: ## Create a Granta MI Session -Import the GRANTA_MIScriptingToolkit package, and create a connection to a Granta MI server. +Import the ansys.grantami.backend.soap package, and create a connection to a Granta MI server. ```python from datetime import datetime -import sys -import GRANTA_MIScriptingToolkit as gdl +import ansys.grantami.backend.soap as gdl -session = gdl.GRANTA_MISession("http://my.server.name/mi_servicelayer", autoLogon=True) +session = gdl.GRANTA_MISession("http://my.server.name/mi_servicelayer", auto_logon=True) ``` ## Browse for records @@ -30,28 +29,30 @@ Set the folder path for the record to browse to as: High Alloy Steel / AMS 6520 ```python -dbKey = "MI_Training" +db_key = "MI_Training" table = "Tensile Statistical Data" -folderPath = ["High Alloy Steel", "AMS 6520", "Plate", "Room Temperature °F"] +folder_path = ["High Alloy Steel", "AMS 6520", "Plate", "Room Temperature °F"] ``` Get the root node of the table of interest. ```python -tableReference = gdl.TableReference(DBKey=dbKey, name=table) -treeRecord = session.browseService.GetRootNode(gdl.GetRootNode(tableReference)).rootNode +table_reference = gdl.TableReference(db_key=db_key, name=table) +tree_record = session.browse_service.get_root_node(gdl.GetRootNode(table_reference)).root_node ``` Find the record of interest, *AMS 6520, Plate, Room Temperature °F*. ```python -for folder in folderPath: - treeRecords = session.browseService.GetChildNodes(gdl.GetChildNodes(parent=treeRecord.recordReference)).treeRecords - treeRecord = next((r for r in treeRecords if r.shortName == folder), None) - if treeRecord: - print(f"Found treeRecord: {treeRecord.shortName}") +for folder in folder_path: + tree_records = session.browse_service.get_child_nodes( + gdl.GetChildNodes(parent=tree_record.record_reference) + ).tree_records + tree_record = next((r for r in tree_records if r.short_name == folder), None) + if tree_record: + print(f"Found treeRecord: {tree_record.short_name}") else: raise ValueError(f"Unable to find folder: {folder}") ``` @@ -70,26 +71,26 @@ Export *Tensile Response (11 axis)* data from the record of interest. ```python attribute = "Tensile Response (11 axis)" -partialTableRef = gdl.PartialTableReference(tableName=table) -attrRef = gdl.AttributeReference( +partial_table_ref = gdl.PartialTableReference(table_name=table) +attribute_reference = gdl.AttributeReference( name=attribute, - DBKey=dbKey, - partialTableReference=partialTableRef, + db_key=db_key, + partial_table_reference=partial_table_ref, ) request = gdl.GetRecordAttributesByRefRequest( - recordReferences=[treeRecord.recordReference], - attributeReferences=[attrRef], + record_references=[tree_record.record_reference], + attribute_references=[attribute_reference], ) -data = session.dataExportService.GetRecordAttributesByRef(request).recordData[0] +data = session.data_export_service.get_record_attributes_by_ref(request).record_data[0] ``` Check the data type of the *Tensile Response (11 axis)* attribute is FLOAT_FUNCTIONAL_SERIES. ```python -value = data.attributeValues[0] -print(f"Attribute Name: {value.attributeName}, Type {value.dataType}") +value = data.attribute_values[0] +print(f"Attribute Name: {value.attribute_name}, Type {value.data_type}") ``` *Previous cell output:* ```output @@ -99,17 +100,17 @@ Extract the data from each curve into a list. ```python -graph = value.floatFunctionalSeriesDataType.graph +graph = value.float_functional_series_data_value.graph series = graph.series curves = [] for curve in series: - points = curve.XYPoints.XYPoints - x = [point.parameterValue.numericValue for point in points] - y = [point.Y for point in points] - curves.append([x,y]) - + points = curve.xy_points.xy_points + x = [point.parameter_value.numeric_value for point in points] + y = [point.y for point in points] + curves.append([x, y]) + print(curves) ``` *Previous cell output:* @@ -122,7 +123,7 @@ Plot the curves using the matplotlib package. ```python import matplotlib.pyplot as plt -x_label = f"{graph.XAxisParameter.name} ({graph.XAxisParameter.unit.unitSymbol})" +x_label = f"{graph.x_axis_parameter.name} ({graph.x_axis_parameter.unit.unit_symbol})" y_label = "Tensile stress 10^6 (Pa)" fig = plt.figure() @@ -149,15 +150,12 @@ import matplotlib.pyplot as plt from scipy.optimize import leastsq import numpy as np - def ramberg_osgood(p, stress): - return (stress/p[0])*(1.0 + p[1]*(stress/p[2])**(p[3]-1)) - + return (stress / p[0]) * (1.0 + p[1] * (stress / p[2]) ** (p[3] - 1)) def error_function(p, stress, strain): return ramberg_osgood(p, stress) - strain - strain = 0.01 * np.array(curves[0][0]) stress = np.array(curves[0][1]) @@ -171,23 +169,15 @@ ax.set_xlabel(x_label) ax.set_ylabel(y_label) ax.plot(ramberg_osgood(plsq[0], stress), stress, label="Fit") -ax.plot(strain, stress, marker='o', linestyle=' ', label="Data") +ax.plot(strain, stress, marker="o", linestyle=" ", label="Data") ax.set_title("Ramberg-Osgood fit") -ax.legend() -``` - - - -*Previous cell output:* -```output - +_ = ax.legend() ``` - -![png](05_Functional_data_and_importing_data_files/05_Functional_data_and_importing_data_17_1.png) +![png](05_Functional_data_and_importing_data_files/05_Functional_data_and_importing_data_17_0.png) @@ -200,20 +190,22 @@ Identify the folder to upload the new record to. Browse the record tree to get t ```python -importDBKey = "MI_Training" -importTableName = "Tensile Statistical Data" -importFolders = ["High Alloy Steel", "AMS 6520"] +import_db_key = "MI_Training" +import_table_name = "Tensile Statistical Data" +import_folders = ["High Alloy Steel", "AMS 6520"] now = datetime.now().strftime("%c") -importRecordName = f"Scripting toolkit foundation layer example 05:{now}" - -importTableReference = gdl.TableReference(DBKey=importDBKey, name=importTableName) -treeRecord = session.browseService.GetRootNode(gdl.GetRootNode(table=importTableReference)).rootNode - -for folder in importFolders: - treeRecords = session.browseService.GetChildNodes(gdl.GetChildNodes(parent=treeRecord.recordReference)).treeRecords - treeRecord = next((r for r in treeRecords if r.shortName == folder), None) - if treeRecord: - print(f"Found treeRecord folder: {treeRecord.shortName}") +import_record_name = f"Scripting Toolkit Foundation Layer Example 5:{now}" + +import_table_reference = gdl.TableReference(db_key=import_db_key, name=import_table_name) +tree_record = session.browse_service.get_root_node(gdl.GetRootNode(table=import_table_reference)).root_node + +for folder in import_folders: + tree_records = session.browse_service.get_child_nodes( + gdl.GetChildNodes(parent=tree_record.record_reference) + ).tree_records + tree_record = next((r for r in tree_records if r.short_name == folder), None) + if tree_record: + print(f"Found treeRecord folder: {tree_record.short_name}") else: raise ValueError(f"Unable to find import folder: {folder}") ``` @@ -226,10 +218,10 @@ Define the record attribute to include in the new record. ```python -modulusAttributeReference = gdl.AttributeReference( +modulus_attribute_reference = gdl.AttributeReference( name="Young's Modulus (11-axis)", - DBKey=importDBKey, - partialTableReference=gdl.PartialTableReference(tableName=importTableName) + db_key=import_db_key, + partial_table_reference=gdl.PartialTableReference(table_name=import_table_name), ) ``` @@ -237,12 +229,12 @@ Set values and units for the attributes of the new record. ```python -fittedEValue = plsq[0][0] -modulusValue = gdl.PointValueWithParameters(value=fittedEValue) -modulusPointValue = gdl.PointDataType(unitSymbol="psi", points=[modulusValue]) -importModulusValue = gdl.ImportAttributeValue( - attributeReference=modulusAttributeReference, - pointDataValue=modulusPointValue, +fitted_e_value = plsq[0][0] +modulus_value = gdl.PointValueWithParameters(value=fitted_e_value) +modulus_point_value = gdl.PointDataType(unit_symbol="psi", points=[modulus_value]) +import_modulus_value = gdl.ImportAttributeValue( + attribute_reference=modulus_attribute_reference, + point_data_value=modulus_point_value, ) ``` @@ -250,10 +242,10 @@ Create a reference to the subset that the new record will be added to. ```python -subsetReference = gdl.SubsetReference( +subset_reference = gdl.SubsetReference( name="Statistical Test Data", - DBKey=importDBKey, - partialTableReference=gdl.PartialTableReference(tableName=importTableName) + db_key=import_db_key, + partial_table_reference=gdl.PartialTableReference(table_name=import_table_name), ) ``` @@ -261,20 +253,20 @@ Import the record to the Granta MI database. ```python -importRecord = gdl.ImportRecord( - recordName=importRecordName, - existingRecord=treeRecord.recordReference, - subsetReferences=[subsetReference], - importAttributeValues=[importModulusValue], +import_record = gdl.ImportRecord( + record_name=import_record_name, + existing_record=tree_record.record_reference, + subset_references=[subset_reference], + import_attribute_values=[import_modulus_value], ) -setRecordAttributesRequest = gdl.SetRecordAttributesRequest(importRecords=[importRecord]) -setRecordAttributesResponse = session.dataImportService.SetRecordAttributes(setRecordAttributesRequest) +set_record_attributes_request = gdl.SetRecordAttributesRequest(import_records=[import_record]) +set_record_attributes_response = session.data_import_service.set_record_attributes(set_record_attributes_request) -for record in setRecordAttributesResponse.recordsImported: - print(f"Imported record {record.shortName} to Granta MI database") +for record in set_record_attributes_response.records_imported: + print(f"Imported record {record.short_name} to Granta MI database") ``` *Previous cell output:* ```output -Imported record Scripting toolkit foundation layer example 05:Mon May 12 16:20:13 2025 to Granta MI database +Imported record Scripting Toolkit Foundation Layer Example 5:Wed Jan 7 19:31:10 2026 to Granta MI database ``` \ No newline at end of file diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/foundation/05_Functional_data_and_importing_data_files/05_Functional_data_and_importing_data_15_0.png b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/foundation/05_Functional_data_and_importing_data_files/05_Functional_data_and_importing_data_15_0.png index 489ce40f38..2a713e187b 100644 Binary files a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/foundation/05_Functional_data_and_importing_data_files/05_Functional_data_and_importing_data_15_0.png and b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/foundation/05_Functional_data_and_importing_data_files/05_Functional_data_and_importing_data_15_0.png differ diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/foundation/05_Functional_data_and_importing_data_files/05_Functional_data_and_importing_data_17_0.png b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/foundation/05_Functional_data_and_importing_data_files/05_Functional_data_and_importing_data_17_0.png new file mode 100644 index 0000000000..5b24fa3345 Binary files /dev/null and b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/foundation/05_Functional_data_and_importing_data_files/05_Functional_data_and_importing_data_17_0.png differ diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/foundation/06_Importing_and_exporting_tabular_data.md b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/foundation/06_Importing_and_exporting_tabular_data.md index fe7ed43474..991f3431a0 100644 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/foundation/06_Importing_and_exporting_tabular_data.md +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/foundation/06_Importing_and_exporting_tabular_data.md @@ -12,14 +12,14 @@ This example demonstrates: ## Create a Granta MI Session -Import the GRANTA_MIScriptingToolkit package, and create a connection to a Granta MI server. +Import the ansys.grantami.backend.soap package, and create a connection to a Granta MI server. ```python from datetime import datetime -import GRANTA_MIScriptingToolkit as gdl +import ansys.grantami.backend.soap as gdl -session = gdl.GRANTA_MISession("http://my.server.name/mi_servicelayer", autoLogon=True) +session = gdl.GRANTA_MISession("http://my.server.name/mi_servicelayer", auto_logon=True) ``` ## Get tabular data attribute information @@ -28,34 +28,34 @@ Search for the record "Shore A75, flame retarded" in the "MI_Training" database. ```python -dbKey = "MI_Training" -tableName = "MaterialUniverse" -recordName = "Shore A75, flame retarded" +db_key = "MI_Training" +table_name = "MaterialUniverse" +record_name = "Shore A75, flame retarded" req = gdl.RecordNameSearchRequest( - caseSensitiveNames=False, - searchShortNames=True, - recordName=recordName, + case_sensitive_names=False, + search_short_names=True, + record_name=record_name, ) -req.table = gdl.TableReference(DBKey=dbKey, name=tableName) -resp = session.searchService.RecordNameSearch(req) -record = resp.searchResults[0] +req.table = gdl.TableReference(db_key=db_key, name=table_name) +resp = session.search_service.record_name_search(req) +record = resp.search_results[0] ``` Use the browse service to get the column headers for the tabular data attribute "Specifications". ```python -attribName = "Restricted substances that may be associated with this material" +attribute_name = "Restricted substances that may be associated with this material" a = gdl.AttributeReference( - name=attribName, - partialTableReference=gdl.PartialTableReference(tableName=tableName), - DBKey=dbKey, + name=attribute_name, + partial_table_reference=gdl.PartialTableReference(table_name=table_name), + db_key=db_key, ) -resp = session.browseService.GetAttributeDetails(gdl.GetAttributeDetailsRequest([a])) -for col in resp.attributeDetails[0].tabular.columns: +resp = session.browse_service.get_attribute_details(gdl.GetAttributeDetailsRequest([a])) +for col in resp.attribute_details[0].tabular.columns: print(col.name) ``` *Previous cell output:* @@ -77,21 +77,22 @@ Perform a data export request to get column data for the tabular data attribute. ```python -dataExportRequest = gdl.GetRecordAttributesByRefRequest( - recordReferences=[record.recordReference], - attributeReferences=[a], +data_export_request = gdl.GetRecordAttributesByRefRequest( + record_references=[record.record_reference], + attribute_references=[a], ) -dataExportResponse = session.dataExportService.GetRecordAttributesByRef(dataExportRequest) -myRecordData = dataExportResponse.recordData +data_export_response = session.data_export_service.get_record_attributes_by_ref(data_export_request) +record_data = data_export_response.record_data -for rec in myRecordData: - for attr in rec.attributeValues: - if attr.attributeName == attribName: - if not attr.dataType == "TABL": - raise TypeError("No tables found! Check your record.") - myTable = attr.tabularDataType +tabular_value = None +for rec in record_data: + for attr in rec.attribute_values: + if attr.attribute_name == attribute_name: + tabular_value = attr.tabular_data_value print("Table found.") +if tabular_value is None: + raise TypeError("No tables found! Check your record.") ``` *Previous cell output:* ```output @@ -103,14 +104,14 @@ items all have a dataType attribute to help you pick the right data member to in ```python i = 1 -for row in myTable.tabularDataRows: - if len(row.cells[0].listDataValue.items) > 0: +for row in tabular_value.tabular_data_rows: + if len(row.cells[0].list_data_value.items) > 0: print(f"Row {i}:") - print(f"\t{row.cells[0].listDataValue.items[0].shortTextDataValue.value}") - print(f"\t{row.cells[1].listDataValue.items[0].shortTextDataValue.value}") - print(f"\t{row.cells[2].rangeDataValue.low}-{row.cells[2].rangeDataValue.high}") - print(f"\t{row.cells[3].discreteDataValue.discreteValues[0].value}") - print(f"\t{row.cells[4].shortTextDataValue.value}") + print(f"\t{row.cells[0].list_data_value.items[0].short_text_data_value.value}") + print(f"\t{row.cells[1].list_data_value.items[0].short_text_data_value.value}") + print(f"\t{row.cells[2].range_data_value.low}-{row.cells[2].range_data_value.high}") + print(f"\t{row.cells[3].discrete_data_value.discrete_values[0].value}") + print(f"\t{row.cells[4].short_text_data_value.value}") i = i + 1 ``` *Previous cell output:* @@ -135,40 +136,39 @@ Row 3: ``` ## Import tabular data -Search the database for a parent record under which you can create a new record. +Search the database for a parent record under which you can create a new record. ```python -dbKey = "MI_Training" -tableName = "Training Exercise for Import" -recordName = "Metal" +db_key = "MI_Training" +table_name = "Training Exercise for Import" +record_name = "Metal" req = gdl.RecordNameSearchRequest( - caseSensitiveNames=False, - searchShortNames=True, - recordName=recordName, + case_sensitive_names=False, + search_short_names=True, + record_name=record_name, ) -req.table = gdl.TableReference(DBKey=dbKey, name=tableName) -resp = session.searchService.RecordNameSearch(req) -destination = resp.searchResults[0] +req.table = gdl.TableReference(db_key=db_key, name=table_name) +resp = session.search_service.record_name_search(req) +destination = resp.search_results[0] ``` Create an empty data structure, and populate it with tabular data values. ```python -newTable = gdl.TabularDataType() -newTable.AddColumn("Order") -newTable.AddColumn("Notes") +integer_value = gdl.IntegerDataType(value=1) +integer_cell = gdl.TabularDataImportCell(column_name="Order", integer_data_value=integer_value) -newRow = newTable.CreateRow() -newInt = gdl.IntegerDataType(value=1) -newRow.cells[0].data = newInt +text_value = gdl.LongTextDataType(value="Some notes about a material") +text_cell = gdl.TabularDataImportCell(column_name="Notes", long_text_data_value=text_value) -newText = gdl.LongTextDataType(value="Some notes about a material") -newRow.cells[1].data = newText +new_row = gdl.TabularDataImportRow(cells=[integer_cell, text_cell]) -print(f"Created a table with cell data {newInt.value} and {newText.value}") +tabular_update = gdl.TabularDataImportType(import_rows=[new_row]) + +print(f"Created a table with cell data {integer_value.value} and {text_value.value}") ``` *Previous cell output:* ```output @@ -178,16 +178,16 @@ Create a new import attribute, "Characterization of this material", that contain ```python -attribName = "Characterization of this material" +attribute_name = "Characterization of this material" a = gdl.AttributeReference( - name=attribName, - partialTableReference=gdl.PartialTableReference(tableName=tableName), - DBKey=dbKey, + name=attribute_name, + partial_table_reference=gdl.PartialTableReference(table_name=table_name), + db_key=db_key, ) -importAtribute = gdl.ImportAttributeValue(attributeReference=a) -importAtribute.tabularDataValue = newTable +import_attribute_value = gdl.ImportAttributeValue(attribute_reference=a) +import_attribute_value.tabular_data_value = tabular_update ``` Create a new import record. @@ -195,28 +195,28 @@ Create a new import record. ```python now = datetime.now().strftime("%c") -recName = f"Scripting toolkit foundation layer example 06:{now}" +new_record_name = f"Scripting Toolkit Foundation Layer Example 6:{now}" -importRecord = gdl.ImportRecord( - recordName=recName, - existingRecord=destination.recordReference, - importAttributeValues=[importAtribute], +import_record = gdl.ImportRecord( + record_name=new_record_name, + existing_record=destination.record_reference, + import_attribute_values=[import_attribute_value], ) -print(recName) +print(new_record_name) ``` *Previous cell output:* ```output -Scripting toolkit foundation layer example 06:Mon May 12 16:20:48 2025 +Scripting Toolkit Foundation Layer Example 6:Wed Jan 7 19:31:40 2026 ``` Import the record to a Granta MI database. ```python -setRecordAttributesRequest = gdl.SetRecordAttributesRequest(importRecords=[importRecord]) -response = session.dataImportService.SetRecordAttributes(setRecordAttributesRequest) -recordsImported = response.recordsImported +set_record_attributes_request = gdl.SetRecordAttributesRequest(import_records=[import_record]) +response = session.data_import_service.set_record_attributes(set_record_attributes_request) +records_imported = response.records_imported -print(f"{len(recordsImported)} records imported") +print(f"{len(records_imported)} records imported") ``` *Previous cell output:* ```output @@ -228,15 +228,15 @@ Retrieve the row ID of the data that you want to update. ```python -dataExportRequest = gdl.GetRecordAttributesByRefRequest( - recordReferences=[response.recordsImported[0].recordReference], - attributeReferences=[a], +data_export_request = gdl.GetRecordAttributesByRefRequest( + record_references=[response.records_imported[0].record_reference], + attribute_references=[a], ) -dataExportResponse = session.dataExportService.GetRecordAttributesByRef(dataExportRequest) -myRecordData = dataExportResponse.recordData[0] -attribute = myRecordData.attributeValues[0].tabularDataType +data_export_response = session.data_export_service.get_record_attributes_by_ref(data_export_request) +my_record_data = data_export_response.record_data[0] +attribute = my_record_data.attribute_values[0].tabular_data_value -aid = attribute.tabularDataRows[0].Id +aid = attribute.tabular_data_rows[0].id_ print(f"This row's ID is {aid}") ``` @@ -249,16 +249,13 @@ data values. ```python -updatedValue = gdl.IntegerDataType(value=newInt.value * 1000) -print(f"Updated previous value to {updatedValue.value}") - -tableUpdates = gdl.TabularDataType() -tableUpdates.AddColumn("Order") - -changetype = gdl.TabularDataType.ChangeType.Update +updated_value = gdl.IntegerDataType(value=integer_value.value * 1000) +update_cell = gdl.TabularDataImportCell(column_name="Order", integer_data_value=updated_value) +print(f"Updated previous value to {updated_value.value}") -rowChange = tableUpdates.CreateUpdateRow(changetype, aid) -rowChange.cells[0].data = updatedValue +change_type = "Update" +row_change = gdl.TabularDataUpdateRow(cells=[update_cell], id_=aid, update_type=change_type) +table_updates = gdl.TabularDataImportType(update_rows=[row_change]) ``` *Previous cell output:* ```output @@ -268,24 +265,24 @@ Import the updated data into Granta MI using SetRecordAttributes. ```python -attribute = gdl.ImportAttributeValue(attributeReference=a) -attribute.tabularDataValue = tableUpdates +attribute = gdl.ImportAttributeValue(attribute_reference=a) +attribute.tabular_data_value = table_updates -updateRecord = gdl.ImportRecord( - importRecordMode="Update", - existingRecord=recordsImported[0].recordReference, - importAttributeValues=[attribute], +update_record = gdl.ImportRecord( + import_record_mode="Update", + existing_record=records_imported[0].record_reference, + import_attribute_values=[attribute], ) -setRecordAttributesRequest = gdl.SetRecordAttributesRequest(importRecords=[updateRecord]) -response = session.dataImportService.SetRecordAttributes(setRecordAttributesRequest) +set_record_attributes_request = gdl.SetRecordAttributesRequest(import_records=[update_record]) +response = session.data_import_service.set_record_attributes(set_record_attributes_request) print( - f"Use MI Viewer to view {recName} and check that the Order " - f"in 'Characterization of this material' is {updatedValue.value}" + f"Use MI Viewer to view '{new_record_name}' and check that the Order " + f"in 'Characterization of this material' is {updated_value.value}" ) ``` *Previous cell output:* ```output -Use MI Viewer to view Scripting toolkit foundation layer example 06:Mon May 12 16:20:48 2025 and check that the Order in 'Characterization of this material' is 1000 +Use MI Viewer to view 'Scripting Toolkit Foundation Layer Example 6:Wed Jan 7 19:31:40 2026' and check that the Order in 'Characterization of this material' is 1000 ``` \ No newline at end of file diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/foundation/07_Modified_date.md b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/foundation/07_Modified_date.md index 17006d7043..5de207245c 100644 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/foundation/07_Modified_date.md +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/foundation/07_Modified_date.md @@ -4,44 +4,45 @@ Modify a record ```python -import GRANTA_MIScriptingToolkit as gdl -import datetime +from datetime import datetime -session = gdl.GRANTA_MISession("http://my.server.name/mi_servicelayer/", autoLogon=True, receiveTimeout=5000) +import ansys.grantami.backend.soap as gdl + +session = gdl.GRANTA_MISession("http://my.server.name/mi_servicelayer/", auto_logon=True, receive_timeout=5000) db_key = "MI_Training" table_name = "Tensile Test Data" -import_service = session.dataImportService -browse_service = session.browseService -export_service = session.dataExportService +import_service = session.data_import_service +browse_service = session.browse_service +export_service = session.data_export_service -partial_table_ref = gdl.PartialTableReference(tableName=table_name) +partial_table_ref = gdl.PartialTableReference(table_name=table_name) -modfied_record_guid = "4269f1bc-df6b-4a6d-870c-ef931728f37b" -modified_record_ref = gdl.RecordReference(DBKey=db_key, recordGUID=modfied_record_guid) +modified_record_guid = "4269f1bc-df6b-4a6d-870c-ef931728f37b" +modified_record_ref = gdl.RecordReference(db_key=db_key, record_guid=modified_record_guid) attribute_project_notes = "Project Notes" -attribute_val = f"Project was updated: {datetime.datetime.now()}" +attribute_val = f"Project was updated: {datetime.now()}" attribute_ref = gdl.AttributeReference( name=attribute_project_notes, - DBKey=db_key, - partialTableReference=partial_table_ref, + db_key=db_key, + partial_table_reference=partial_table_ref, ) import_attribute_val = gdl.ImportAttributeValue( - longTextDataValue=gdl.LongTextDataType(value=attribute_val), - attributeReference=attribute_ref, + long_text_data_value=gdl.LongTextDataType(value=attribute_val), + attribute_reference=attribute_ref, ) update_record = gdl.ImportRecord( - recordName=None, - importRecordMode="Update", - importAttributeValues=[import_attribute_val], - existingRecord=modified_record_ref, + record_name=None, + import_record_mode="Update", + import_attribute_values=[import_attribute_val], + existing_record=modified_record_ref, ) -update_request = gdl.SetRecordAttributesRequest(importRecords=[update_record]) -updated_records = import_service.SetRecordAttributes(update_request).recordsImported -updated_record_ref = updated_records[0].recordReference -updated_record_name = updated_records[0].longName +update_request = gdl.SetRecordAttributesRequest(import_records=[update_record]) +updated_records = import_service.set_record_attributes(update_request).records_imported +updated_record_ref = updated_records[0].record_reference +updated_record_name = updated_records[0].long_name print(f'Updated record "{updated_record_name}"') ``` *Previous cell output:* @@ -53,43 +54,48 @@ Now let's retrieve the record creator, createdDate, lastModifier and modifiedDat ```python pseudo_creator = gdl.AttributeReference( - pseudoAttribute=gdl.AttributeReference.MIPseudoAttributeReference.creator, - DBKey=db_key, - partialTableReference=partial_table_ref, + pseudo_attribute=gdl.AttributeReference.MIPseudoAttributeReference.creator, + db_key=db_key, + partial_table_reference=partial_table_ref, ) pseudo_created_date = gdl.AttributeReference( - pseudoAttribute=gdl.AttributeReference.MIPseudoAttributeReference.createdDate, - DBKey=db_key, - partialTableReference=partial_table_ref, + pseudo_attribute=gdl.AttributeReference.MIPseudoAttributeReference.createdDate, + db_key=db_key, + partial_table_reference=partial_table_ref, ) pseudo_last_modifier = gdl.AttributeReference( - pseudoAttribute=gdl.AttributeReference.MIPseudoAttributeReference.lastModifier, - DBKey=db_key, - partialTableReference=partial_table_ref, + pseudo_attribute=gdl.AttributeReference.MIPseudoAttributeReference.lastModifier, + db_key=db_key, + partial_table_reference=partial_table_ref, ) pseudo_modified_date = gdl.AttributeReference( - pseudoAttribute=gdl.AttributeReference.MIPseudoAttributeReference.modifiedDate, - DBKey=db_key, - partialTableReference=partial_table_ref, + pseudo_attribute=gdl.AttributeReference.MIPseudoAttributeReference.modifiedDate, + db_key=db_key, + partial_table_reference=partial_table_ref, ) -attribute_refs = [pseudo_creator, pseudo_created_date, pseudo_last_modifier, pseudo_modified_date] +attribute_refs = [ + pseudo_creator, + pseudo_created_date, + pseudo_last_modifier, + pseudo_modified_date, +] export_request = gdl.GetRecordAttributesByRefRequest( - recordReferences=[modified_record_ref], - attributeReferences=attribute_refs, + record_references=[modified_record_ref], + attribute_references=attribute_refs, ) -exported_data = export_service.GetRecordAttributesByRef(export_request).recordData +exported_data = export_service.get_record_attributes_by_ref(export_request).record_data for record in exported_data: - creator = [a.shortTextDataType.value for a in record.attributeValues if a.attributeName == "[creator]"][0] - created_date = [a.dateTimeDataType.value for a in record.attributeValues if a.attributeName == "[createdDate]"][0] - modifier = [a.shortTextDataType.value for a in record.attributeValues if a.attributeName == "[lastModifier]"][0] - modified_date = [a.dateTimeDataType.value for a in record.attributeValues if a.attributeName == "[modifiedDate]"][0] + creator = [a.short_text_data_value.value for a in record.attribute_values if a.attribute_name == "[creator]"][0] + created_date = [a.date_time_data_value.value for a in record.attribute_values if a.attribute_name == "[createdDate]"][0] + modifier = [a.short_text_data_value.value for a in record.attribute_values if a.attribute_name == "[lastModifier]"][0] + modified_date = [a.date_time_data_value.value for a in record.attribute_values if a.attribute_name == "[modifiedDate]"][0] print(f'"{creator}" imported the record on {created_date}') print(f'The record was last modified on {modified_date} by "{modifier}"') ``` *Previous cell output:* ```output "Ansys Granta 1" imported the record on 2023-09-20T12:11:05.873 -The record was last modified on 2025-05-12T16:21:14.687 by "ANSYS\mi-sw-admin" +The record was last modified on 2026-01-07T19:32:11.27 by "ANSYS\mi-sw-admin" ``` \ No newline at end of file diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/foundation/08_Inspecting_record_link_groups.md b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/foundation/08_Inspecting_record_link_groups.md index c7a1df5512..d774bcea21 100644 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/foundation/08_Inspecting_record_link_groups.md +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/foundation/08_Inspecting_record_link_groups.md @@ -1,4 +1,4 @@ -# Inspecting record link groups +# Inspecting record link groups Find which record link groups are in a specified database, and find which records are contained in a specified record link group. @@ -9,13 +9,13 @@ This example demonstrates: - Retrieve a list of records within a specified record link group ## Create a Granta MI session -Import the GRANTA_MIScriptingToolkit package, and create a connection to a Granta MI server. +Import the ansys.grantami.backend.soap package, and create a connection to a Granta MI server. ```python -import GRANTA_MIScriptingToolkit as gdl +import ansys.grantami.backend.soap as gdl -session = gdl.GRANTA_MISession("http://my.server.name/mi_servicelayer", autoLogon=True) +session = gdl.GRANTA_MISession("http://my.server.name/mi_servicelayer", auto_logon=True) print("Session created") ``` @@ -24,23 +24,23 @@ print("Session created") Session created ``` ## Retrieve record link groups from a given database -You can use GetRecordLinkGroups to retrieve information about all the link groups in a given database. +You can use get_record_link_groups to retrieve information about all the link groups in a given database. Find the record link groups and the group IDs for groups in the MI_Training database. ```python -dbKey = "MI_Training" -tableName = "Metals Pedigree" - -req = gdl.GetRecordLinkGroups(DBKey=dbKey) -grlg_resp = session.browseService.GetRecordLinkGroups(req) - -groups = {} # Will be populated as RLG name -> RLG object -for i, r in enumerate(grlg_resp.recordLinkGroups): - if i < 20: # Print first 20 group names - print(f"{r.name}: id={r.reference.recordLinkGroupIdentity}") - if r.fromTable.name == tableName: - groups[r.name] = r +db_key = "MI_Training" +table_name = "Metals Pedigree" + +req = gdl.GetRecordLinkGroups(db_key=db_key) +grlg_resp = session.browse_service.get_record_link_groups(req) + +groups = {} # Will be populated as RLG name -> RLG object +for idx, rlg in enumerate(grlg_resp.record_link_groups): + if idx < 5: # Print first 5 group names + print(f"{rlg.name}: id={rlg.reference.record_link_group_identity}") + if rlg.from_table.name == table_name: + groups[rlg.name] = rlg ``` *Previous cell output:* ```output @@ -49,39 +49,27 @@ Tensile Statistical Data: id=106 Design Data: id=105 Tensile Test Data: id=104 Metals Pedigree: id=102 -Specification Values: id=127 -Tensile Statistical Data: id=103 -Fatigue Test Data: id=125 -Fatigue Statistical Data: id=126 -Test Data: id=128 -AM builds using this batch: id=123 -Tensile Test Data: id=101 -Tensile test data: id=8 -Material batch: id=124 -Tensile tests from this build: id=10 -Machine learning: Build parameters: id=11 -MaterialUniverse: id=115 -Smart Link to MaterialUniverse: id=3 ``` ## List the records within a record link group Search for records containing "ICS-46634". Subsequent steps will use only these search results. ```python -def TextSearch(session, text, dbKey): +def text_search(session: gdl.GRANTA_MISession, text: str, db_key: str): """ Simple wrapper around textsearch """ - search = session.searchService - s = gdl.SimpleTextSearch() - s.DBKey = dbKey - s.searchValue = text - s.populateGUIDs = True - resp = search.SimpleTextSearch(s) + search = session.search_service + s = gdl.SimpleTextSearch( + db_key=db_key, + search_value=text, + populate_guids=True, + ) + resp = search.simple_text_search(s) return resp -results = TextSearch(session, "ICS-46634", dbKey) +results = text_search(session, "ICS-46634", db_key) ``` Collate the record references from the search results. Use GetLinkedRecords to specify the record link group "Tensile @@ -89,29 +77,29 @@ Test Data". ```python -recs = [r.recordReference for r in results.searchResults] +records = [r.record_reference for r in results.search_results] name = "Tensile Test Data" -g = groups[name] +rlg = groups[name] req = gdl.GetLinkedRecordsRequest( - recordLinkGroups=[g.reference], - recordReferences=recs, + record_link_groups=[rlg.reference], + record_references=records, ) -glr_resp = session.browseService.GetLinkedRecords(req) +glr_resp = session.browse_service.get_linked_records(req) ``` Collate and list the number of results from the record link group. ```python -links = [] # list of ordered pairs of refs -for sr in glr_resp.sourceRecords: - for rlg in sr.recordLinkGroups.recordLinkGroups: - for tr in rlg.linkedRecords: - links.append((sr.record, tr.recordReference)) -print(f"{len(links)} links found from {len(recs)} source records") +links = [] # list of ordered pairs of refs +for sr in glr_resp.source_records: + for rlg in sr.record_link_groups.record_link_groups: + for tr in rlg.linked_records: + links.append((sr.record, tr.record_reference)) +print(f"{len(links)} links found from {len(records)} source records") ``` *Previous cell output:* ```output @@ -123,24 +111,24 @@ group. ```python # Prepare to use GetTreeRecords to find record names corresponding to record references -idsToFetch = set([pair[0].identity for pair in links]) # source records -idsToFetch.update([pair[1].identity for pair in links]) # also add target records +ids_to_fetch = set([pair[0].identity for pair in links]) # source records +ids_to_fetch.update([pair[1].identity for pair in links]) # also add target records # create ref objects for all source/target records -recordRefs = [gdl.RecordReference(DBKey=dbKey, identity=recId) for recId in idsToFetch] +record_references = [gdl.RecordReference(db_key=db_key, identity=recId) for recId in ids_to_fetch] # use GetTreeRecords to find record names -req = gdl.GetTreeRecordsRequest(records=recordRefs) -resp = session.browseService.GetTreeRecords(req) -nameLookup = {tr.recordReference.identity:tr.shortName for tr in resp.treeRecords} +req = gdl.GetTreeRecordsRequest(records=record_references) +resp = session.browse_service.get_tree_records(req) +name_lookup = {tr.record_reference.identity: tr.short_name for tr in resp.tree_records} # Get and print record names -linkPairs = [] +link_pairs = [] for r in links: - linkPairs.append((nameLookup[r[0].identity], nameLookup[r[1].identity])) - + link_pairs.append((name_lookup[r[0].identity], name_lookup[r[1].identity])) + print(f"Records linked by '{name}':") -for pair in linkPairs: +for pair in link_pairs: print(f"{pair[0]:<30}-> {pair[1]}") ``` *Previous cell output:* diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/foundation/09_Modifying_record_link_groups.md b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/foundation/09_Modifying_record_link_groups.md index 7e564c4ddb..6d495465c3 100644 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/foundation/09_Modifying_record_link_groups.md +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/foundation/09_Modifying_record_link_groups.md @@ -9,15 +9,15 @@ This example demonstrates: - Create a link between the new record and another record ## Create a Granta MI session -Import the GRANTA_MIScriptingToolkit package, and create a connection to a Granta MI server. +Import the ansys.grantami.backend.soap package, and create a connection to a Granta MI server. ```python from datetime import datetime -import GRANTA_MIScriptingToolkit as gdl +import ansys.grantami.backend.soap as gdl -session = gdl.GRANTA_MISession("http://my.server.name/mi_servicelayer", autoLogon=True) +session = gdl.GRANTA_MISession("http://my.server.name/mi_servicelayer", auto_logon=True) ``` ## Create a link between a current record and a new record @@ -25,18 +25,18 @@ Find the record link groups that can be created within MaterialUniverse. ```python -dbkey = "MI_Training" -tableName = "MaterialUniverse" +db_key = "MI_Training" +table_name = "MaterialUniverse" -req = gdl.GetRecordLinkGroups(DBKey=dbkey) +req = gdl.GetRecordLinkGroups(db_key=db_key) -grlg_resp = session.browseService.GetRecordLinkGroups(req) +grlg_resp = session.browse_service.get_record_link_groups(req) groups = {} -for r in grlg_resp.recordLinkGroups: - if r.fromTable.name == tableName: - print(f"{r.name}: id={r.reference.recordLinkGroupIdentity}") - groups[r.name] = r +for rlg in grlg_resp.record_link_groups: + if rlg.from_table.name == table_name: + print(f"{rlg.name}: id={rlg.reference.record_link_group_identity}") + groups[rlg.name] = rlg ``` *Previous cell output:* ```output @@ -47,19 +47,19 @@ be the target record to create a link to later. ```python -grn_req = gdl.GetRootNode(table=groups["Training Exercise"].toTable) -grn_resp = session.browseService.GetRootNode(grn_req) +grn_req = gdl.GetRootNode(table=groups["Training Exercise"].to_table) +grn_resp = session.browse_service.get_root_node(grn_req) now = datetime.now().strftime("%c") -linkedRecordName = f"Scripting toolkit foundation layer example 09:{now}" +linked_record_name = f"Scripting Toolkit Foundation Layer Example 9:{now}" ir = gdl.ImportRecord( - recordName=linkedRecordName, - existingRecord=grn_resp.rootNode.recordReference, + record_name=linked_record_name, + existing_record=grn_resp.root_node.record_reference, ) -req = gdl.SetRecordAttributesRequest(importRecords=[ir], importErrorMode=gdl.GRANTA_Constants.ImportErrorMode.Fault) -resp = session.dataImportService.SetRecordAttributes(req) -target = resp.recordsImported[0] +req = gdl.SetRecordAttributesRequest(import_records=[ir], import_error_mode=gdl.GRANTA_Constants.ImportErrorMode.Fault) +resp = session.data_import_service.set_record_attributes(req) +target = resp.records_imported[0] ``` Set "PMMA (cast sheet)" in MaterialUniverse as the source record to create a link from. @@ -67,16 +67,16 @@ Set "PMMA (cast sheet)" in MaterialUniverse as the source record to create a lin ```python req = gdl.RecordNameSearchRequest( - caseSensitiveNames=False, - recordName="PMMA (cast sheet)", - populateGUIDs=True, - searchShortNames=True, - searchFullNames=True, + case_sensitive_names=False, + record_name="PMMA (cast sheet)", + populate_guids=True, + search_short_names=True, + search_full_names=True, + table=gdl.TableReference(db_key=db_key, name=table_name) ) -req.table = gdl.TableReference(DBKey=dbkey, name=tableName) -resp = session.searchService.RecordNameSearch(req) -sourceResult = resp.searchResults[0] -source = sourceResult.recordReference +resp = session.search_service.record_name_search(req) +source_result = resp.search_results[0] +source = source_result.record_reference ``` Use the ModifyRecordLinks operation to create a link called "Training Exercise" from "PMMA (cast sheet)" to the new @@ -84,23 +84,23 @@ imported record. ```python -destinationRec = gdl.NotatedTargetRecord( - record=target.recordReference, +destination_record = gdl.NotatedTargetRecord( + record=target.record_reference, notes="This will work", ) -mySourceRec = gdl.NotatedTargetedSourceRecord( - sourceRecord=source, - targetRecords=[destinationRec], +source_record = gdl.NotatedTargetedSourceRecord( + source_record=source, + target_records=[destination_record], ) -linkThisRecord = gdl.LinkRecords(sourceRecords=[mySourceRec]) -recordLinksMod = gdl.RecordLinkModifications(linkRecords=[linkThisRecord]) +link_records = gdl.LinkRecords(source_records=[source_record]) +record_link_modifications = gdl.RecordLinkModifications(link_records=[link_records]) req = gdl.ModifyRecordLinksRequest( - recordLinkGroupReference=groups["Training Exercise"].reference, - recordLinkModifications=recordLinksMod, - importErrorMode=gdl.GRANTA_Constants.ImportErrorMode.Fault, + record_link_group_reference=groups["Training Exercise"].reference, + record_link_modifications=record_link_modifications, + import_error_mode=gdl.GRANTA_Constants.ImportErrorMode.Fault, ) -mrlresp = session.dataImportService.ModifyRecordLinks(req) +mrlresp = session.data_import_service.modify_record_links(req) ``` Print the record names and GUIDs for the newly-linked records. You can also check this new link in MI Viewer, by @@ -108,17 +108,17 @@ viewing the link on the "PMMA (cast sheet)" datasheet. ```python -print(f"Created {len(mrlresp.recordLinkChanges.linked)} link(s)") +print(f"Created {len(mrlresp.record_link_changes.linked)} link(s)") -change = mrlresp.recordLinkChanges.linked[0] -source_guid = change.record.recordReference.recordGUID -source_name = sourceResult.shortName -target_guid = change.targetRecords[0].recordReference.recordGUID -target_name = ir.recordName +change = mrlresp.record_link_changes.linked[0] +source_guid = change.record.record_reference.record_guid +source_name = source_result.short_name +target_guid = change.target_records[0].record_reference.record_guid +target_name = ir.record_name print(f"{source_guid} ({source_name}) -> {target_guid} ({target_name})") ``` *Previous cell output:* ```output Created 1 link(s) -000016f6-000e-4fff-8fff-dd92ffff0000 (Cast sheet) -> f630996a-c1f6-4840-8afe-a011f60c0d49 (Scripting toolkit foundation layer example 09:Mon May 12 16:21:51 2025) +000016f6-000e-4fff-8fff-dd92ffff0000 (Cast sheet) -> 3481aff1-d5a8-4451-9e55-8557eed407fa (Scripting Toolkit Foundation Layer Example 9:Wed Jan 7 19:32:44 2026) ``` \ No newline at end of file diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/foundation/10_Resolve_references.md b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/foundation/10_Resolve_references.md index 022b119dde..fcb3434a0e 100644 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/foundation/10_Resolve_references.md +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/foundation/10_Resolve_references.md @@ -4,20 +4,20 @@ Let's see if we can modify a record... ```python -import GRANTA_MIScriptingToolkit as gdl +import ansys.grantami.backend.soap as gdl -session = gdl.GRANTA_MISession("http://my.server.name/mi_servicelayer/", autoLogon=True, receiveTimeout=5000) +session = gdl.GRANTA_MISession("http://my.server.name/mi_servicelayer/", auto_logon=True, receive_timeout=5000) db_key = "MI_Training" table_name = "Tensile Test Data" -browse_service = session.browseService +browse_service = session.browse_service -modfied_record_guid = "4269f1bc-df6b-4a6d-870c-ef931728f37b" -modified_record_ref = gdl.RecordReference(DBKey=db_key, recordGUID=modfied_record_guid) +modified_record_guid = "4269f1bc-df6b-4a6d-870c-ef931728f37b" +modified_record_ref = gdl.RecordReference(db_key=db_key, record_guid=modified_record_guid) resolve_refs_request = gdl.ResolveReferencesRequest(entities=[modified_record_ref]) -can_modify_int = browse_service.ResolveReferences(resolve_refs_request).entityResolutions[0].canWrite +can_modify_int = browse_service.resolve_references(resolve_refs_request).entity_resolutions[0].can_write if can_modify_int == 0: print("Yes, we can edit this record.") else: diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/foundation/11_Get_unit_conversions.md b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/foundation/11_Get_unit_conversions.md index 99a6ce453f..271b33595e 100644 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/foundation/11_Get_unit_conversions.md +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/foundation/11_Get_unit_conversions.md @@ -2,61 +2,60 @@ Export the Young's Modulus in the Metric system for a record + ```python import pandas -import GRANTA_MIScriptingToolkit as gdl +import ansys.grantami.backend.soap as gdl -session = gdl.GRANTA_MISession("http://my.server.name/mi_servicelayer/", autoLogon=True, receiveTimeout=5000) +session = gdl.GRANTA_MISession("http://my.server.name/mi_servicelayer/", auto_logon=True, receive_timeout=5000) db_key = "MI_Training" table_name = "Tensile Test Data" -import_service = session.dataImportService -browse_service = session.browseService -export_service = session.dataExportService +import_service = session.data_import_service +browse_service = session.browse_service +export_service = session.data_export_service -partial_table_ref = gdl.PartialTableReference(tableName=table_name) +partial_table_ref = gdl.PartialTableReference(table_name=table_name) -modfied_record_guid = "4269f1bc-df6b-4a6d-870c-ef931728f37b" -modified_record_ref = gdl.RecordReference(DBKey=db_key, recordGUID=modfied_record_guid) +modified_record_guid = "4269f1bc-df6b-4a6d-870c-ef931728f37b" +modified_record_ref = gdl.RecordReference(db_key=db_key, record_guid=modified_record_guid) attribute_name = "Young's Modulus (11-axis)" -unit_context_metric = gdl.UnitConversionContext(unitSystem="Metric") +unit_context_metric = gdl.UnitConversionContext(unit_system=gdl.UnitSystemDetail(name="Metric")) modulus_attribute_ref = gdl.AttributeReference( name=attribute_name, - DBKey=db_key, - partialTableReference=partial_table_ref, + db_key=db_key, + partial_table_reference=partial_table_ref, ) export_request = gdl.GetRecordAttributesByRefRequest( - recordReferences=[modified_record_ref], - attributeReferences=[modulus_attribute_ref], + record_references=[modified_record_ref], + attribute_references=[modulus_attribute_ref], ) -exported_data = export_service.GetRecordAttributesByRef(export_request).recordData -modulus_value = [[a.pointDataType.points[0].value for a in r.attributeValues] for r in exported_data][0][0] -modulus_metric_symbol = [[a.pointDataType.unitSymbol for a in r.attributeValues] for r in exported_data][0][0] +exported_data = export_service.get_record_attributes_by_ref(export_request).record_data +modulus_value = [[a.point_data_value.points[0].value for a in r.attribute_values] for r in exported_data][0][0] +modulus_metric_symbol = [[a.point_data_value.unit_symbol for a in r.attribute_values] for r in exported_data][0][0] print(f"Young's modulus = {modulus_value} {modulus_metric_symbol}") ``` - *Previous cell output:* - ```output Young's modulus = 174.0004272460938 GPa ``` - Now let's convert its value with all available conversions in Granta MI + ```python unit_conversions_request = gdl.GetUnitConversionsRequest( - DBKey=db_key, - unitSymbols=[modulus_metric_symbol], + db_key=db_key, + unit_symbols=[modulus_metric_symbol], ) -source_units = browse_service.GetUnitConversions(unit_conversions_request).sourceUnits +source_units = browse_service.get_unit_conversions(unit_conversions_request).source_units conversion_targets = [c.conversions for c in source_units] factors_and_offsets = [[(c.factor, c.offset) for c in c_target] for c_target in conversion_targets][0] -symbols = [[c.targetSymbol for c in c_target] for c_target in conversion_targets][0] +symbols = [[c.target_symbol for c in c_target] for c_target in conversion_targets][0] results = [modulus_value * factor + offset for factor, offset in factors_and_offsets] equations = [f"{modulus_value} * {factor} + {offset}" for factor, offset in factors_and_offsets] @@ -68,212 +67,218 @@ df_flipped.index = symbols df_flipped.style ``` - + + + +
- - - - + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + +
 factoroffsetequationconverted resultfactoroffsetequationconverted result
10^6 psi0.1450380.000000174.0004272460938 * 0.14503773773039605 + 0.025.23662810^6 psi0.1450380.000000174.0004272460938 * 0.14503773773039605 + 0.025.236628
ksi145.0377380.000000174.0004272460938 * 145.03773773039603 + 0.025236.628332ksi145.0377380.000000174.0004272460938 * 145.03773773039603 + 0.025236.628332
psi145037.7377300.000000174.0004272460938 * 145037.73773039604 + 0.025236628.331896psi145037.7377300.000000174.0004272460938 * 145037.73773039604 + 0.025236628.331896
MGO125663.7061060.000000174.0004272460938 * 125663.70610560982 + 0.021865538.551704MGO125663.7061060.000000174.0004272460938 * 125663.70610560982 + 0.021865538.551704
Pa1000000000.0000000.000000174.0004272460938 * 1000000000.0 + 0.0174000427246.093811Pa1000000000.0000000.000000174.0004272460938 * 1000000000.0 + 0.0174000427246.093811
MPa1000.0000000.000000174.0004272460938 * 1000.0 + 0.0174000.427246MPa1000.0000000.000000174.0004272460938 * 1000.0 + 0.0174000.427246
J/m^31000000000.0000000.000000174.0004272460938 * 1000000000.0 + 0.0174000427246.093811J/m^31000000000.0000000.000000174.0004272460938 * 1000000000.0 + 0.0174000427246.093811
MJ/m^31000.0000000.000000174.0004272460938 * 1000.0 + 0.0174000.427246MJ/m^31000.0000000.000000174.0004272460938 * 1000.0 + 0.0174000.427246
erg/cm^310000000000.0000020.000000174.0004272460938 * 10000000000.000002 + 0.01740004272460.938477erg/cm^310000000000.0000020.000000174.0004272460938 * 10000000000.000002 + 0.01740004272460.938477
ft.lbf/in^312086.4781440.000000174.0004272460938 * 12086.478144199671 + 0.02103052.360991ft.lbf/in^312086.4781440.000000174.0004272460938 * 12086.478144199671 + 0.02103052.360991
kJ/m^31000000.0000000.000000174.0004272460938 * 1000000.0 + 0.0174000427.246094kJ/m^31000000.0000000.000000174.0004272460938 * 1000000.0 + 0.0174000427.246094
inHg295299.7144450.000000174.0004272460938 * 295299.7144451761 + 0.051382276.479110inHg295299.7144450.000000174.0004272460938 * 295299.7144451761 + 0.051382276.479110
Ba10000000000.0000000.000000174.0004272460938 * 10000000000.0 + 0.01740004272460.937988Ba10000000000.0000000.000000174.0004272460938 * 10000000000.0 + 0.01740004272460.937988
hPa10000000.0000000.000000174.0004272460938 * 10000000.0 + 0.01740004272.460938hPa10000000.0000000.000000174.0004272460938 * 10000000.0 + 0.01740004272.460938
mb10000000.0000000.000000174.0004272460938 * 10000000.0 + 0.01740004272.460938mb10000000.0000000.000000174.0004272460938 * 10000000.0 + 0.01740004272.460938
bar10000.0000000.000000174.0004272460938 * 10000.0 + 0.01740004.272461bar10000.0000000.000000174.0004272460938 * 10000.0 + 0.01740004.272461
atm9869.2326670.000000174.0004272460938 * 9869.232667160128 + 0.01717250.700677atm9869.2326670.000000174.0004272460938 * 9869.232667160128 + 0.01717250.700677
torr7500637.5541920.000000174.0004272460938 * 7500637.554192106 + 0.01305114139.047523torr7500637.5541920.000000174.0004272460938 * 7500637.554192106 + 0.01305114139.047523
lbf/ft^220885434.2331770.000000174.0004272460938 * 20885434.233177025 + 0.03634074479.792996lbf/ft^220885434.2331770.000000174.0004272460938 * 20885434.233177025 + 0.03634074479.792996
HV101.9716210.000000174.0004272460938 * 101.97162129779282 + 0.017743.105673HV101.9716210.000000174.0004272460938 * 101.97162129779282 + 0.017743.105673
kgf/mm^2101.9716210.000000174.0004272460938 * 101.97162129779282 + 0.017743.105673kgf/mm^2101.9716210.000000174.0004272460938 * 101.97162129779282 + 0.017743.105673
dyn/cm^210000000000.0000000.000000174.0004272460938 * 10000000000.0 + 0.01740004272460.937988dyn/cm^210000000000.0000000.000000174.0004272460938 * 10000000000.0 + 0.01740004272460.937988
ft.lbf/ft^320885434.2331770.000000174.0004272460938 * 20885434.23317702 + 0.03634074479.792995ft.lbf/ft^320885434.2331770.000000174.0004272460938 * 20885434.23317702 + 0.03634074479.792995
in.lbf/in^3145037.7377300.000000174.0004272460938 * 145037.73773039604 + 0.025236628.331896in.lbf/in^3145037.7377300.000000174.0004272460938 * 145037.73773039604 + 0.025236628.331896
J/cm^31000.0000000.000000174.0004272460938 * 1000.0000000000001 + 0.0174000.427246J/cm^31000.0000000.000000174.0004272460938 * 1000.0000000000001 + 0.0174000.427246
kN/cm^2100.0000000.000000174.0004272460938 * 100.0 + 0.017400.042725kN/cm^2100.0000000.000000174.0004272460938 * 100.0 + 0.017400.042725
Msi0.1450380.000000174.0004272460938 * 0.14503773773039605 + 0.025.236628Msi0.1450380.000000174.0004272460938 * 0.14503773773039605 + 0.025.236628
N/mm^21000.0000000.000000174.0004272460938 * 1000.0 + 0.0174000.427246N/mm^21000.0000000.000000174.0004272460938 * 1000.0 + 0.0174000.427246
+ + + diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/00_Get_Started.md b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/00_Get_Started.md index b1b2ad9f15..474963b466 100644 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/00_Get_Started.md +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/00_Get_Started.md @@ -1,4 +1,4 @@ -# Get Started +# Get Started Load MI Scripting Toolkit, connect to your MI Session, and select a database and table. ## Connect to MI @@ -7,9 +7,9 @@ replacing `my.server.name` with the name of your Granta MI server. ```python -from GRANTA_MIScriptingToolkit import granta as mpy +import ansys.grantami.core as mpy -mi = mpy.connect("http://my.server.name/mi_servicelayer", autologon=True) +mi = mpy.SessionBuilder("http://my.server.name/mi_servicelayer").with_autologon() ``` ## Select a database @@ -24,12 +24,12 @@ Set a unit system, and choose whether to use absolute or relative temperatures ( ```python -my_db.unit_system = 'UK Imperial' +my_db.unit_system = "UK Imperial" my_db.absolute_temperatures = False ``` ## Select a table -Select *MaterialUniverse* and print its number of attributes. +Select *MaterialUniverse* and print its number of attributes. ```python @@ -128,7 +128,7 @@ with data like this: *Previous cell output:* ```output - + ``` diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/01_Get_Attributes.md b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/01_Get_Attributes.md index 16690edd96..0bb093228d 100644 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/01_Get_Attributes.md +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/01_Get_Attributes.md @@ -5,12 +5,12 @@ Find out about the database schema by accessing the `attributes` property of the ```python -from GRANTA_MIScriptingToolkit import granta as mpy +import ansys.grantami.core as mpy -mi = mpy.connect("http://my.server.name/mi_servicelayer", autologon=True) +mi = mpy.SessionBuilder("http://my.server.name/mi_servicelayer").with_autologon() ``` -## Get table +## Get table Get a database, then set the unit system for the **Database** object. @@ -32,8 +32,8 @@ Get a table from the database. ```python -tab = db.get_table("Training Exercise for Import") -tab +table = db.get_table("Training Exercise for Import") +table ``` @@ -44,16 +44,16 @@ tab ``` -## Access the attribute definitions +## Access the attribute definitions These are associated with the **Table** object through the `attributes` property, which returns a dictionary of **AttributeDefinition** objects. ```python print(f"{'Name':30.30} - {'Type':^10.10} - {'Unit':^10.10} - {'Meta?':^10.10}") -print("-"*70) -for name, att in tab.attributes.items(): - print(f"{name:30.30} - {att.type:^10.10} - {att.unit:^10.10} - {str(att.is_meta):^10.10}") +print("-" * 70) +for name, att in table.attributes.items(): + print(f"{name:30.30} - {att.type:^10.10} - {getattr(att, 'unit', ''):^10.10} - {str(att.is_meta):^10.10}") ``` *Previous cell output:* ```output diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/02_Browse_MI.md b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/02_Browse_MI.md index 217787c4f5..a7fc6ed285 100644 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/02_Browse_MI.md +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/02_Browse_MI.md @@ -11,8 +11,9 @@ This notebook shows three methods of browsing for records in Granta MI: ```python -from GRANTA_MIScriptingToolkit import granta as mpy -mi = mpy.connect("http://my.server.name/mi_servicelayer", autologon=True) +import ansys.grantami.core as mpy + +mi = mpy.SessionBuilder("http://my.server.name/mi_servicelayer").with_autologon() db = mi.get_db(db_key="MI_Training") ``` @@ -128,12 +129,12 @@ parent with the short name *Baryta*. ```python -recs = material_universe.get_records_from_path( +baryta_children = material_universe.get_records_from_path( starting_node=None, tree_path=["Ceramics and glasses", None, "Baryta"], use_short_names=True, ) -recs +baryta_children ``` @@ -148,11 +149,11 @@ Get all records that are great-grandchildren of the folder *Ceramics and glasses ```python -recs = material_universe.get_records_from_path( +ceramics_great_grandchildren = material_universe.get_records_from_path( starting_node=ceramics_and_glasses, tree_path=[None, None], ) -recs +ceramics_great_grandchildren ``` @@ -196,7 +197,7 @@ Print the results and whether the object is a record or folder. ```python print(f"{'Record Name':^30.30} | {'Short Name':^30.30} | {'Record / Folder?':^30.30}") -print("-"*96) +print("-" * 96) for r in all_ceramics_and_glasses: print(f"{r.name:^30.30} | {r.short_name:^30.30} | {r.type:^30.30}") ``` diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/03_Search_MI.md b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/03_Search_MI.md index 38c61fbe5b..9023ebd216 100644 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/03_Search_MI.md +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/03_Search_MI.md @@ -11,8 +11,9 @@ All three methods can be performed at either the Session, Database, or Table lev ```python -from GRANTA_MIScriptingToolkit import granta as mpy -mi = mpy.connect("http://my.server.name/mi_servicelayer", autologon=True) +import ansys.grantami.core as mpy + +mi = mpy.SessionBuilder("http://my.server.name/mi_servicelayer").with_autologon() db = mi.get_db(db_key="MI_Training") db.unit_system = "UK Imperial" material_universe = db.get_table("MaterialUniverse") @@ -216,8 +217,8 @@ legislations = db.get_table("Legislations and Lists") effective_date_attribute = legislations.attributes["Effective date"] import datetime -start_date = datetime.datetime(1970, 1, 1) -end_date = datetime.datetime(2000, 1, 1) +start_date = datetime.date(1970, 1, 1) +end_date = datetime.date(2000, 1, 1) effective_date_1970_2000 = effective_date_attribute.search_criterion(between_dates=(start_date, end_date)) legislations_1970_2000 = legislations.search_for_records_where([effective_date_1970_2000]) legislations_1970_2000 @@ -342,7 +343,7 @@ Print the results of the tabular search. ```python print(f"{'Record Name':^55.55} | {'Short Name':^55.55}") -print("-"*113) +print("-" * 113) for r in affected_materials: print(f"{r.name:^55.55} | {r.short_name:^55.55}") ``` @@ -366,20 +367,18 @@ tensile_test_table = db.get_table("Tensile Test Data") name_criterion = mpy.SearchCriterion(mpy.RecordProperties.name, "CONTAINS", "MTS") -start_datetime = datetime.datetime(year=2023, month=9, day=1) -end_datetime = datetime.datetime(year=2023, month=9, day=30) -created_criterion = mpy.SearchCriterion( - mpy.RecordProperties.created_on, "BETWEEN", (start_datetime, end_datetime) -) +start_datetime = datetime.datetime(year=2023, month=9, day=1, hour=0, minute=0, second=0) +end_datetime = datetime.datetime(year=2023, month=10, day=1, hour=0, minute=0, second=0) +created_criterion = mpy.SearchCriterion(mpy.RecordProperties.created_on, "BETWEEN", (start_datetime, end_datetime)) created_records = tensile_test_table.search_for_records_where([name_criterion, created_criterion]) print(f"{len(created_records)} records found. Displaying first 5...") print() print(f"{'Record Name':^55.55} | {'Created Date':^55.55}") -print("-"*113) +print("-" * 113) for r in created_records[:5]: - created_on = r.created_on.strftime('%Y/%m/%d %H:%M:%S') + created_on = r.created_on.strftime("%Y/%m/%d %H:%M:%S") print(f"{r.name:^55.55} | {created_on:^55.55}") ``` *Previous cell output:* diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/04_Fetch_Attribute_Data_in_Bulk.md b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/04_Fetch_Attribute_Data_in_Bulk.md index 56c7ba8a54..99df62fe6f 100644 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/04_Fetch_Attribute_Data_in_Bulk.md +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/04_Fetch_Attribute_Data_in_Bulk.md @@ -5,20 +5,20 @@ and as export requests are performed for each individual record. By grouping records into fewer requests through batching, and allowing the export of only a subset of attributes, `bulk_fetch()` can be used to enhance performance. -## Connect to MI +## Connect to MI Specify a database and table. ```python -from GRANTA_MIScriptingToolkit import granta as mpy +import ansys.grantami.core as mpy -mi = mpy.connect("http://my.server.name/mi_servicelayer", autologon=True) +mi = mpy.SessionBuilder("http://my.server.name/mi_servicelayer").with_autologon() db = mi.get_db(db_key="MI_Training") db.unit_system = "Metric" db.absolute_temperatures = True -tab = db.get_table("MaterialUniverse") +table = db.get_table("MaterialUniverse") ``` ## Define a list of records to fetch @@ -40,7 +40,7 @@ Get each record using its Record GUID, using the `get_records_by_ids` method. ```python -records = tab.get_records_by_ids([{"vguid": guid} for guid in guids]) +records = table.get_records_by_ids([{"vguid": guid} for guid in guids]) records ``` @@ -57,31 +57,31 @@ records ``` -## Fetch attribute data values +## Fetch attribute data values Fetch the *Base*, *Density* and *Young's modulus* attribute values for each record, and print the results. Default units can be overridden before export using the `table.set_display_unit()` method. ```python -tab.set_display_unit("Young's modulus", "ksi") -tab.bulk_fetch(records=records, attributes=["Base", "Density", "Young's modulus"]) +table.set_display_unit("Young's modulus", "ksi") +table.bulk_fetch(records=records, attributes=["Base", "Density", "Young's modulus"]) -density_unit = tab.attributes["Density"].unit +density_unit = table.attributes["Density"].unit density_header = f"Density / {density_unit}" -youngs_mod_unit = tab.attributes["Young's modulus"].unit +youngs_mod_unit = table.attributes["Young's modulus"].unit youngs_mod_header = f"Young's modulus / {youngs_mod_unit}" print(f"{'Name':50.50} | {density_header:^21} | {youngs_mod_header:^21} | {'Base':^18}") -print("-"*120) +print("-" * 120) for record in records: formatted_name = f"{record.name:50.50}" density = record.attributes["Density"].value - formatted_density = f"{density['low']:^10.2f}-{density['high']:^10.2f}" + formatted_density = f"{density.low:^10.2f}-{density.high:^10.2f}" youngs_mod = record.attributes["Young's modulus"].value - formatted_youngs_mod = f"{youngs_mod['low']:^10.2f}-{youngs_mod['high']:^10.2f}" + formatted_youngs_mod = f"{youngs_mod.low:^10.2f}-{youngs_mod.high:^10.2f}" base = record.attributes["Base"].value formatted_base = f"{base:^20}" @@ -110,13 +110,13 @@ Fetch the attribute *Food contact* and associated meta-attribute *Notes* for eac ```python import textwrap -food_contact = tab.attributes["Food contact"] +food_contact = table.attributes["Food contact"] food_contact_notes = food_contact.meta_attributes["Notes"] -tab.bulk_fetch(records=records, attributes=[food_contact, food_contact_notes]) +table.bulk_fetch(records=records, attributes=[food_contact, food_contact_notes]) print(f"{'Name':50.50} | {'Food contact':^18} | {'Notes':^42}") -print("-"*120) +print("-" * 120) for record in records: formatted_name = f"{record.name:50.50}" diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/06_Create_Records.md b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/05_Create_Records.md similarity index 64% rename from 2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/06_Create_Records.md rename to 2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/05_Create_Records.md index 333d96adb2..b4cbf462d9 100644 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/06_Create_Records.md +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/05_Create_Records.md @@ -6,9 +6,9 @@ Create records and delete (or withdraw) them in bulk. ```python from datetime import datetime -from GRANTA_MIScriptingToolkit import granta as mpy +import ansys.grantami.core as mpy -mi = mpy.connect("http://my.server.name/mi_servicelayer", autologon=True) +mi = mpy.SessionBuilder("http://my.server.name/mi_servicelayer").with_autologon() table = mi.get_db(db_key="MI_Training").get_table("Files for Training") ``` @@ -26,8 +26,8 @@ Create five new **Record** objects. ```python now = datetime.now().strftime("%c") -recordNames = [f"Scripting Toolkit Example 6:{now} - {i}" for i in range(5)] -new_records = [table.create_record(n, parent=parent, subsets={"All files"}) for n in recordNames] +record_names = [f"Scripting Toolkit Example 5:{now} - {i}" for i in range(5)] +new_records = [table.create_record(n, parent=parent, subsets={"All files"}) for n in record_names] new_records ``` @@ -35,15 +35,15 @@ new_records *Previous cell output:* ```output -[, - , - , - , - ] +[, + , + , + , + ] ``` -## Write your changes to MI +## Write your changes to MI The new records are created on the server when update() is called. @@ -57,11 +57,11 @@ for rec in recs: *Previous cell output:* ```output New records: -http://my.server.name/mi/datasheet.aspx?dbKey=MI_Training&recordHistoryGuid=975bc163-8df2-4cd6-9421-9cf7ef83e8c9 -http://my.server.name/mi/datasheet.aspx?dbKey=MI_Training&recordHistoryGuid=e1abe509-f1b5-4a6a-9e3a-f6d2e9e7e5c8 -http://my.server.name/mi/datasheet.aspx?dbKey=MI_Training&recordHistoryGuid=65394190-e659-4950-99fd-df33af02e430 -http://my.server.name/mi/datasheet.aspx?dbKey=MI_Training&recordHistoryGuid=22bd9edf-6a76-417a-81a8-aee6dfdcaf6a -http://my.server.name/mi/datasheet.aspx?dbKey=MI_Training&recordHistoryGuid=f9bbed4d-f9ce-4df8-be58-27eed426118a +http://my.server.name/mi/datasheet.aspx?dbKey=MI_Training&recordHistoryGuid=8717b0ba-8696-4fda-991c-03bdc0f76781 +http://my.server.name/mi/datasheet.aspx?dbKey=MI_Training&recordHistoryGuid=33fbdbda-78ed-4862-98ec-2e7014f3fdcc +http://my.server.name/mi/datasheet.aspx?dbKey=MI_Training&recordHistoryGuid=75557043-71d1-4cb3-9fd5-e575e952753a +http://my.server.name/mi/datasheet.aspx?dbKey=MI_Training&recordHistoryGuid=107a6da1-5702-4161-bd25-c94a70b0e10c +http://my.server.name/mi/datasheet.aspx?dbKey=MI_Training&recordHistoryGuid=1e07c4c4-ccb3-4e5d-9a58-f870acb30518 ``` ## Delete the records ``Session.bulk_delete_or_withdraw_records`` accepts any list of records (e.g. results of a search, diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/05_Edit_Data.md b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/06_Edit_Text_Data.md similarity index 77% rename from 2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/05_Edit_Data.md rename to 2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/06_Edit_Text_Data.md index 5753265cd0..e72fae13b3 100644 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/05_Edit_Data.md +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/06_Edit_Text_Data.md @@ -1,14 +1,15 @@ -# Edit Data -Create and edit a **Record** object and write your changes to the MI server. +# Text Data +Work with text data, including short text, long text, and discrete data. -This notebook describes how to edit text-based attributes. See the following notebooks for additional attribute types: +This notebook describes how to edit text-based data. See the following notebooks for additional data types: -- [Point and range attributes](./12_Add_Point_Range_Data.ipynb) -- [Date, integer, and logical attributes](./13_Add_Date_Integer_and_Logical_Data.ipynb) -- [Functional attributes](./07_Import_Functional_Data.ipynb) -- [Tabular attributes](./09_Edit_Tabular_Data.ipynb) -- [File, picture, and hyperlink attributes](./11_Add_Files_Pictures_and_Hyperlinks.ipynb) -- [Pseudo-attributes](./10_Edit_Pseudo-attributes.ipynb) +- [Point and range data](./07_Edit_Point_Range_Data.ipynb) +- [Date, integer, and logical data](./08_Edit_Date_Integer_and_Logical_Data.ipynb) +- [File, picture, and hyperlink data](./09_Edit_Files_Pictures_and_Hyperlinks.ipynb) +- [Float functional data](./10_Edit_Float_Functional_Data.ipynb) +- [Local tabular data](./11_Edit_Local_Tabular_Data.ipynb) +- [Linked tabular data](./12_Edit_Linked_Tabular_Data.ipynb) +- [Pseudo-attributes](./13_Edit_Pseudo-attributes.ipynb) ## Connect to MI Get a database and table. @@ -16,15 +17,15 @@ Get a database and table. ```python from datetime import datetime -from GRANTA_MIScriptingToolkit import granta as mpy +import ansys.grantami.core as mpy -mi = mpy.connect("http://my.server.name/mi_servicelayer", autologon=True) +mi = mpy.SessionBuilder("http://my.server.name/mi_servicelayer").with_autologon() db = mi.get_db(db_key="MI_Training") db.unit_system = "SI (Consistent)" db.absolute_temperatures = True -tab = db.get_table("Design Data") +table = db.get_table("Design Data") ``` ## Create a new record and path @@ -34,9 +35,9 @@ Create a new **Record** object at the end of the path. ```python now = datetime.now().strftime("%c") -record_name = f"Scripting Toolkit Example 5:{now}" -folder = tab.path_from(None, tree_path=["High Alloy Steel", "AMS 6520"]) -record = tab.create_record(name=record_name, parent=folder) +record_name = f"Scripting Toolkit Example 6:{now}" +folder = table.path_from(None, tree_path=["High Alloy Steel", "AMS 6520"]) +record = table.create_record(name=record_name, parent=folder) record, folder ``` @@ -44,7 +45,7 @@ record, folder *Previous cell output:* ```output -(, +(, ) ``` @@ -64,7 +65,7 @@ Edit their data values. ```python -common_name.value = "Scripting Toolkit Example 5 Test Material" +common_name.value = "Scripting Toolkit Example 6 Test Material" product_form.value = "Plate" ``` @@ -79,13 +80,13 @@ statistical_basis.value = "S basis" ```output Statistical Basis supports multivalued data? False ``` -*Available mechanical properties* is a multivalued discrete attribute. It can be set either with a string or a list of -strings for each value. +*Available mechanical properties* is a multivalued discrete attribute. It can be set either with a string or a tuple +of strings for each value. ```python print(f"{available_properties.name} supports multivalued data? {available_properties.is_multivalued}") -available_properties.value = ["Tensile", "Compression"] +available_properties.value = ("Tensile", "Compression") ``` *Previous cell output:* ```output @@ -119,7 +120,7 @@ print(f"Record Name: {record.name}, State: {record.release_state}") ``` *Previous cell output:* ```output -Record Name: Scripting Toolkit Example 5:Mon May 12 16:11:34 2025, State: Unreleased +Record Name: Scripting Toolkit Example 6:Wed Jan 7 19:24:46 2026, State: Unreleased ``` ## 'Not Applicable' flag Further edits can be made to the same **Record** object. In this case, the *Condition* attribute is not relevant, @@ -143,7 +144,7 @@ print(f'Record Name: "{record.name}", State: "{record.release_state}"') ``` *Previous cell output:* ```output -Record Name: "Scripting Toolkit Example 5:Mon May 12 16:11:34 2025", State: "Released" +Record Name: "Scripting Toolkit Example 6:Wed Jan 7 19:24:46 2026", State: "Released" ``` Check the `Record.all_versions` property for a dictionary of all versions of the record. The dictionary contains a single version, confirming that only a single version was created in Granta MI. @@ -157,7 +158,7 @@ record.all_versions *Previous cell output:* ```output -{'v1': } +{'v1': } ``` @@ -200,7 +201,7 @@ print(f'"Record Name: {record.name}", State: "{record.release_state}"') ``` *Previous cell output:* ```output -"Record Name: Scripting Toolkit Example 5:Mon May 12 16:11:34 2025", State: "Released" +"Record Name: Scripting Toolkit Example 6:Wed Jan 7 19:24:46 2026", State: "Released" ``` Check the `Record.all_versions` property again. The dictionary contains two versions, confirming that updating the Mooney-Rivlin attribute has created and released a second version of the record. @@ -214,8 +215,8 @@ record.all_versions *Previous cell output:* ```output -{'v1': , - 'v2': } +{'v1': , + 'v2': } ``` @@ -251,7 +252,7 @@ print(f"Mooney-Rivlin: {result}, comments: {mooney_rivlin_comment.value}") ``` *Previous cell output:* ```output -Common Name: Scripting Toolkit Example 5 Test Material +Common Name: Scripting Toolkit Example 6 Test Material Product Form: Plate Statistical Basis: S basis Available mechanical properties: Tensile, Compression diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/12_Add_Point_Range_Data.md b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/07_Edit_Point_Range_Data.md similarity index 65% rename from 2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/12_Add_Point_Range_Data.md rename to 2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/07_Edit_Point_Range_Data.md index 8e3d03c616..15fc5ba68e 100644 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/12_Add_Point_Range_Data.md +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/07_Edit_Point_Range_Data.md @@ -1,5 +1,5 @@ -# Add Point and Range data -Work with point and range attribute types, including multi-valued points and open-ended ranges. +# Point and Range data +Work with point and range data, including multi-valued points and open-ended ranges. ## Connect to MI Get a database and table. @@ -7,15 +7,15 @@ Get a database and table. ```python from datetime import datetime -from GRANTA_MIScriptingToolkit import granta as mpy +import ansys.grantami.core as mpy -mi = mpy.connect("http://my.server.name/mi_servicelayer", autologon=True) +mi = mpy.SessionBuilder("http://my.server.name/mi_servicelayer").with_autologon() db = mi.get_db(db_key="MI_Training") db.unit_system = "Metric" db.absolute_temperatures = False -tab = db.get_table("Composite Design Data") +table = db.get_table("Composite Design Data") ``` ## Create a new record and path @@ -26,9 +26,9 @@ Create a new **Record** object at the end of the path. ```python now = datetime.now().strftime("%c") -record_name = f"Scripting Toolkit Example 12:{now}" -folder = tab.path_from(None, tree_path=["Epoxy / Glass", "3M, S-Glass Unitape S2/SP381", "[0]"]) -record = tab.create_record(name=record_name, parent=folder) +record_name = f"Scripting Toolkit Example 7:{now}" +folder = table.path_from(None, tree_path=["Epoxy / Glass", "3M, S-Glass Unitape S2/SP381", "[0]"]) +record = table.create_record(name=record_name, parent=folder) record, folder ``` @@ -36,7 +36,7 @@ record, folder *Previous cell output:* ```output -(, +(, ) ``` @@ -53,33 +53,42 @@ fiber_volume = record.attributes["Fiber volume"] ``` ### Point attributes -Assign a list of numeric values to the `points` property. +Schema Administrators can set whether point attributes accept multiple values or a single value. In Scripting +Toolkit, these attribute values are represented via ``AttributePointMulti`` or ``AttributePointSingle``. -If multiple values are assigned, you must also assign a list of dictionaries containing the parameter values to the -`parameters` property. (The two lists must be the same length.) -Here, a single parameter called *Basis* is used to discriminate between the two point values. +Single-valued attributes must be set to a single float or integer value. ```python test_temperature.value = 23 test_temperature.unit = "°C" +``` + +To define a value with parameters, set the ``.value`` property to a tuple of ``ParameterizedPointValue``. -modulus.value = [8, 7.5] + +```python modulus.unit = "GPa" -modulus.parameters = [{"Basis": "Mean"}, {"Basis": "A-basis"}] +modulus.value = ( + mpy.ParameterizedPointValue( + value=8.0, + parameters=(mpy.PointParameterValue("Basis", "Mean"),) + ), + mpy.ParameterizedPointValue( + value=7.5, + parameters=(mpy.PointParameterValue("Basis", "A-basis"),) + ) +) ``` ### Range attributes -Access the `value` property directly and assign either a dictionary or tuple for high and low values. +Access the `value` property directly and assign a ``Range`` instance. Omitting either the 'low' or 'high' value creates an open-ended range. ```python -resin_content.value = {"low": 28, "high": 30} -resin_content.unit = 'wt%' - -fiber_volume.value = (None, 62.0) -fiber_volume.unit = "%" +resin_content.value = mpy.Range(low=28.0, high=30.0) +resin_content.unit = "wt%" ``` The high and low values can separately be flagged as either inclusive (≤ and ≥) or exclusive @@ -87,7 +96,12 @@ The high and low values can separately be flagged as either inclusive (≤ and ```python -fiber_volume.high_value_is_inclusive = False +fiber_volume.value = mpy.Range( + low=None, + high=62.0, + high_value_is_inclusive=False, +) +fiber_volume.unit = "%" print(fiber_volume.high_value_is_inclusive) ``` *Previous cell output:* @@ -115,8 +129,8 @@ print(f"Test temperature: {test_temperature.value} {test_temperature.unit}") modulus = record.attributes["0° tension modulus - measured"] print("0° tension modulus: ", end="") formatted_points = [ - f"{point} {modulus.unit} ({modulus.parameters[idx]['Basis']})" - for idx, point in enumerate(modulus.value) + f"{point.value} {modulus.unit} ({point.parameters_by_name['Basis']})" + for point in modulus.value ] print(", ".join(formatted_points)) ``` @@ -131,14 +145,14 @@ symbols. ```python def format_range(range_value): - low_value = range_value.value["low"] + low_value = range_value.value.low if low_value is not None: low_inequality = "≤" if range_value.low_value_is_inclusive else "<" else: low_inequality = "" low_range = f"{low_value} {low_inequality}" if low_value else "" - high_value = range_value.value["high"] + high_value = range_value.value.high if high_value is not None: high_inequality = "≤" if range_value.high_value_is_inclusive else "<" else: diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/07_Import_Functional_Data.md b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/07_Import_Functional_Data.md deleted file mode 100644 index 549a581291..0000000000 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/07_Import_Functional_Data.md +++ /dev/null @@ -1,258 +0,0 @@ -# Import Functional Data -Import CSV data into a functional attribute and update the parameters and header units. - -## Import required libraries -Connect to MI and specify a table. - - -```python -import csv -from datetime import datetime - -from GRANTA_MIScriptingToolkit import granta as mpy - -mi = mpy.connect("http://my.server.name/mi_servicelayer", autologon=True) -db = mi.get_db(db_key="MI_Training") - -tab = db.get_table("Design Data") -``` - -## Create a new record to store your data -Define names for a new record, and an attribute on that record. - - -```python -now = datetime.now().strftime("%c") -recordName = f"Scripting Toolkit Example 7:{now}" -funcAttributeName = "Tensile Stress/Strain, L" -``` - -Create the new **Record** object. - - -```python -rec = tab.create_record(recordName, subsets={"Design Data"}) -rec -``` - - - -*Previous cell output:* -```output - -``` - - -Get the unpopulated functional attribute for the new record, so we can populate it. - - -```python -func = rec.attributes[funcAttributeName] -func -``` - - - -*Previous cell output:* -```output - -``` - - -## Import test data -The tensile test data to import is stored in `example.csv`. -Read in each row of the CSV data, and add the data to the functional attribute point-by-point. - - -```python -with open("supporting_files/07_example_data_for_import.csv") as csvfile: - reader = csv.DictReader(csvfile, delimiter=",") - for row in reader: - point = { - "y": float(row["Tensile Stress [ksi]"]), - "Strain": float(row["Strain [%]"]), - "Temperature": float(row["Temperature [Celsius]"]), - "Stress/Strain Curve Type": str(row["Curve Type"]), - "Estimated?": bool(row["Estimated?"]) - } - func.add_point(point) -``` - -Access the `func.value` property to see the underlying data structure of the attribute represented as a list of lists. -`func.data` shows all parameters supported by the attribute. Parameters that were not populated during the import have -been set to **None**. - - -```python -func.value -``` - - - -*Previous cell output:* -```output -[['Y min (Tensile Stress/Strain, L [ksi])', - 'Y max (Tensile Stress/Strain, L [ksi])', - 'Strain [% strain]', - 'Temperature [°C]', - 'Time [hr]', - 'Other []', - 'Stress/Strain Curve Type []', - 'Estimated point?'], - [0.0, 0.0, 0.0, -73.0, None, None, 'Yield', True], - [396.0, 396.0, 0.209, -73.0, None, None, 'Yield', True], - [714.0, 714.0, 0.376, -73.0, None, None, 'Yield', True], - [1031.0, 1031.0, 0.544, -73.0, None, None, 'Yield', True], - [1269.0, 1269.0, 0.669, -73.0, None, None, 'Yield', True], - [1427.0, 1427.0, 0.753, -73.0, None, None, 'Yield', True], - [1507.0, 1507.0, 0.795, -73.0, None, None, 'Yield', True], - [1570.0, 1570.0, 0.83, -73.0, None, None, 'Yield', True], - [1633.0, 1633.0, 0.867, -73.0, None, None, 'Yield', True], - [1681.0, 1681.0, 0.897, -73.0, None, None, 'Yield', True], - [1721.0, 1721.0, 0.925, -73.0, None, None, 'Yield', True], - [1752.0, 1752.0, 0.952, -73.0, None, None, 'Yield', True], - [1784.0, 1784.0, 0.983, -73.0, None, None, 'Yield', True], - [1808.0, 1808.0, 1.012, -73.0, None, None, 'Yield', True], - [1824.0, 1824.0, 1.034, -73.0, None, None, 'Yield', True], - [1840.0, 1840.0, 1.059, -73.0, None, None, 'Yield', True], - [1855.0, 1855.0, 1.087, -73.0, None, None, 'Yield', True], - [1871.0, 1871.0, 1.121, -73.0, None, None, 'Yield', True], - [1887.0, 1887.0, 1.159, -73.0, None, None, 'Yield', True], - [1903.0, 1903.0, 1.204, -73.0, None, None, 'Yield', True], - [1919.0, 1919.0, 1.256, -73.0, None, None, 'Yield', True], - [1935.0, 1935.0, 1.318, -73.0, None, None, 'Yield', True], - [1951.0, 1951.0, 1.39, -73.0, None, None, 'Yield', True], - [1958.0, 1958.0, 1.432, -73.0, None, None, 'Yield', True], - [1966.0, 1966.0, 1.476, -73.0, None, None, 'Yield', True], - [0.0, 0.0, 0.0, 27.0, None, None, 'Yield', True], - [371.0, 371.0, 0.203, 27.0, None, None, 'Yield', True], - [667.0, 667.0, 0.365, 27.0, None, None, 'Yield', True], - [964.0, 964.0, 0.527, 27.0, None, None, 'Yield', True], - [1186.0, 1186.0, 0.649, 27.0, None, None, 'Yield', True], - [1334.0, 1334.0, 0.73, 27.0, None, None, 'Yield', True], - [1408.0, 1408.0, 0.771, 27.0, None, None, 'Yield', True], - [1468.0, 1468.0, 0.805, 27.0, None, None, 'Yield', True], - [1527.0, 1527.0, 0.839, 27.0, None, None, 'Yield', True], - [1571.0, 1571.0, 0.868, 27.0, None, None, 'Yield', True], - [1608.0, 1608.0, 0.895, 27.0, None, None, 'Yield', True], - [1638.0, 1638.0, 0.92, 27.0, None, None, 'Yield', True], - [1668.0, 1668.0, 0.95, 27.0, None, None, 'Yield', True], - [1690.0, 1690.0, 0.978, 27.0, None, None, 'Yield', True], - [1705.0, 1705.0, 0.999, 27.0, None, None, 'Yield', True], - [1720.0, 1720.0, 1.024, 27.0, None, None, 'Yield', True], - [1734.0, 1734.0, 1.053, 27.0, None, None, 'Yield', True], - [1749.0, 1749.0, 1.087, 27.0, None, None, 'Yield', True], - [1764.0, 1764.0, 1.126, 27.0, None, None, 'Yield', True], - [1779.0, 1779.0, 1.174, 27.0, None, None, 'Yield', True], - [1794.0, 1794.0, 1.23, 27.0, None, None, 'Yield', True], - [1808.0, 1808.0, 1.297, 27.0, None, None, 'Yield', True], - [1823.0, 1823.0, 1.378, 27.0, None, None, 'Yield', True], - [1831.0, 1831.0, 1.424, 27.0, None, None, 'Yield', True], - [1838.0, 1838.0, 1.475, 27.0, None, None, 'Yield', True], - [0.0, 0.0, 0.0, 149.0, None, None, 'Yield', True], - [328.0, 328.0, 0.187, 149.0, None, None, 'Yield', True], - [590.0, 590.0, 0.337, 149.0, None, None, 'Yield', True], - [852.0, 852.0, 0.486, 149.0, None, None, 'Yield', True], - [1048.0, 1048.0, 0.598, 149.0, None, None, 'Yield', True], - [1179.0, 1179.0, 0.673, 149.0, None, None, 'Yield', True], - [1245.0, 1245.0, 0.711, 149.0, None, None, 'Yield', True], - [1297.0, 1297.0, 0.741, 149.0, None, None, 'Yield', True], - [1349.0, 1349.0, 0.773, 149.0, None, None, 'Yield', True], - [1389.0, 1389.0, 0.798, 149.0, None, None, 'Yield', True], - [1421.0, 1421.0, 0.822, 149.0, None, None, 'Yield', True], - [1448.0, 1448.0, 0.845, 149.0, None, None, 'Yield', True], - [1474.0, 1474.0, 0.872, 149.0, None, None, 'Yield', True], - [1493.0, 1493.0, 0.898, 149.0, None, None, 'Yield', True], - [1507.0, 1507.0, 0.918, 149.0, None, None, 'Yield', True], - [1520.0, 1520.0, 0.943, 149.0, None, None, 'Yield', True], - [1533.0, 1533.0, 0.971, 149.0, None, None, 'Yield', True], - [1546.0, 1546.0, 1.006, 149.0, None, None, 'Yield', True], - [1559.0, 1559.0, 1.047, 149.0, None, None, 'Yield', True], - [1572.0, 1572.0, 1.098, 149.0, None, None, 'Yield', True], - [1585.0, 1585.0, 1.16, 149.0, None, None, 'Yield', True], - [1598.0, 1598.0, 1.236, 149.0, None, None, 'Yield', True], - [1611.0, 1611.0, 1.329, 149.0, None, None, 'Yield', True], - [1618.0, 1618.0, 1.384, 149.0, None, None, 'Yield', True], - [0.0, 0.0, 0.0, 316.0, None, None, 'Yield', True], - [307.0, 307.0, 0.182, 316.0, None, None, 'Yield', True], - [553.0, 553.0, 0.328, 316.0, None, None, 'Yield', True], - [799.0, 799.0, 0.473, 316.0, None, None, 'Yield', True], - [984.0, 984.0, 0.582, 316.0, None, None, 'Yield', True], - [1107.0, 1107.0, 0.655, 316.0, None, None, 'Yield', True], - [1168.0, 1168.0, 0.692, 316.0, None, None, 'Yield', True], - [1217.0, 1217.0, 0.722, 316.0, None, None, 'Yield', True], - [1266.0, 1266.0, 0.753, 316.0, None, None, 'Yield', True], - [1303.0, 1303.0, 0.78, 316.0, None, None, 'Yield', True], - [1334.0, 1334.0, 0.804, 316.0, None, None, 'Yield', True], - [1359.0, 1359.0, 0.828, 316.0, None, None, 'Yield', True], - [1383.0, 1383.0, 0.856, 316.0, None, None, 'Yield', True], - [1402.0, 1402.0, 0.882, 316.0, None, None, 'Yield', True], - [1414.0, 1414.0, 0.903, 316.0, None, None, 'Yield', True], - [1426.0, 1426.0, 0.927, 316.0, None, None, 'Yield', True], - [1439.0, 1439.0, 0.955, 316.0, None, None, 'Yield', True], - [1451.0, 1451.0, 0.988, 316.0, None, None, 'Yield', True], - [1463.0, 1463.0, 1.027, 316.0, None, None, 'Yield', True], - [1475.0, 1475.0, 1.073, 316.0, None, None, 'Yield', True], - [1488.0, 1488.0, 1.129, 316.0, None, None, 'Yield', True], - [1500.0, 1500.0, 1.195, 316.0, None, None, 'Yield', True], - [1512.0, 1512.0, 1.275, 316.0, None, None, 'Yield', True], - [1519.0, 1519.0, 1.321, 316.0, None, None, 'Yield', True], - [1525.0, 1525.0, 1.372, 316.0, None, None, 'Yield', True], - [0.0, 0.0, 0.0, 427.0, None, None, 'Yield', True], - [303.0, 303.0, 0.192, 427.0, None, None, 'Yield', True], - [545.0, 545.0, 0.345, 427.0, None, None, 'Yield', True], - [787.0, 787.0, 0.499, 427.0, None, None, 'Yield', True], - [969.0, 969.0, 0.617, 427.0, None, None, 'Yield', True], - [1090.0, 1090.0, 0.704, 427.0, None, None, 'Yield', True], - [1151.0, 1151.0, 0.753, 427.0, None, None, 'Yield', True], - [1199.0, 1199.0, 0.798, 427.0, None, None, 'Yield', True], - [1247.0, 1247.0, 0.85, 427.0, None, None, 'Yield', True], - [1284.0, 1284.0, 0.895, 427.0, None, None, 'Yield', True], - [1314.0, 1314.0, 0.938, 427.0, None, None, 'Yield', True], - [1338.0, 1338.0, 0.977, 427.0, None, None, 'Yield', True], - [1362.0, 1362.0, 1.02, 427.0, None, None, 'Yield', True], - [1381.0, 1381.0, 1.056, 427.0, None, None, 'Yield', True], - [1393.0, 1393.0, 1.082, 427.0, None, None, 'Yield', True], - [1405.0, 1405.0, 1.11, 427.0, None, None, 'Yield', True], - [1417.0, 1417.0, 1.139, 427.0, None, None, 'Yield', True], - [1429.0, 1429.0, 1.171, 427.0, None, None, 'Yield', True], - [1441.0, 1441.0, 1.204, 427.0, None, None, 'Yield', True], - [1453.0, 1453.0, 1.24, 427.0, None, None, 'Yield', True], - [1465.0, 1465.0, 1.278, 427.0, None, None, 'Yield', True], - [1478.0, 1478.0, 1.319, 427.0, None, None, 'Yield', True], - [1490.0, 1490.0, 1.363, 427.0, None, None, 'Yield', True], - [1496.0, 1496.0, 1.386, 427.0, None, None, 'Yield', True]] -``` - - -The example data uses Celsius for temperature, but the database default is Kelvin. -Change the parameter unit before import to take account of this. - - -```python -func.parameters["Temperature"].unit = "°C" -``` - -After changing the units, it is good practice to update the header units in `func.data` so that the units displayed in -MI applications are correct. - - -```python -func.update_header_units() -``` - -## Write your changes to MI - - -```python -rec.set_attributes([func]) -mi.update([rec]) -``` - - - -*Previous cell output:* -```output -[] -``` - diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/08_Create_Functional_Data.md b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/08_Create_Functional_Data.md deleted file mode 100644 index fad669bed2..0000000000 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/08_Create_Functional_Data.md +++ /dev/null @@ -1,426 +0,0 @@ -# Create Functional Data -Populate a functional attribute with data fitted using the Python `numpy` library. - -## Import libraries and define a polynomial fit function -This example populates a functional attribute for *Ultimate Tensile Strength vs Temperature* in one table from a -polynomial fit of the individual attributes in another table. - - -```python -from datetime import datetime -import numpy as np -from GRANTA_MIScriptingToolkit import granta as mpy - -def My4degPolyFitFunc(x, a, b, c, d, e): - return a*np.power(x, 4) + b*np.power(x, 3) + c*np.power(x, 2) + d*x + e -``` - -## Specify database and table -The source data will come from the *Tensile Statistical Data* table. - - -```python -mi = mpy.connect("http://my.server.name/mi_servicelayer", autologon=True) - -db = mi.get_db(db_key="MI_Training") -db.unit_system ="Metric" -db.absolute_temperatures = True - -table = db.get_table("Tensile Statistical Data") -``` - -## Export test data -Find *High Alloy Steel* > *AMS 6520* > *Plate* records in which both the *Ultimate Tensile Strength* and *Test -Temperature* attributes are populated. - - -```python -records = table.get_records_from_path( - starting_node=None, - tree_path=["High Alloy Steel", "AMS 6520", "Plate"], -) -``` - -Extract the attribute values from the returned records into x and y values. - - -```python -table.bulk_fetch(records, attributes=["Test Temperature", "Ultimate Tensile Strength"]) -populated_records = [ - r for r in records - if not r.attributes["Test Temperature"].is_empty() - and not r.attributes["Ultimate Tensile Strength"].is_empty() -] - -x_values = [r.attributes["Test Temperature"].value for r in populated_records] -y_values = [r.attributes["Ultimate Tensile Strength"].value for r in populated_records] -``` - -## Fit the test data -Fit a fourth-order polynomial to your x and y data. - - -```python -coeffs = np.polyfit(x_values, y_values, 4) -``` - -Generate x and y values for the fitted equation, using the function you defined at the start. - - -```python -x_fit = np.linspace(np.amin(x_values), np.amax(x_values), 20) -y_fit = My4degPolyFitFunc(x_fit, *coeffs) -``` - -## Create a record to store the data in -The resulting functional data will be written into the *Metals* subset of the *Design Data* table, -using the same unit system. - - -```python -design_data = db.get_table("Design Data") -design_data.subsets.clear() -design_data.subsets.add("Metals") -``` - -Create a new record to store your functional data. - - -```python -now = datetime.now().strftime("%c") -record_name = f"Scripting Toolkit Example 8:{now}" -record = design_data.create_record(record_name) -record.color = mpy.RecordColor.Green -``` - -Access the (empty) functional attribute, and view its column headers. - - -```python -func = record.attributes["Tens. Ult. Stress (L-dir) with Temp."] -func.column_headers -``` - - - -*Previous cell output:* -```output -['Y min (Tens. Ult. Stress (L-dir) with Temp. [MPa])', - 'Y max (Tens. Ult. Stress (L-dir) with Temp. [MPa])', - 'Temperature [K]', - 'Time [hr]', - 'Other []', - 'Data Type Lab []', - 'Estimated point?'] -``` - - -## Populate the functional attribute -Add the test data to the functional attribute point-by-point, then view the attribute data. Column headers can be -omitted if they aren't required to represent the data. - - -```python -for x, y in zip(x_values, y_values): - point = {"Temperature": x, "y": y, "Data Type Lab": "Test Data"} - func.add_point(point) -func.value -``` - - - -*Previous cell output:* -```output -[['Y min (Tens. Ult. Stress (L-dir) with Temp. [MPa])', - 'Y max (Tens. Ult. Stress (L-dir) with Temp. [MPa])', - 'Temperature [K]', - 'Time [hr]', - 'Other []', - 'Data Type Lab []', - 'Estimated point?'], - [1263.0048828125, - 1263.0048828125, - 810.9284057617188, - None, - None, - 'Test Data', - False], - [2399.146240234375, - 2399.146240234375, - 194.2612762451172, - None, - None, - 'Test Data', - False], - [2078.31, 2078.31, 422.0389938964844, None, None, 'Test Data', False], - [1848.140014648438, - 1848.140014648438, - 588.7060546875, - None, - None, - 'Test Data', - False], - [1734.37646484375, - 1734.37646484375, - 699.8172607421875, - None, - None, - 'Test Data', - False], - [2189.89, 2189.89, 294.2613938964844, None, None, 'Test Data', False]] -``` - - -Then add the fitted data to the functional attribute point-by-point, and view the attribute data with series number as -an extra column. - - -```python -for x, y in zip(x_fit, y_fit): - point = {"Temperature": x, "y": y, "Data Type Lab": "Fitted Data"} - func.add_point(point) -func.data_with_series_number -``` - - - -*Previous cell output:* -```output -[['Y min (Tens. Ult. Stress (L-dir) with Temp. [MPa])', - 'Y max (Tens. Ult. Stress (L-dir) with Temp. [MPa])', - 'Temperature [K]', - 'Time [hr]', - 'Other []', - 'Data Type Lab []', - 'Estimated point?', - 'Series number'], - [1263.0048828125, - 1263.0048828125, - 810.9284057617188, - None, - None, - 'Test Data', - False, - 1], - [2399.146240234375, - 2399.146240234375, - 194.2612762451172, - None, - None, - 'Test Data', - False, - 1], - [2078.31, 2078.31, 422.0389938964844, None, None, 'Test Data', False, 1], - [1848.140014648438, - 1848.140014648438, - 588.7060546875, - None, - None, - 'Test Data', - False, - 1], - [1734.37646484375, - 1734.37646484375, - 699.8172607421875, - None, - None, - 'Test Data', - False, - 1], - [2189.89, 2189.89, 294.2613938964844, None, None, 'Test Data', False, 1], - [np.float64(2392.1796767662518), - np.float64(2392.1796767662518), - np.float64(194.2612762451172), - None, - None, - 'Fitted Data', - False, - 2], - [np.float64(2333.081679240432), - np.float64(2333.081679240432), - np.float64(226.71744095651727), - None, - None, - 'Fitted Data', - False, - 2], - [np.float64(2274.74066356839), - np.float64(2274.74066356839), - np.float64(259.17360566791734), - None, - None, - 'Fitted Data', - False, - 2], - [np.float64(2219.0030335134543), - np.float64(2219.0030335134543), - np.float64(291.62977037931745), - None, - None, - 'Fitted Data', - False, - 2], - [np.float64(2167.2202125230733), - np.float64(2167.2202125230733), - np.float64(324.0859350907175), - None, - None, - 'Fitted Data', - False, - 2], - [np.float64(2120.248643728818), - np.float64(2120.248643728818), - np.float64(356.5420998021176), - None, - None, - 'Fitted Data', - False, - 2], - [np.float64(2078.4497899463804), - np.float64(2078.4497899463804), - np.float64(388.9982645135177), - None, - None, - 'Fitted Data', - False, - 2], - [np.float64(2041.6901336755727), - np.float64(2041.6901336755727), - np.float64(421.4544292249178), - None, - None, - 'Fitted Data', - False, - 2], - [np.float64(2009.3411771003305), - np.float64(2009.3411771003305), - np.float64(453.91059393631787), - None, - None, - 'Fitted Data', - False, - 2], - [np.float64(1980.2794420887074), - np.float64(1980.2794420887074), - np.float64(486.366758647718), - None, - None, - 'Fitted Data', - False, - 2], - [np.float64(1952.8864701928812), - np.float64(1952.8864701928812), - np.float64(518.822923359118), - None, - None, - 'Fitted Data', - False, - 2], - [np.float64(1925.0488226491502), - np.float64(1925.0488226491502), - np.float64(551.2790880705181), - None, - None, - 'Fitted Data', - False, - 2], - [np.float64(1894.1580803779325), - np.float64(1894.1580803779325), - np.float64(583.7352527819182), - None, - None, - 'Fitted Data', - False, - 2], - [np.float64(1857.1108439837685), - np.float64(1857.1108439837685), - np.float64(616.1914174933183), - None, - None, - 'Fitted Data', - False, - 2], - [np.float64(1810.3087337553218), - np.float64(1810.3087337553218), - np.float64(648.6475822047184), - None, - None, - 'Fitted Data', - False, - 2], - [np.float64(1749.6583896653735), - np.float64(1749.6583896653735), - np.float64(681.1037469161184), - None, - None, - 'Fitted Data', - False, - 2], - [np.float64(1670.571471370828), - np.float64(1670.571471370828), - np.float64(713.5599116275185), - None, - None, - 'Fitted Data', - False, - 2], - [np.float64(1567.9646582127116), - np.float64(1567.9646582127116), - np.float64(746.0160763389187), - None, - None, - 'Fitted Data', - False, - 2], - [np.float64(1436.2596492161715), - np.float64(1436.2596492161715), - np.float64(778.4722410503188), - None, - None, - 'Fitted Data', - False, - 2], - [np.float64(1269.3831630904717), - np.float64(1269.3831630904717), - np.float64(810.9284057617188), - None, - None, - 'Fitted Data', - False, - 2]] -``` - - -Adjust the series linestyles (`series_linestyles` is a dictionary, indexed with integers). - - -```python -func.series_linestyles[1] = "Markers" -func.series_linestyles[2] = "Lines" -func.series_linestyles -``` - - - -*Previous cell output:* -```output -{1: 'Markers', 2: 'Lines'} -``` - - -## Write your changes to MI -Set the attributes you've modified to update, and write the new record to the server. - - -```python -record.set_attributes([func]) -mi.update([record]) -``` - - - -*Previous cell output:* -```output -[] -``` - diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/13_Add_Date_Integer_and_Logical_Data.md b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/08_Edit_Date_Integer_and_Logical_Data.md similarity index 71% rename from 2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/13_Add_Date_Integer_and_Logical_Data.md rename to 2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/08_Edit_Date_Integer_and_Logical_Data.md index 123d340522..5f56c73ebd 100644 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/13_Add_Date_Integer_and_Logical_Data.md +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/08_Edit_Date_Integer_and_Logical_Data.md @@ -1,21 +1,21 @@ -# Add Date, Integer and Logical data -Work with date, integer, and logical attribute types. +# Date, Integer and Logical data +Work with date, integer, and logical data. ## Connect to MI Get a database and table. ```python -from datetime import datetime -from GRANTA_MIScriptingToolkit import granta as mpy +from datetime import date, datetime +import ansys.grantami.core as mpy -mi = mpy.connect("http://my.server.name/mi_servicelayer", autologon=True) +mi = mpy.SessionBuilder("http://my.server.name/mi_servicelayer").with_autologon() db = mi.get_db(db_key="MI_Training") db.unit_system = "Metric" db.absolute_temperatures = False -tab = db.get_table("AM Builds") +table = db.get_table("AM Builds") ``` ## Create a new record and path @@ -26,9 +26,9 @@ Create a new **Record** object at the end of the path. ```python now = datetime.now().strftime("%c") -record_name = f"Scripting Toolkit Example 13:{now}" -folder = tab.path_from(None, tree_path=["Blown Powder (Laser beam)", "Ti-6Al-4V"]) -record = tab.create_record(name=record_name, parent=folder) +record_name = f"Scripting Toolkit Example 8:{now}" +folder = table.path_from(None, tree_path=["Blown Powder (Laser beam)", "Ti-6Al-4V"]) +record = table.create_record(name=record_name, parent=folder) record, folder ``` @@ -36,7 +36,7 @@ record, folder *Previous cell output:* ```output -(, +(, ) ``` @@ -53,13 +53,12 @@ closed_chamber = record.attributes["Built in Closed Chamber?"] ``` ### Date attributes -Use the `value` property to set the date value of the attribute with either a **datetime** object or a properly -formatted string. +Use the `value` property to set the date value of the attribute with a **date** object. ```python -diagnostic_date.value = "2020-07-12" -build_date.value = datetime.now() +diagnostic_date.value = date(year=2020, month=7, day=12) +build_date.value = date.today() ``` ### Integer attributes @@ -97,19 +96,19 @@ datetime_format = "%b %d %Y" diagnostic_date = record.attributes["Date of Beam Profile Diagnostic"] print(f"Date of Beam Profile Diagnostic: {diagnostic_date.value.strftime(datetime_format)}") -build_date = record.attributes['Date of Build'] +build_date = record.attributes["Date of Build"] print(f"Date of Build: {build_date.value.strftime(datetime_format)}") -number_of_layers = record.attributes['Maximum Number of Layers'] +number_of_layers = record.attributes["Maximum Number of Layers"] print(f"Maximum Number of Layers: {number_of_layers.value}") -closed_chamber = record.attributes['Built in Closed Chamber?'] +closed_chamber = record.attributes["Built in Closed Chamber?"] print(f"Built in Closed Chamber?: {'Yes' if closed_chamber.value else 'No'}") ``` *Previous cell output:* ```output Date of Beam Profile Diagnostic: Jul 12 2020 -Date of Build: May 12 2025 +Date of Build: Jan 07 2026 Maximum Number of Layers: 5 Built in Closed Chamber?: Yes ``` \ No newline at end of file diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/11_Add_Files_Pictures_and_Hyperlinks.md b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/09_Edit_Files_Pictures_and_Hyperlinks.md similarity index 63% rename from 2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/11_Add_Files_Pictures_and_Hyperlinks.md rename to 2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/09_Edit_Files_Pictures_and_Hyperlinks.md index c3bd725f39..fc52cfcaca 100644 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/11_Add_Files_Pictures_and_Hyperlinks.md +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/09_Edit_Files_Pictures_and_Hyperlinks.md @@ -1,5 +1,5 @@ -# Add Files, Pictures, and Hyperlinks -Add File, Picture, and Hyperlink attribute types to MI. +# Files, Pictures, and Hyperlinks +Work with File, Picture, and Hyperlink data. ## Connect to MI Specify a database and table. @@ -8,14 +8,14 @@ Specify a database and table. ```python from datetime import datetime import pathlib -from GRANTA_MIScriptingToolkit import granta as mpy +import ansys.grantami.core as mpy -mi = mpy.connect("http://my.server.name/mi_servicelayer", autologon=True) +mi = mpy.SessionBuilder("http://my.server.name/mi_servicelayer").with_autologon() db = mi.get_db(db_key="MI_Training") -tab = db.get_table("Tensile Test Data") +table = db.get_table("Tensile Test Data") ``` -## Create a new record +## Create a new record Define a path in the table from a starting folder (in this case the top level folder) using `path_from()`. If the path does not exist, the required folders will be created. Create a new **Record** object at the end of the path. @@ -23,9 +23,9 @@ Create a new **Record** object at the end of the path. ```python now = datetime.now().strftime("%c") -record_name = f"Scripting Toolkit Example 11:{now}" -folder = tab.path_from(None, tree_path=["High Alloy Steels", "AMS 6520", "Plate", "300°F"]) -record = tab.create_record(name=record_name, parent=folder) +record_name = f"Scripting Toolkit Example 9:{now}" +folder = table.path_from(None, tree_path=["High Alloy Steels", "AMS 6520", "Plate", "300°F"]) +record = table.create_record(name=record_name, parent=folder) record, folder ``` @@ -33,7 +33,7 @@ record, folder *Previous cell output:* ```output -(, +(, ) ``` @@ -42,10 +42,10 @@ Access the empty **AttributeFile**, **AttributePicture**, and **AttributeHyperli ```python -new_file = record.attributes["Test File 1"] -new_pict = record.attributes["Image 2"] -test_method_link = record.attributes["Standard Tension Testing Method"] -test_method_link +file_attribute = record.attributes["Test File 1"] +picture_attribute = record.attributes["Image 2"] +hyperlink_attribute = record.attributes["Standard Tension Testing Method"] +hyperlink_attribute ``` @@ -65,20 +65,20 @@ bytes object. (Useful when you have a file already loaded in your script.) ```python file_object = mpy.File() -file_path = pathlib.Path("supporting_files/11_example_file_for_import.txt") +file_path = pathlib.Path("./supporting_files/09_example_file_for_import.txt") with open(file_path, "rb") as file_buffer: file_object.binary_data = file_buffer.read() file_object.file_name = file_path.name file_object.description = "This is an example file" -new_file.object = file_object -new_file +file_attribute.object = file_object +file_attribute ``` *Previous cell output:* ```output - + ``` @@ -87,9 +87,9 @@ a file saved to disk). ```python -picture = pathlib.Path("supporting_files/11_example_image_for_import.jpg") -new_pict.load(picture) -new_pict +picture = pathlib.Path("./supporting_files/09_example_image_for_import.jpg") +picture_attribute.load(picture) +picture_attribute ``` @@ -106,10 +106,10 @@ and/or `hyperlink_description` properties. ```python -test_method_link.value = "https://www.astm.org/Standards/E8" -test_method_link.hyperlink_display = "New" -test_method_link.hyperlink_description = "Specification" -test_method_link +hyperlink_attribute.value = "https://www.astm.org/Standards/E8" +hyperlink_attribute.hyperlink_display = "New" +hyperlink_attribute.hyperlink_description = "Specification" +hyperlink_attribute ``` @@ -126,7 +126,7 @@ picture data. ```python -record.set_attributes([new_file, new_pict, test_method_link]) +record.set_attributes([file_attribute, picture_attribute, hyperlink_attribute]) record = mi.update([record], include_binary_data_in_refresh=True)[0] ``` @@ -140,7 +140,7 @@ was run previously that saved a file to disk. ```python from pathlib import Path -output_folder = Path("./output") +output_folder = Path("output") output_folder.mkdir(exist_ok=True) ``` @@ -148,21 +148,21 @@ Next, save the picture to disk. ```python -new_pict = record.attributes["Image 2"] +picture_attribute = record.attributes["Image 2"] from IPython.display import Image -Image(new_pict.value) +Image(picture_attribute.value) ``` -![jpeg](11_Add_Files_Pictures_and_Hyperlinks_files/11_Add_Files_Pictures_and_Hyperlinks_20_0.jpg) +![jpeg](09_Edit_Files_Pictures_and_Hyperlinks_files/09_Edit_Files_Pictures_and_Hyperlinks_20_0.jpg) ```python -new_pict.save(path="output/11_exported_picture.jpg") +picture_attribute.save(path="./output/09_exported_picture.jpg") ``` diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/11_Add_Files_Pictures_and_Hyperlinks_files/11_Add_Files_Pictures_and_Hyperlinks_20_0.jpg b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/09_Edit_Files_Pictures_and_Hyperlinks_files/09_Edit_Files_Pictures_and_Hyperlinks_20_0.jpg similarity index 100% rename from 2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/11_Add_Files_Pictures_and_Hyperlinks_files/11_Add_Files_Pictures_and_Hyperlinks_20_0.jpg rename to 2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/09_Edit_Files_Pictures_and_Hyperlinks_files/09_Edit_Files_Pictures_and_Hyperlinks_20_0.jpg diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/09_Edit_Tabular_Data.md b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/09_Edit_Tabular_Data.md deleted file mode 100644 index 9165b1ec50..0000000000 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/09_Edit_Tabular_Data.md +++ /dev/null @@ -1,172 +0,0 @@ -# Edit Tabular Data -Edit and compare tabular data using the Python `numpy` library. - -In this example, there is some existing tensile data for a material (AMS 6520, Plate, 1000°F). -Some of that data is of particular interest and we want to separate it from the old data and -put it in a record of its own. - -## Connect to MI -Specify a database and table. - - -```python -from datetime import datetime -import numpy as np -from GRANTA_MIScriptingToolkit import granta as mpy - -mi = mpy.connect("http://my.server.name/mi_servicelayer", autologon=True) - -db = mi.get_db(db_key="MI_Training") -table = db.get_table("Tensile Statistical Data") -``` - -## Locate existing data -Find the record and attribute that contains the original data. - - -```python -record = table.search_for_records_by_name("AMS 6520, Plate, 1000°F")[0] -samples = record.attributes["Tensile test data used in this rollup"] -``` - -Select some samples of interest. - - -```python -focus_samples = ["MTS-615731", "MTS-615741", "MTS-615771"] -``` - -Get their **Record** objects from the tabular attribute containing the tensile test data. - - -```python -focus_recs = [samples.linked_records[s][0] for s in focus_samples] -``` - -Get their row indices in the tabular data structure. - - -```python -focus_rows = [samples["Linking Value (Specimen ID)"].index(samp) for samp in focus_samples] -``` - -## Extract and analyse the data -Extract the sample data, and establish how different these particular samples are from the remainder of the set. - - -```python -focus_youngs = [samples["Young's Modulus (11-axis)", i] for i in focus_rows] -rmain_youngs = [samples["Young's Modulus (11-axis)", i] for i in range(6) if i not in focus_rows] - -rmain_mean = np.mean(rmain_youngs) -focus_mean = np.mean(focus_youngs) -rmain_mean, focus_mean -``` - - - -*Previous cell output:* -```output -(np.float64(142.74677022298178), np.float64(146.3169097900391)) -``` - - - -```python -percentage_diff = 100*abs(rmain_mean-focus_mean)/(0.5*(rmain_mean+focus_mean)) -print(f"Percentage difference between the two means is: {percentage_diff} %") -``` -*Previous cell output:* -```output -Percentage difference between the two means is: 2.470140535743884 % -``` -## Create a new record and tabular attribute -Create a new record for your data of interest. - - -```python -now = datetime.now().strftime("%c") -recordName = f"Scripting Toolkit Example 9:{now}" -new_rec = table.create_record(recordName, parent=record.parent, subsets={"Statistical Test Data"}) -``` - -Select the tabular attribute to write to. - - -```python -new_samples = new_rec.attributes["Tensile test data used in this rollup"] -new_samples -``` - - - -*Previous cell output:* -```output - -``` - - -Link the samples to the new tabular datum. - - -```python -for focus_sample in focus_samples: - new_samples.add_row(linking_value=focus_sample) -new_samples -``` - - - -*Previous cell output:* -```output - -``` - - -Set the new tabular attribute to update, and write the new record to MI. - - -```python -new_rec.set_attributes([new_samples]) -new_rec = mi.update([new_rec])[0] -``` - -## Link to the original record -The original record is linked to the records you just linked to the tabular data. Link the new record to the original, -too. - -(Records must exist on the server to be linked together, which means the record must be pushed to the server before it -can be linked to other records.) - - -```python -new_rec.set_links("Tensile Test Data", set(focus_recs)) -new_rec.links -``` - - - -*Previous cell output:* -```output -{'Tensile Test Data': {, - , - }} -``` - - -## Update the new record's links on the server -Like changes to data, changes to links also need to be pushed to the server. Unlike attributes, links do not need to -be flagged for update (there is no equivalent to `set_attributes()` for links). - - -```python -mi.update_links([new_rec]) -``` - - - -*Previous cell output:* -```output -[] -``` - diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/10_Edit_Float_Functional_Data.md b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/10_Edit_Float_Functional_Data.md new file mode 100644 index 0000000000..0a4eb1a38c --- /dev/null +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/10_Edit_Float_Functional_Data.md @@ -0,0 +1,388 @@ +# Float Functional Data + +Work with float functional data, including modifying parameter configurations. + +This example first introduces the different representations of float functional data in Granta MI, and then shows how +to create and modify series float functional data, and then how to convert series float functional data into the +corresponding grid representation. + +## Connect to MI +Specify a database and table. + + +```python +import ansys.grantami.core as mpy + +mi = mpy.SessionBuilder("http://my.server.name/mi_servicelayer").with_autologon() +db = mi.get_db(db_key="MI_Training") + +table = db.get_table("Design Data") +``` + +## Create a new record +Define names for a new record, and an attribute on that record. + + +```python +from datetime import datetime + +now = datetime.now().strftime('%c') +record_name = f"Scripting Toolkit Example 10:{now}" +functional_attribute_name = "Tensile Stress/Strain, L" +``` + +Create the new **Record** object. + + +```python +record = table.create_record(record_name) +record +``` + + + +*Previous cell output:* +```output + +``` + + +Get the unpopulated functional attribute for the new record, so we can populate it. + + +```python +functional_attribute = record.attributes[functional_attribute_name] +functional_attribute +``` + + + +*Previous cell output:* +```output + +``` + + +## Types of functional data in Scripting Toolkit + +Granta MI represents float functional data as either series functional or grid functional. Additionally, the +schema defines a float functional attribute as containing either point or range data. As a result, there are +four possible representations of float functional data in Scripting Toolkit: + +* Point series functional data as an `AttributeFunctionalSeriesPoint` object +* Range series functional data as an `AttributeFunctionalSeriesRange` object +* Point grid functional data as an `AttributeFunctionalGridPoint` object +* Range grid functional data as an `AttributeFunctionalGridRange` object + +These objects do not need to be instantiated manually. When exporting existing data, the appropriate object is +chosen automatically based on the data. Empty functional attributes are set as series functional data by default, +and the definition of the attribute in the database schema defines whether the point or range variant is chosen. +Methods are provided to convert between series and grid representations of functional data. + +In this case, the "Tensile Stress/Strain, L" attribute is defined as a point attribute, and the `type()` +function shows that a `AttributeFunctionalSeriesPoint` object has been created accordingly. + + +```python +type(functional_attribute) +``` + + + +*Previous cell output:* +```output +ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalSeriesPoint +``` + + +All float functional attribute values have a defined x-axis parameter. Check the current x-axis parameter with the +`x_axis` property. + + +```python +functional_attribute.x_axis +``` + + + +*Previous cell output:* +```output +'Strain' +``` + + +If the x-axis needs to be changed, use the `.with_new_x_axis()` method, with the name of the parameter to be used as +the x-axis. + + +```python +stress_vs_temperature = functional_attribute.with_new_x_axis("Temperature") +stress_vs_temperature.x_axis +``` + + + +*Previous cell output:* +```output +'Temperature' +``` + + +## Create and import series functional data + +This section shows how to create and import series-based data. Since this is a point-based functional attribute, +create `SeriesPoint` objects to create single-valued series functional data. This example imports stress-strain data +as a function of temperature. + +A series functional attribute value is defined as a tuple of series objects. There are two series types available, +`SeriesPoint` and `SeriesRange`. Use the appropriate object depending on the attribute value object type. For +series data, each series must be created with two equal-length tuples of x values and y values. Each series may also +have a tuple of parameter values and a decoration type. + +In this example, create two `SeriesPoint` objects for our two series, each with an additional 'Temperature' value. +Assign both series to the functional attribute value. + + +```python +series_1 = mpy.SeriesPoint( + x=(0., 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2), + y=(0., 100., 200., 300., 400., 495., 585., 670., 750., 825., 895., 950., 1000.), + parameters=(mpy.SeriesParameterValue(name="Temperature", value=20.),), # Note: This is a 1-tuple + decoration=mpy.GraphDecoration.LINES, +) +series_2 = mpy.SeriesPoint( + x=(0., 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2), + y=(0., 75., 150., 225., 300., 370., 440., 500., 560., 620., 670., 710., 750.), + parameters=(mpy.SeriesParameterValue(name="Temperature", value=200.),), # Note: This is a 1-tuple + decoration=mpy.GraphDecoration.LINES, +) + +functional_attribute.value = (series_1, series_2) +``` + +The y-axis unit is set with the `.unit` property + + +```python +functional_attribute.unit = "ksi" +``` + +Parameter units are set by modifying values returned by the `.parameters` property. + + +```python +functional_attribute.parameters["Temperature"].unit = "°C" +``` + +Additional parameter properties can also be modified. These do not affect the behavior of Scripting Toolkit +operations, but may modify the behavior of other tools that interact with the data, for example MI Explore and MI +Viewer. + + +```python +functional_attribute.parameters["Strain"].interpolation_type = "Cubic Spline" +functional_attribute.parameters["Temperature"].interpolation_type = "None" +``` + +Access the `functional_attribute.table_view.table_view` property to see the underlying data structure of the attribute +represented as a list of lists. It shows all parameters supported by the attribute. Parameters that were not +populated during the import have been set to **None**. + + +```python +functional_attribute.table_view.table_view +``` + + + +*Previous cell output:* +```output +[['Y min (Tensile Stress/Strain, L [ksi])', + 'Y max (Tensile Stress/Strain, L [ksi])', + 'Strain [% strain]', + 'Temperature [°C]', + 'Time [hr]', + 'Other [None]', + 'Stress/Strain Curve Type [None]', + 'Estimated point?'], + [0.0, 0.0, 0.0, 20.0, None, None, None, False], + [100.0, 100.0, 0.1, 20.0, None, None, None, False], + [200.0, 200.0, 0.2, 20.0, None, None, None, False], + [300.0, 300.0, 0.3, 20.0, None, None, None, False], + [400.0, 400.0, 0.4, 20.0, None, None, None, False], + [495.0, 495.0, 0.5, 20.0, None, None, None, False], + [585.0, 585.0, 0.6, 20.0, None, None, None, False], + [670.0, 670.0, 0.7, 20.0, None, None, None, False], + [750.0, 750.0, 0.8, 20.0, None, None, None, False], + [825.0, 825.0, 0.9, 20.0, None, None, None, False], + [895.0, 895.0, 1.0, 20.0, None, None, None, False], + [950.0, 950.0, 1.1, 20.0, None, None, None, False], + [1000.0, 1000.0, 1.2, 20.0, None, None, None, False], + [0.0, 0.0, 0.0, 200.0, None, None, None, False], + [75.0, 75.0, 0.1, 200.0, None, None, None, False], + [150.0, 150.0, 0.2, 200.0, None, None, None, False], + [225.0, 225.0, 0.3, 200.0, None, None, None, False], + [300.0, 300.0, 0.4, 200.0, None, None, None, False], + [370.0, 370.0, 0.5, 200.0, None, None, None, False], + [440.0, 440.0, 0.6, 200.0, None, None, None, False], + [500.0, 500.0, 0.7, 200.0, None, None, None, False], + [560.0, 560.0, 0.8, 200.0, None, None, None, False], + [620.0, 620.0, 0.9, 200.0, None, None, None, False], + [670.0, 670.0, 1.0, 200.0, None, None, None, False], + [710.0, 710.0, 1.1, 200.0, None, None, None, False], + [750.0, 750.0, 1.2, 200.0, None, None, None, False]] +``` + + +Use the `mi.update()` method to import the data into Granta MI. + + +```python +record.set_attributes([functional_attribute]) +record = mi.update([record])[0] +functional_attribute = record.attributes[functional_attribute_name] +``` + +## Editing float functional data + +This section shows how to modify series functional data. + +`SeriesPoint` objects are immutable, so they cannot be modified. However, existing values can be used when creating a +new series. The cell below adds two additional points to the `series_2` value. + + +```python +from math import isclose + +series_200_deg = next( + series for series in functional_attribute.value + if isclose(series.parameters_by_name["Temperature"], 200) +) + +series_2_extra_points = mpy.SeriesPoint( + x=series_200_deg.x + (1.3, 1.4), + y=series_200_deg.y + (770., 785.), + parameters=series_200_deg.parameters, + decoration=series_200_deg.decoration, +) +``` + +The `functional_attribute.value` attribute is a tuple, so it is also immutable. To update the series objects +assigned to the value, all series objects must be provided. The cell below defines an entirely new series, and then +adds the original first series, the modified second series, and the new third series to the attribute value. + +Using immutable values in this way provides greater validation, ensuring that any errors in the data are raised as +exceptions as soon as they are associated with the attribute value. + + +```python +series_3 = mpy.SeriesPoint( + x=(0., 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2), + y=(0., 50., 100., 150., 200., 250., 290., 335., 375., 410., 450., 475., 500.), + parameters=(mpy.SeriesParameterValue(name="Temperature", value=400.),), # Note: This is a 1-tuple + decoration=mpy.GraphDecoration.LINES, +) + +functional_attribute.value = (series_1, series_2_extra_points, series_3) +``` + +Use the `mi.update()` method to import the data into Granta MI. + + +```python +record.set_attributes([functional_attribute]) +record = mi.update([record])[0] +functional_attribute = record.attributes[functional_attribute_name] +``` + +## Convert series data to grid data + +The final section shows how to convert between series and grid representations of float functional data. + +Use the `generate_grid_version()` method to convert the series functional attribute value to the equivalent grid +functional attribute value object. In this case, our `AttributeFunctionalSeriesPoint` attribute value is converted +to an `AttributeFunctionalGridPoint` object. This method raises a `ValueError` if the series functional data cannot +be represented as grid functional data. + + +```python +grid_functional_attribute = functional_attribute.generate_grid_version() +type(grid_functional_attribute) +``` + + + +*Previous cell output:* +```output +ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalGridPoint +``` + + +The collection of `SeriesPoint` objects has been converted to a single `GridPoint` object. This contains the same +information, but note that the temperature values have been expanded to fully populate the grid. + + +```python +grid_value = grid_functional_attribute.value +print(f"x values: {grid_value.x[:20]}...") +print(f"y values: {grid_value.y[:20]}...") +print(f"Temperature values: {grid_value.parameters_by_name['Temperature'][:20]}...") +``` +*Previous cell output:* +```output +x values: (0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6)... +y values: (0.0, 100.0, 200.0, 300.0, 400.0, 495.0, 585.0, 670.0, 750.0, 825.0, 895.0, 950.0, 1000.0, 0.0, 75.0, 150.0, 225.0, 300.0, 370.0, 440.0)... +Temperature values: (20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0)... +``` +The units and parameter configuration options are preserved by the transformation from series to grid representation. + + +```python +print(f"y unit: {grid_functional_attribute.unit}") + +print(f"Temperature unit: {grid_functional_attribute.parameters['Temperature'].unit}") + +print(f"Strain interpolation type: {grid_functional_attribute.parameters['Strain'].interpolation_type}") +print(f"Temperature interpolation type: {grid_functional_attribute.parameters['Temperature'].interpolation_type}") +``` +*Previous cell output:* +```output +y unit: ksi +Temperature unit: °C +Strain interpolation type: Cubic Spline +Temperature interpolation type: None +``` +Import the modified attribute. + + +```python +record.set_attributes([grid_functional_attribute]) +record.flag_for_release = False +record = mi.update([record])[0] +record +``` + + + +*Previous cell output:* +```output + +``` + + +Since the attribute now contains grid functional data, the data is exported into a `AttributeFunctionalGridPoint` +object. + + +```python +grid_functional_attribute = record.attributes[functional_attribute_name] +type(grid_functional_attribute) +``` + + + +*Previous cell output:* +```output +ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalGridPoint +``` + diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/11_Edit_Local_Tabular_Data.md b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/11_Edit_Local_Tabular_Data.md new file mode 100644 index 0000000000..08e931e708 --- /dev/null +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/11_Edit_Local_Tabular_Data.md @@ -0,0 +1,589 @@ +# Local Tabular Data + +Work with local tabular data, including how to add and delete local rows. + +In general, tabular attributes contain a combination of local and linked tabular columns. This example focuses on +local tabular columns only. [Example 12](./12_Edit_Linked_Tabular_Data.ipynb) shows how to work with linked tabular +data. + +## Create a new record +Connect to MI and specify a database and table. + + +```python +from datetime import datetime, date +from pathlib import Path + +import ansys.grantami.core as mpy + +mi = mpy.SessionBuilder("http://my.server.name/mi_servicelayer").with_autologon() +db = mi.get_db(db_key="MI_Training") +table = db.get_table("Training Exercise for Import") +``` + +Create a new record. + + +```python +now = datetime.now().strftime("%c") +recordName = f"Scripting Toolkit Example 11:{now}" +record = table.create_record(recordName) +record +``` + + + +*Previous cell output:* +```output + +``` + + +## Access a local tabular attribute + +Access the (empty) tabular attribute *Characterization of this material*. + + +```python +tabular_attribute = record.attributes["Characterization of this material"] +tabular_attribute +``` + + + +*Previous cell output:* +```output + +``` + + +The tabular attribute `__repr__` shows that the tabular attribute is not loaded yet, and so additional information +about the number of rows and columns is not available. + +Tabular data is loaded on-demand to improve performance, and reading or modifying the data will load the data +automatically. However, accessing the `__repr__` does not trigger the load operation. To load the data manually, use +the `.load()` method. + +Once the attribute is loaded, the `__repr__` shows the number of rows and columns. + + +```python +tabular_attribute.load() +tabular_attribute +``` + + + +*Previous cell output:* +```output + +``` + + +The `.column_name`, `.column_types`, and `.linked_columns` properties list the tabular column names, types, and +whether the column is linked. Each of these properties contain 11 entries, which corresponds to the number of columns +in the tabular attribute, and the size printed in the tabular attribute `__repr__`. + + +```python +for column_name, column_type, is_linked in zip( + tabular_attribute.columns, tabular_attribute.column_types, tabular_attribute.linked_columns +): + print(f"{column_name}: {column_type} ({'Linked' if is_linked else 'Local'})") +``` +*Previous cell output:* +```output +Order: INPT (Local) +Date: DTTM (Local) +Technique: DISC (Local) +Technique (other): STXT (Local) +Non-destructive?: LOGI (Local) +Image: PICT (Local) +Raw data: FILE (Local) +Data on server: HLNK (Local) +Temperature: POIN (Local) +Notes: LTXT (Local) +Grain size: RNGE (Local) +``` +The `.value` property contains an immutable representation of the current state of the tabular attribute +value. Since the tabular attribute is empty, this returns an empty tuple. + + +```python +tabular_attribute.value +``` + + + +*Previous cell output:* +```output +() +``` + + +The `.linking_table` and `.linking_attribute` properties contain the target table and target attribute. This is a +local tabular attribute, so these properties both return `None`. + + +```python +print(f"Target table: {tabular_attribute.linking_table}") +print(f"Target attribute: {tabular_attribute.linking_attribute}") +``` +*Previous cell output:* +```output +Target table: None +Target attribute: None +``` +## Add rows and data + +Add a new row to the tabular attribute. + + +```python +tabular_attribute.append_row() +tabular_attribute.rows +``` + + + +*Previous cell output:* +```output +(,) +``` + + +An empty `TabularRow` object is created, which contains a blank cell for each local tabular column, stored in a tuple. +The type of the cell object depends on the type of the column. + +Access the tuple of cell objects via the `.cells` property. + + +```python +row = tabular_attribute.rows[0] +row.cells +``` + + + +*Previous cell output:* +```output +(LocalIntegerValue(value=None), + LocalDateValue(value=None), + LocalDiscreteValue(value=None, order=None), + LocalShortTextValue(value=None), + LocalLogicalValue(value=None), + LocalPictureValue(), + LocalFileValue(), + LocalHyperlinkValue(value=None, hyperlink_display=None, hyperlink_description=None), + LocalPointValue(value=None, unit="K"), + LocalLongTextValue(value=None), + LocalRangeValue(low=None, high=None, low_value_is_inclusive=True, high_value_is_inclusive=True, unit="µm")) +``` + + +Often it is more convenient to access cells by their column name. The `.cells_by_column` property returns a mapping of +column name to cell object. + + +```python +row.cells_by_column +``` + + + +*Previous cell output:* +```output +mappingproxy({'Order': LocalIntegerValue(value=None), + 'Date': LocalDateValue(value=None), + 'Technique': LocalDiscreteValue(value=None, order=None), + 'Technique (other)': LocalShortTextValue(value=None), + 'Non-destructive?': LocalLogicalValue(value=None), + 'Image': LocalPictureValue(), + 'Raw data': LocalFileValue(), + 'Data on server': LocalHyperlinkValue(value=None, hyperlink_display=None, hyperlink_description=None), + 'Temperature': LocalPointValue(value=None, unit="K"), + 'Notes': LocalLongTextValue(value=None), + 'Grain size': LocalRangeValue(low=None, high=None, low_value_is_inclusive=True, high_value_is_inclusive=True, unit="µm")}) +``` + + +Tabular cell classes have similar interfaces to their attribute value counterparts. For example, all tabular cell +classes have a `.value` property, and picture and file tabular cell classes have a `.load()` method. + +The name of each cell type has a 'Local' prefix, which indicates that these are local columns and can be modified. + +Each tabular cell class also has a linked counterpart without the 'Local' prefix. These are shown in the linked +tabular data example referenced in the introduction. These linked tabular cell classes are read-only and cannot be +modified. + +### Text cells + +Long text cells can accept any string value. Short text cells can accept any string value less than 255 characters. + +Assign the string to the `.value` property. + + +```python +row.cells_by_column["Notes"].value = "Scripting Toolkit example #11 - This example shows how to import tabular data" +row.cells_by_column["Technique (other)"].value = "Example" +``` + +### Integer cells + +Integer cells can accept any integer value. Assign the integer to the `.value` property. + + +```python +row.cells_by_column["Order"].value = 1 +``` + +### Date cells + +Date cells accept a `datetime.date` object. Assign the date to the `.value` property. + + +```python +row.cells_by_column["Date"].value = date(2025, 10, 23) +``` + +### Logical cells + +Logical cells accept either `True` or `False`. Assign the boolean to the `.value` property. + + +```python +row.cells_by_column["Non-destructive?"].value = True +``` + +### Discrete cells + +Discrete cells accept a limited set of allowed strings. To see which values are allowed, use the +`.possible_discrete_values` property. + + +```python +row.cells_by_column["Technique"].possible_discrete_values +``` + + + +*Previous cell output:* +```output +frozenset({'Electron microscopy', 'Light microscopy', 'Other'}) +``` + + +Use one of these for new value: + + +```python +row.cells_by_column["Technique"].value = "Other" +``` + +### Point cells + +Point cells accept a float value and a unit. + +In contrast to point attributes, point cells are always single-valued and may not contain parameter information. + + +```python +cell = row.cells_by_column["Temperature"] + +cell.value = 250.0 +cell.unit = "°C" +``` + +### Range cells + +Range cells are similar to point cells, except they accept high and low float values and a unit. + +Each high and low bound may be marked as inclusive or exclusive, using the `.low_value_is_inclusive` and +`.high_value_is_inclusive` property. + +Range cell classes differ from range attribute classes in that they do not contain a `.value` property. Cell values +are set using the `.low` and `.high` properties directly. + + +```python +cell = row.cells_by_column["Grain size"] + +cell.low = 1. +cell.high = 2. +cell.unit = "mil" +cell.high_value_is_inclusive = False +``` + +### Picture cells + +Picture cells can be populated either by setting `.value` to a `bytes` object, or using the `.load()` method. + + +```python +image_path = Path("./supporting_files/09_example_image_for_import.jpg") + +row.cells_by_column["Image"].load(image_path) +``` + +### File cells + +File cells are similar to picture cells, and can also be populated either by setting `.value` to a `bytes` object, or +using the `.load()` method. However, file cells also have a settable `.file_name` and `.description` field. + + +```python +file_path = Path("./supporting_files/09_example_file_for_import.txt") + +cell = row.cells_by_column["Raw data"] +cell.load(file_path) +cell.file_name = "Raw data file.txt" +cell.description = "Plain text file containing raw data" +``` + +### Hyperlink cells + +Hyperlink cells accept a `.value` property which contains the link url, along with `.hyperlink_display` and +`.hyperlink_description` properties which control how the hyperlink is displayed in MI Viewer. + + +```python +cell = row.cells_by_column["Data on server"] + +cell.value = "http://example.org/test_data_12345" +cell.hyperlink_display = "New" +cell.hyperlink_description = "Test data #12345" +``` + +Print the cells again to show the added values. + + +```python +row.cells_by_column +``` + + + +*Previous cell output:* +```output +mappingproxy({'Order': LocalIntegerValue(value=1), + 'Date': LocalDateValue(value="2025-10-23"), + 'Technique': LocalDiscreteValue(value="Other", order=2), + 'Technique (other)': LocalShortTextValue(value="Example"), + 'Non-destructive?': LocalLogicalValue(value=True), + 'Image': LocalPictureValue(binary_data=<224.69 KB>, mime_file_type="image/jpeg"), + 'Raw data': LocalFileValue(binary_data=<23 B>, mime_file_type=None, file_name="Raw data file.txt", description="Plain text file containing raw data"), + 'Data on server': LocalHyperlinkValue(value="http://example.org/test_dat...", hyperlink_display="New", hyperlink_description="Test data #12345"), + 'Temperature': LocalPointValue(value=250.0, unit="°C"), + 'Notes': LocalLongTextValue(value="Scripting Toolkit example #..."), + 'Grain size': LocalRangeValue(low=1, high=2, low_value_is_inclusive=True, high_value_is_inclusive=False, unit="mil")}) +``` + + +The data is also visible in the `AttributeTabular.value` property. + +This property is useful as a high-level summary of the data, but should not be used for processing. The `.rows` +property provides a richer representation of the data. + + +```python +tabular_attribute.value +``` + + + +*Previous cell output:* +```output +((1, + datetime.datetime(2025, 10, 23, 0, 0), + ('Other',), + 'Example', + True, + PictureValue(binary_data=<224.69 KB>, mime_file_type="image/jpeg"), + FileValue(binary_data=<23 B>, mime_file_type=None, file_name="Raw data file.txt", description="Plain text file containing raw data"), + HyperlinkValue(value="http://example.org/test_dat...", hyperlink_display="New", hyperlink_description="Test data #12345"), + (250.0,), + 'Scripting Toolkit example #11 - This example shows how to import tabular data', + mappingproxy({'low': 1.0, + 'high': 2.0, + 'low_is_inclusive': True, + 'high_is_inclusive': False}), + ''),) +``` + + +### Write changes to Granta MI + +Finally, write the changes to the server. + + +```python +record.set_attributes([tabular_attribute]) +record = mi.update([record])[0] +``` + +Check the content of the tabular attribute after the update. + + +```python +tabular_attribute = record.attributes["Characterization of this material"] +tabular_attribute.rows +``` + + + +*Previous cell output:* +```output +(,) +``` + + +## Edit tabular data + +Most modifications to tabular data can be made as updates to the data already in the database. For example, adding a +new row only requires the new row to be uploaded to the database, any existing data is not re-transmitted. + +The next cell adds two new rows, and adds data to a subset of cells in each. + + +```python +tabular_attribute.append_row() +tabular_attribute.append_row() + +new_row = tabular_attribute.rows[1] +new_row.cells_by_column["Order"].value = 2 +new_row.cells_by_column["Date"].value = date(2025, 10, 29) +new_row.cells_by_column["Notes"].value = "A new row can be appended to an existing tabular attribute" + +new_row = tabular_attribute.rows[2] +new_row.cells_by_column["Order"].value = 3 +new_row.cells_by_column["Date"].value = date(2025, 10, 30) +new_row.cells_by_column["Notes"].value = "Multiple rows can be added in the same operation" + +record.set_attributes([tabular_attribute]) +record = mi.update([record])[0] +``` + +Check the content of the tabular attribute after the update. + + +```python +tabular_attribute = record.attributes["Characterization of this material"] +tabular_attribute.rows +``` + + + +*Previous cell output:* +```output +(, + , + ) +``` + + +Rows can be deleted and modified in the same operation + + +```python +tabular_attribute.delete_row(1) +tabular_attribute.rows[1].cells_by_column["Order"].value = 2 +tabular_attribute.rows[1].cells_by_column["Notes"].value = "Rows can be deleted and modified in the same operation" + +record.set_attributes([tabular_attribute]) +record = mi.update([record])[0] + +tabular_attribute = record.attributes["Characterization of this material"] +tabular_attribute.rows +``` + + + +*Previous cell output:* +```output +(, + ) +``` + + +## Destructive operations + +Destructive operations cannot be completed by modifying data in-place, and can only be completed by overwriting all +values. + +
+ +**Warning:** + +Destructive editing should be avoided because: + +* This can be slow for attributes with File or Picture attributes, especially if many rows are present. +* Users of Data Updater will face conflicts when applying subsequent updates. +
+ +Modifying the order of rows in a tabular attribute is a destructive operation, and by default raises a `ValueError`. + + +```python +try: + tabular_attribute.swap_rows(0, 1) +except ValueError as e: + print("The previous operation caused an exception") + print(e) +``` +*Previous cell output:* +```output +The previous operation caused an exception +This action is considered destructive and is not allowed by default. Call the method 'enable_destructive_editing()' to allow it. +``` +To check whether destructive editing is allowed, use the property `.is_destructive_editing_allowed`: + + +```python +print(f"Is destructive editing allowed? {tabular_attribute.is_destructive_editing_allowed}") +``` +*Previous cell output:* +```output +Is destructive editing allowed? False +``` +To allow destructive editing, call the method `.enable_destructive_editing()`. Re-export the tabular attribute with +binary data enabled to avoid an exception when calling `mi.update()`. + + +```python +record.refresh_attributes() + +tabular_attribute = record.attributes["Characterization of this material"] + +tabular_attribute.enable_destructive_editing() +print(f"Is destructive editing allowed? {tabular_attribute.is_destructive_editing_allowed}") +``` +*Previous cell output:* +```output +Is destructive editing allowed? True +``` +Swapping rows will now not raise an exception. + + +```python +tabular_attribute.swap_rows(0, 1) +``` + +Update the record in Granta MI. Note that this will re-import all data in the tabular attribute. + + +```python +record.set_attributes([tabular_attribute]) +record = mi.update([record])[0] + +tabular_attribute = record.attributes["Characterization of this material"] +tabular_attribute.rows +``` + + + +*Previous cell output:* +```output +(, + ) +``` + diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/12_Edit_Linked_Tabular_Data.md b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/12_Edit_Linked_Tabular_Data.md new file mode 100644 index 0000000000..a388eb979b --- /dev/null +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/12_Edit_Linked_Tabular_Data.md @@ -0,0 +1,533 @@ +# Linked Tabular Data + +Work with linked tabular data, including how to access linked data within linked rows. + +In general, tabular attributes contain a combination of local and linked tabular columns. This example focuses on +linked tabular rows and columns only. [Example 11](./11_Edit_Local_Tabular_Data.ipynb) shows how to work with local +tabular data. + +## Access an existing record +Connect to MI and specify a database and table. + + +```python +from datetime import datetime, date +from pathlib import Path + +import ansys.grantami.core as mpy + +mi = mpy.SessionBuilder("http://my.server.name/mi_servicelayer").with_autologon() +db = mi.get_db(db_key="MI_Training") +table = db.get_table("Tensile Statistical Data") +``` + +Access an existing record by path. + + +```python +records = table.get_records_from_path( + starting_node=None, + tree_path=["Additive Manufacturing", "Titanium", "Ti-6Al-4V"], +) +record = next(r for r in records if r.name == "L13L12 - 9 Samples") +record +``` + + + +*Previous cell output:* +```output + +``` + + +## Access a linked tabular attribute + +Access the tabular attribute *Tensile test data used in this rollup*. + + +```python +tabular_attribute = record.attributes["Tensile test data used in this rollup"] +tabular_attribute +``` + + + +*Previous cell output:* +```output + +``` + + +The tabular attribute `__repr__` shows that the tabular attribute is not loaded yet, and so additional information +about the number of rows and columns is not available. + +Tabular data is loaded on-demand to improve performance, and reading or modifying the data will load the data +automatically. However, accessing the `__repr__` does not trigger the load operation. To load the data manually, use +the `.load()` method. + +Once the attribute is loaded, the `__repr__` shows the number of rows and columns. + + +```python +tabular_attribute.load() +tabular_attribute +``` + + + +*Previous cell output:* +```output + +``` + + +The `.column_name`, `.column_types`, and `.linked_columns` properties list the tabular column names, types, and +whether the column is linked. Each of these properties contain 8 entries, which corresponds to the number of columns +in the tabular attribute, and the size printed in the tabular attribute `__repr__`. + + +```python +for column_name, column_type, is_linked in zip( + tabular_attribute.columns, tabular_attribute.column_types, tabular_attribute.linked_columns +): + print(f"{column_name}: {column_type} ({'Linked' if is_linked else 'Local'})") +``` +*Previous cell output:* +```output +Specimen ID: STXT (Linked) +Date Test Performed: DTTM (Linked) +Strain rate is equivalent: LOGI (Linked) +Control mode: DISC (Linked) +Test Temperature: POIN (Linked) +Young's Modulus (11-axis): POIN (Linked) +0.02% Offset yield stress: POIN (Linked) +0.2% Offset yield stress: POIN (Linked) +``` +The `.value` property contains an immutable representation of the current state of the tabular attribute +value. + +This property is useful as a high-level summary of the data, but should not be used for processing. The `.rows` +property described in the next section provides a richer representation of the data. + + +```python +tabular_attribute.value +``` + + + +*Previous cell output:* +```output +((('L13L12AA1T',), (), (), (), (), (), (), ((126.73,),), 'L13L12AA1T'), + (('L13L12AA3T',), + (), + (), + (), + (), + (), + (), + ((126.06499999999998,),), + 'L13L12AA3T'), + (('L13L12AA5T',), (), (), (), (), (), (), ((129.39,),), 'L13L12AA5T'), + (('L13L12AA7T',), (), (), (), (), (), (), ((132.43,),), 'L13L12AA7T'), + (('L13L12AA9T',), (), (), (), (), (), (), ((133.0,),), 'L13L12AA9T'), + (('L13L12AA11T',), (), (), (), (), (), (), ((127.3,),), 'L13L12AA11T'), + (('L13L12AA13T',), (), (), (), (), (), (), ((121.125,),), 'L13L12AA13T'), + (('L13L12AA15T',), (), (), (), (), (), (), ((121.315,),), 'L13L12AA15T'), + (('L13L12AA17T',), (), (), (), (), (), (), ((121.885,),), 'L13L12AA17T')) +``` + + +The `.linking_table` and `.linking_attribute` properties contain the target table and target attribute. This is a +linked tabular attribute, so these properties return `Table` and `AttributeValue` objects respectively. + + +```python +print(f"Target table: {tabular_attribute.linking_table}") +print(f"Target attribute: {tabular_attribute.linking_attribute}") +``` +*Previous cell output:* +```output +Target table: +Target attribute: +``` +### Tabular rows + +The `.rows` property lists all rows. There are 9 `TabularRow` objects shown, which corresponds with the size printed +by the tabular attribute `__repr__`. + + +```python +tabular_attribute.rows +``` + + + +*Previous cell output:* +```output +(, + , + , + , + , + , + , + , + ) +``` + + +Each individual tabular row `__repr__` contains the linking value and the row ID. + + +```python +for row in tabular_attribute.rows: + print(row.linking_value) +``` +*Previous cell output:* +```output +L13L12AA1T +L13L12AA3T +L13L12AA5T +L13L12AA7T +L13L12AA9T +L13L12AA11T +L13L12AA13T +L13L12AA15T +L13L12AA17T +``` +The linked records themselves are available by accessing the `AttributeTabular.linked_records` property. This returns +a dictionary mapping the linking value to the list of resolved records in the target table. Each row has a single +linking value, but in general a linking value may match zero or more records. In this example, each linking value +matches one record. + + +```python +tabular_attribute.linked_records +``` + + + +*Previous cell output:* +```output +{'L13L12AA1T': [], + 'L13L12AA3T': [], + 'L13L12AA5T': [], + 'L13L12AA7T': [], + 'L13L12AA9T': [], + 'L13L12AA11T': [], + 'L13L12AA13T': [], + 'L13L12AA15T': [], + 'L13L12AA17T': []} +``` + + +### Tabular cells + +The cells are available as a tuple of cell values via the `.cells` property, or by their column name via the +`.cells_by_column` property. + + +```python +row = tabular_attribute.rows[0] + +row.cells +``` + + + +*Previous cell output:* +```output +((ShortTextValue(value="L13L12AA1T"),), + (), + (), + (), + (), + (), + (), + (PointValue(value=126.73, unit="MPa"),)) +``` + + + +```python +row.cells_by_column +``` + + + +*Previous cell output:* +```output +mappingproxy({'Specimen ID': (ShortTextValue(value="L13L12AA1T"),), + 'Date Test Performed': (), + 'Strain rate is equivalent': (), + 'Control mode': (), + 'Test Temperature': (), + "Young's Modulus (11-axis)": (), + '0.02% Offset yield stress': (), + '0.2% Offset yield stress': (PointValue(value=126.73, unit="MPa"),)}) +``` + + +Each cell in a linked tabular column is represented as a tuple of value objects. This is because each tabular row may +link to zero or more records, and the target attribute may or may not be populated for each record. + +Tabular cell classes have similar interfaces to their attribute value counterparts. For example, all tabular cell +classes have a `.value` property, and picture and file tabular cell classes have a `.save()` method. + +Linked tabular cell value objects differ from their local tabular cell value equivalents in that they are read-only. +Local tabular cell values are shown in the local tabular data example referenced in the introduction. + +Short text cells have a `.value` property: + + +```python +row.cells_by_column["Specimen ID"][0].value +``` + + + +*Previous cell output:* +```output +'L13L12AA1T' +``` + + +Attempting to modify the value of a linked tabular cell value raises an `AttributeError`: + + +```python +try: + row.cells_by_column["Specimen ID"][0].value = "New specimen ID" +except AttributeError as e: + print(f'Raised AttributeError: "{e}"') +``` +*Previous cell output:* +```output +Raised AttributeError: "property 'value' of 'ShortTextValue' object has no setter" +``` +Point cells have a `.value` and a `.unit` property: + + +```python +point_cell = row.cells_by_column["0.2% Offset yield stress"] +point_value = point_cell[0] + +print(f"{point_value.value} {point_value.unit}") +``` +*Previous cell output:* +```output +126.73 MPa +``` +Empty linked cells are represented as an empty tuple. + + +```python +row.cells_by_column["Strain rate is equivalent"] +``` + + + +*Previous cell output:* +```output +() +``` + + +## Add a linked row + +The `.append_row()` method accepts an optional argument to specify a linking value. The cell below creates a row which +link to all records in the target table with the value `L14L12HIP1T` in the target attribute. + + +```python +tabular_attribute.append_row(linking_value="L14L12HIP1T") +``` + +The new row's `__repr__` shows the linking value. + + +```python +new_linked_row = tabular_attribute.rows[-1] +new_linked_row +``` + + + +*Previous cell output:* +```output + +``` + + +However, the row does not contain any linked data until the row is imported and the tabular attribute is refreshed. + + +```python +new_linked_row.cells_by_column +``` + + + +*Previous cell output:* +```output +mappingproxy({'Specimen ID': (), + 'Date Test Performed': (), + 'Strain rate is equivalent': (), + 'Control mode': (), + 'Test Temperature': (), + "Young's Modulus (11-axis)": (), + '0.02% Offset yield stress': (), + '0.2% Offset yield stress': ()}) +``` + + +Write the changes to the server. + + +```python +record.set_attributes([tabular_attribute]) +record = mi.update([record])[0] +``` + +Check the content of the tabular attribute after the update. The linked row now contains values in the populated +linked columns. + + +```python +tabular_attribute = record.attributes["Tensile test data used in this rollup"] +refreshed_linked_row = tabular_attribute.rows[-1] +refreshed_linked_row.cells_by_column +``` + + + +*Previous cell output:* +```output +mappingproxy({'Specimen ID': (ShortTextValue(value="L14L12HIP1T"),), + 'Date Test Performed': (), + 'Strain rate is equivalent': (), + 'Control mode': (), + 'Test Temperature': (), + "Young's Modulus (11-axis)": (), + '0.02% Offset yield stress': (), + '0.2% Offset yield stress': (PointValue(value=121.315, unit="MPa"),)}) +``` + + +## Add a local row + +The `.append_row()` `linking_value` argument is optional. The cell below creates a local row, which will not contain +any linked data. + + +```python +tabular_attribute.append_row() +``` + +The new row's `__repr__` shows the lack of linking value. + + +```python +new_local_row = tabular_attribute.rows[-1] +new_local_row +``` + + + +*Previous cell output:* +```output + +``` + + +Write the changes to the server. + + +```python +record.set_attributes([tabular_attribute]) +record = mi.update([record])[0] +``` + +Check the content of the tabular attribute after the update. This row is not linked and there are no local columns in +the tabular attribute, so all cells are empty. + + +```python +tabular_attribute = record.attributes["Tensile test data used in this rollup"] +refreshed_local_row = tabular_attribute.rows[-1] +refreshed_local_row.cells_by_column +``` + + + +*Previous cell output:* +```output +mappingproxy({'Specimen ID': (), + 'Date Test Performed': (), + 'Strain rate is equivalent': (), + 'Control mode': (), + 'Test Temperature': (), + "Young's Modulus (11-axis)": (), + '0.02% Offset yield stress': (), + '0.2% Offset yield stress': ()}) +``` + + +## Delete rows + +Delete rows by specifying the row index to delete. + +Use the length of the `.rows` tuple to get the number of rows, and delete the last two. + + +```python +number_of_rows = len(tabular_attribute.rows) +tabular_attribute.delete_row(number_of_rows - 1) +tabular_attribute.delete_row(number_of_rows - 2) +tabular_attribute.rows +``` + + + +*Previous cell output:* +```output +(, + , + , + , + , + , + , + , + ) +``` + + +Write the changes to the server, and check the content of the tabular attribute after the update. + + +```python +record.set_attributes([tabular_attribute]) +record = mi.update([record])[0] + +tabular_attribute = record.attributes["Tensile test data used in this rollup"] +tabular_attribute.rows +``` + + + +*Previous cell output:* +```output +(, + , + , + , + , + , + , + , + ) +``` + diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/10_Edit_Pseudo-attributes.md b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/13_Edit_Pseudo-attributes.md similarity index 87% rename from 2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/10_Edit_Pseudo-attributes.md rename to 2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/13_Edit_Pseudo-attributes.md index 3cc1cee027..60ceefd801 100644 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/10_Edit_Pseudo-attributes.md +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/13_Edit_Pseudo-attributes.md @@ -1,17 +1,18 @@ -# Edit Pseudo-attributes -This example illustrates how to view the pseudo-attributes values (also known as record properties) -and how to modify the value of an editable pseudo-attribute. +# Pseudo-attributes + +Work with pseudo-attributes values (also known as record properties) and how to modify the value of an editable +pseudo-attribute. ## Connect to MI Specify a database and table. ```python -from GRANTA_MIScriptingToolkit import granta as mpy +import ansys.grantami.core as mpy -mi = mpy.connect("http://my.server.name/mi_servicelayer", autologon=True) +mi = mpy.SessionBuilder("http://my.server.name/mi_servicelayer").with_autologon() db = mi.get_db(db_key="MI_Training") -tab = db.get_table("Training Exercise for Import") +table = db.get_table("Training Exercise for Import") ``` ## Find a record and view its pseudo-attributes @@ -19,8 +20,8 @@ Search for a record (use the first result returned). ```python -recs = tab.search_for_records_by_name("Ti") -record = recs[0] +records = table.search_for_records_by_name("Ti") +record = records[0] record ``` @@ -108,13 +109,14 @@ Write your changes to MI (pseudo-attributes do not need to be flagged for update ```python -mi.update([record]) +record = mi.update([record])[0] +record ``` *Previous cell output:* ```output -[] + ``` diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/14_Create_and_Edit_Tabular_Data.md b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/14_Create_and_Edit_Tabular_Data.md deleted file mode 100644 index 3ef6770643..0000000000 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/14_Create_and_Edit_Tabular_Data.md +++ /dev/null @@ -1,293 +0,0 @@ -# Create and Edit Tabular Data -Create a new tabular attribute, add, delete and swap rows, and edit the units. - -## Create a new record -Connect to MI and specify a database and table. - - -```python -from datetime import datetime -from GRANTA_MIScriptingToolkit import granta as mpy - -mi = mpy.connect("http://my.server.name/mi_servicelayer", autologon=True) -db = mi.get_db(db_key="MI_Training") -tab = db.get_table("Tensile Test Data") -``` - -Create a new record. - - -```python -now = datetime.now().strftime("%c") -recordName = f"Scripting Toolkit Example 14:{now}" -rec = tab.create_record(recordName, subsets={"In Progress"}) -``` - -## Access a Tabular attribute -Access the (empty) Tabular attribute *Workflow history*. - - -```python -history = rec.attributes["Workflow history"] -history -``` - - - -*Previous cell output:* -```output - -``` - - -Inspect the tabular datum. Using the method `show()` shows the table in ASCII format. - - -```python -history.show() -``` -*Previous cell output:* -```output - User | Date | Comments | Linking Value (None) ---------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------- -``` -Look at the `__repr__` of the attribute. There are currently no rows in the table. - - -```python -history -``` - - - -*Previous cell output:* -```output - -``` - - -Tabular attributes can be loaded with the `load()` method (there is no data to load in this example): - - -```python -history.load() -``` - -## Add rows and data - -Add three (empty) rows to the Tabular object, and view the table in an ACSII-style format. - - -```python -history.add_row() -history.add_row() -history.add_row() -history.show() -``` -*Previous cell output:* -```output - User | Date | Comments | Linking Value (None) ---------------------------------------------------------------------------------------------------------------------------------- - None | None | None | '' - None | None | None | '' - None | None | None | '' ---------------------------------------------------------------------------------------------------------------------------------- -``` -Data is added by accessing the `tabular` property. The column name should be provided as a string followed by the -index of the row. Start by populating the first row: - - -```python -history["User", 0] = "Your username" -history["Date", 0] = "2019-01-01" # dates should always be provided in the format YYY-MM-DD -history["Comments", 0] = "This is an example comment" -history.value[:][0] -``` - - - -*Previous cell output:* -```output -['Your username', - '2019-01-01', - 'This is an example comment', - ''] -``` - - -Populate the second row: - - -```python -history["User", 1] = "Another username" -history["Date", 1] = "2019-01-02" -history["Comments", 1] = "This is another example comment" -history.value[:][1] -``` - - - -*Previous cell output:* -```output -['Another username', - '2019-01-02', - 'This is another example comment', - ''] -``` - - -Then populate the third row. The data is stored locally, so the linking values are displayed as ``. - - -```python -history["User", 2] = "Another username" -history["Date", 2] = "2019-01-02" -history["Comments", 2] = "This is another example comment" -history.value[:][2] -``` - - - -*Previous cell output:* -```output -['Another username', - '2019-01-02', - 'This is another example comment', - ''] -``` - - - -```python -history.show() -history.value -``` -*Previous cell output:* -```output - User | Date | Comments | Linking Value (None) ---------------------------------------------------------------------------------------------------------------------------------- - 'Your username' | '2019-01-01' | 'This is an example comment' | '' - 'Another username' | '2019-01-02' | 'This is another example c...' | '' - 'Another username' | '2019-01-02' | 'This is another example c...' | '' ---------------------------------------------------------------------------------------------------------------------------------- -``` - - -*Previous cell output:* -```output -[['Your username', - '2019-01-01', - 'This is an example comment', - ''], - ['Another username', - '2019-01-02', - 'This is another example comment', - ''], - ['Another username', - '2019-01-02', - 'This is another example comment', - '']] -``` - - -## Edit the table -Rows can be moved using the `swap_rows()` method. - - -```python -history.value[:][:2] -``` - - - -*Previous cell output:* -```output -[['Your username', - '2019-01-01', - 'This is an example comment', - ''], - ['Another username', - '2019-01-02', - 'This is another example comment', - '']] -``` - - - -```python -history.swap_rows(0, 1) -``` - - -```python -history.value[:][:2] -``` - - - -*Previous cell output:* -```output -[['Another username', - '2019-01-02', - 'This is another example comment', - ''], - ['Your username', - '2019-01-01', - 'This is an example comment', - '']] -``` - - -Rows can also be deleted; for example, one of the two duplicate rows in this table. - - -```python -history.delete_row(0) -``` - -## Access the units -Each **Tabular** object is associated with a **TabularUnits** object which stores the units for the Tabular data. View -(and edit) these units through the `tabular.units` property. - - -```python -history.units -``` - - - -*Previous cell output:* -```output - -``` - - -Access the complete set of units for the tabular datum - - -```python -history.units.data -``` - - - -*Previous cell output:* -```output -[['', '', '', None], ['', '', '', None]] -``` - - -## Write your changes to MI -Set your new attribute to update, and write the changes to the server. - - -```python -rec.set_attributes([history]) -rec = mi.update([rec])[0] -``` - -## Notes about Tabular data: - * Point-type values in Tabular cannot have parameters, and are always lists. - * Any changes to linked data will be ignored on import. diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/14_Data_with_Precision.md b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/14_Data_with_Precision.md new file mode 100644 index 0000000000..7d2ef6c1bc --- /dev/null +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/14_Data_with_Precision.md @@ -0,0 +1,221 @@ +# Data with Precision + +Import numeric data with explicitly-specified precision information by specifying the number of significant figures. + +For example: the temperature during a test is measured using a thermocouple with an accuracy of 0.1 °C for +measurements below 100 °C. +Measures for multiple tests might be in the form: 90.6 °C, 90.0 °C, 89.9 °C. The trailing zeros in `90.0` +are significant. + +Floating-point numbers in Python cannot provide exact decimal representation, so additional information is required to +specify the precision of a floating-point value before importing it into Granta MI. This example illustrates how +significant figures can be set when importing point and range attribute values, as well as how that information is +represented when exporting attribute values which have significant figures information. + +## Connect to MI +Get a database and table. + + +```python +from datetime import datetime +import ansys.grantami.core as mpy + +mi = mpy.SessionBuilder("http://my.server.name/mi_servicelayer").with_autologon() + +db = mi.get_db(db_key="MI_Training") +db.unit_system = "Metric" +db.absolute_temperatures = False + +table = db.get_table("Composite Design Data") +``` + +## Create a new record +Create a new ``Record`` object. + + +```python +now = datetime.now().strftime("%c") +record_name = f"Scripting Toolkit Example 13:{now}" +record = table.create_record(name=record_name) +record +``` + + + +*Previous cell output:* +```output + +``` + + +## Edit the record's attributes +### Values with precision +To add precision information to a floating-point value, use the ``ValueWithPrecision`` class. To simplify the import +of values with similar resolution but different exponents, specifying significant digits is done by +specifying a number of digits after the decimal point. + + +```python +temperature_value = mpy.ValueWithPrecision(value=90, number_of_digits=1) +print("Decimal representation:", temperature_value.as_decimal) +print("MI Significant figures:", temperature_value.significant_figures) +``` +*Previous cell output:* +```output +Decimal representation: 90.0 +MI Significant figures: 3 +``` +### Point attributes +To set significant figures on a single-valued point attribute, set the attribute ``.value`` property to an instance of +``ValueWithPrecision``. + + +```python +test_temperature = record.attributes["Test temperature"] +test_temperature.value = temperature_value +test_temperature.unit = "°C" +test_temperature.value.as_decimal +``` + + + +*Previous cell output:* +```output +Decimal('90.0') +``` + + +To set significant figures on a multi-valued point attribute and assign parameter values, set the ``.value`` property +to a tuple of ``ParameterizedPointValue`` with ``ValueWithPrecision`` values. + + +```python +modulus = record.attributes["0° tension modulus - measured"] +modulus.unit = "GPa" +modulus.value = ( + mpy.ParameterizedPointValue( + value=mpy.ValueWithPrecision(value=40.7, number_of_digits=2), + parameters=( + mpy.PointParameterValue("Basis", "Mean"), + ) + ), + mpy.ParameterizedPointValue( + value=mpy.ValueWithPrecision(value=41.46, number_of_digits=2), + parameters=( + mpy.PointParameterValue("Basis", "A-basis"), + ) + ) +) +``` + +### Range attributes +Set the ``.value`` property to a ``Range`` object, providing high and low values with precision. + + +```python +resin_content = record.attributes["Resin content"] +fiber_volume = record.attributes["Fiber volume"] + +resin_content.value = mpy.Range(mpy.ValueWithPrecision(28, 0), mpy.ValueWithPrecision(30, 0)) +resin_content.unit = "wt%" + +fiber_volume.value = mpy.Range( + low=None, + high=mpy.ValueWithPrecision(62.0, 1), + high_value_is_inclusive=False +) +fiber_volume.unit = "%" +``` + +## Write your changes to MI +First, specify the attributes on the record which you want to update on the server. Then write the changes to MI. +The list of updated ``Record`` objects is returned. + + +```python +record.set_attributes([resin_content, test_temperature, fiber_volume, modulus]) +record = mi.update([record])[0] +``` + +## Output the record's attributes +Access the attribute values via the same properties you used to assign them. Significant figures information is +available via the ``.trailing_zero_information`` property. + +The test temperature has been stored with 1 digit of precision. The trailing zero information includes the entered +value, the entered unit, as well as the number of significant figures stored with the value. The additional properties +``as_decimal`` and ``number_of_digits`` help convert the information back to a more accessible representations: + + +```python +test_temperature = record.attributes["Test temperature"] +print(f"Test temperature value: {test_temperature.value} {test_temperature.unit}") +print("Test temperature precision information:", test_temperature.trailing_zero_information) +print("Decimal representation:", test_temperature.trailing_zero_information.as_decimal) +print("Number of digits:", test_temperature.trailing_zero_information.number_of_digits) +``` +*Previous cell output:* +```output +Test temperature value: 90.0 °C +Test temperature precision information: TrailingZeroInformation('90', '°C', 3) +Decimal representation: 90.0 +Number of digits: 1 +``` + +```python +modulus = record.attributes["0° tension modulus - measured"] +formatted_points = ", ".join([ + f"{point.as_decimal} {modulus.unit} ({modulus.value[idx].parameters_by_name['Basis']})" + for idx, point in enumerate(modulus.trailing_zero_information) +]) +print("0° tension modulus:", formatted_points) +``` +*Previous cell output:* +```output +0° tension modulus: 40.70 GPa (Mean), 41.46 GPa (A-basis) +``` +Define a function to format ranges as strings with the appropriate inclusive or exclusive inequality +symbols and at the stored precision. + + +```python +def format_range_with_significant_figures(range_value): + low_value = range_value.value.low + if range_value.low_value_trailing_zero_information: + low_value = range_value.low_value_trailing_zero_information.as_decimal + if low_value is not None: + low_inequality = "≤" if range_value.low_value_is_inclusive else "<" + else: + low_inequality = "" + low_range = f"{low_value} {low_inequality}" if low_value else "" + + high_value = range_value.value.high + if range_value.high_value_trailing_zero_information: + high_value = range_value.high_value_trailing_zero_information.as_decimal + if high_value is not None: + high_inequality = "≤" if range_value.high_value_is_inclusive else "<" + else: + high_inequality = "" + high_range = f"{high_inequality} {high_value}" if high_value else "" + + unit_symbol = range_value.unit + return f"{low_range} x {high_range} {unit_symbol}".strip() +``` + + +```python +resin_content = record.attributes["Resin content"] +print(format_range_with_significant_figures(resin_content)) +``` +*Previous cell output:* +```output +28 ≤ x ≤ 30 wt% +``` + +```python +fiber_volume = record.attributes["Fiber volume"] +print(format_range_with_significant_figures(fiber_volume)) +``` +*Previous cell output:* +```output +x < 62.0 % +``` \ No newline at end of file diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/15_Use_Exporters_for_FEA_Export.md b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/15_Use_Exporters_for_FEA_Export.md index f0cc22ce7f..db7bd958d9 100644 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/15_Use_Exporters_for_FEA_Export.md +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/15_Use_Exporters_for_FEA_Export.md @@ -6,9 +6,9 @@ Check which exporters are available for a specific table. ```python -from GRANTA_MIScriptingToolkit import granta as mpy +import ansys.grantami.core as mpy -mi = mpy.connect("http://my.server.name/mi_servicelayer", autologon=True) +mi = mpy.SessionBuilder("http://my.server.name/mi_servicelayer").with_autologon() db = mi.get_db(db_key="MI_Training") table = db.get_table("Design Data") @@ -23,17 +23,17 @@ for exporter in exporters_in_table: Output of available ANSYS Workbench Exporters 458E9A7E-C268-4ED0-9CC1-FF7438521B4F (ANSYS Workbench) - Exports linear, temperature-independent, isotropic data to the Ansys Workbench format -CE8DCFA2-B3EE-4545-8D3E-82810FA92AFC (ANSYS Workbench) - Exports linear, temperature-dependent, isotropic data to the Ansys Workbench format 4B0B1EA3-8760-43DF-8060-2C79CA471D4C (ANSYS Workbench) - Exports linear, temperature-independent, isotropic with simple failure data to the Ansys Workbench format +CE8DCFA2-B3EE-4545-8D3E-82810FA92AFC (ANSYS Workbench) - Exports linear, temperature-dependent, isotropic data to the Ansys Workbench format ``` Check which exporters are applicable to a specific record. ```python -rec = table.search_for_records_by_name( +record = table.search_for_records_by_name( "250 Grade Maraging, Maraged at 900F, Plate, Thickness: 0.1875 to 0.251 in, AMS 6520, S basis" )[0] -applicable_exporters = rec.get_available_exporters() +applicable_exporters = record.get_available_exporters() print("\nOutput of exporters for 250 Grade Maraging steel:") for exporter in applicable_exporters: @@ -43,15 +43,15 @@ for exporter in applicable_exporters: ```output Output of exporters for 250 Grade Maraging steel: -71CE1C21-FDEA-4119-B481-81BDC41BD900 (Abaqus 6) - Exports temperature dependent, isotropic data to the Abaqus format. -5C560880-4FD3-4E5C-992B-4B6CEF6A055A (Abaqus 6) - Exports temperature independent, isotropic data to the Abaqus 6 format. -911AF055-B388-439A-8AF6-EB18480E2D80 (Abaqus 6) - Linear, temperature-independent, isotropic, simple failure 3AE2BEA5-B1DB-45D3-A431-48915B8D1317 (Abaqus 6) - Linear, temperature-independent, isotropic, simple failure with thermal expansion -722E5C46-3633-4B72-BF93-74E8112C20C3 (Abaqus 6) - Exports temperature dependent, isotropic data to the Abaqus 6 format. B653C213-8BEB-42A7-8512-5F340EEBFAB4 (Abaqus 6) - Exports temperature independent, isotropic data to the Abaqus 6 format. 458E9A7E-C268-4ED0-9CC1-FF7438521B4F (ANSYS Workbench) - Exports linear, temperature-independent, isotropic data to the Ansys Workbench format -CE8DCFA2-B3EE-4545-8D3E-82810FA92AFC (ANSYS Workbench) - Exports linear, temperature-dependent, isotropic data to the Ansys Workbench format +71CE1C21-FDEA-4119-B481-81BDC41BD900 (Abaqus 6) - Exports temperature dependent, isotropic data to the Abaqus format. +911AF055-B388-439A-8AF6-EB18480E2D80 (Abaqus 6) - Linear, temperature-independent, isotropic, simple failure 4B0B1EA3-8760-43DF-8060-2C79CA471D4C (ANSYS Workbench) - Exports linear, temperature-independent, isotropic with simple failure data to the Ansys Workbench format +722E5C46-3633-4B72-BF93-74E8112C20C3 (Abaqus 6) - Exports temperature dependent, isotropic data to the Abaqus 6 format. +5C560880-4FD3-4E5C-992B-4B6CEF6A055A (Abaqus 6) - Exports temperature independent, isotropic data to the Abaqus 6 format. +CE8DCFA2-B3EE-4545-8D3E-82810FA92AFC (ANSYS Workbench) - Exports linear, temperature-dependent, isotropic data to the Ansys Workbench format ``` ## Working with parameters Some exporters support parameters. The exported parameters have default values but they can also be set manually. @@ -60,13 +60,13 @@ Get the required parameters for an exporter. ```python -all_exporters = rec.get_available_exporters( +all_exporters = record.get_available_exporters( package="Abaqus 6", - model="Linear, temperature-dependent, isotropic, thermal, plastic" + model="Linear, temperature-dependent, isotropic, thermal, plastic", ) exporter_to_use = all_exporters[0] -parameters_required = exporter_to_use.get_parameters_required_for_export([rec]) +parameters_required = exporter_to_use.get_parameters_required_for_export([record]) print(parameters_required) ``` *Previous cell output:* @@ -83,7 +83,7 @@ parameter_values = {"Time": 100.0} for parameter_name in parameters_required.keys(): parameters_required[parameter_name].value_for_exporters = parameter_values[parameter_name] -material_card = exporter_to_use.run_exporter([rec], parameter_defs=parameters_required) +material_card = exporter_to_use.run_exporter([record], parameter_defs=parameters_required) print(material_card) ``` *Previous cell output:* @@ -93,7 +93,7 @@ print(material_card) **Model Type: Linear, temperature-dependent, isotropic, thermal, plastic **Unit System: SI (Consistent) **Export User: ANSYS\mi-sw-admin -**Export DateTime: 2025-05-12T12:17:04.8602976-04:00 +**Export DateTime: 2026-01-07T14:29:09.7626809-05:00 **Database Name: MI Training **Table Name: Design Data **Material Record History Id: 20673 @@ -281,13 +281,16 @@ are left as their defaults. ```python -path_to_save = "./" +from pathlib import Path + +path_to_save = "./output/" +Path(path_to_save).mkdir(exist_ok=True) file_name = "Example_Export" exporter_to_use.save(path_to_save, file_name="Example_Export") file_extension = exporter_to_use.default_file_extension -print(f"Exporter output saved to \"{path_to_save}{file_name}.{file_extension}\"") +print(f'Exporter output saved to "{path_to_save}{file_name}.{file_extension}"') ``` *Previous cell output:* ```output -Exporter output saved to "./Example_Export.inp" +Exporter output saved to "./output/Example_Export.inp" ``` \ No newline at end of file diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/16_Link_Records.md b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/16_Link_Records.md index c13c03707b..2d90189050 100644 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/16_Link_Records.md +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/16_Link_Records.md @@ -7,11 +7,11 @@ Connect to MI and get a database and table. ```python from datetime import datetime -from GRANTA_MIScriptingToolkit import granta as mpy +import ansys.grantami.core as mpy -mi = mpy.connect("http://my.server.name/mi_servicelayer", autologon=True) +mi = mpy.SessionBuilder("http://my.server.name/mi_servicelayer").with_autologon() db = mi.get_db(db_key="MI_Training") -tab = db.get_table("Training Exercise for Import") +table = db.get_table("Training Exercise for Import") ``` Create a new record in the subset *Materials*. @@ -19,8 +19,8 @@ Create a new record in the subset *Materials*. ```python now = datetime.now().strftime("%c") -recordName = f"Scripting Toolkit Example 16:{now}" -rec = tab.create_record(recordName, subsets={"Materials"}) +record_name = f"Scripting Toolkit Example 15:{now}" +record = table.create_record(record_name, subsets={"Materials"}) ``` ## Smart links @@ -32,17 +32,17 @@ server. ```python -base = rec.attributes["Base"] +base = record.attributes["Base"] base.value = "Oxide" -rec.set_attributes([base]) -rec = mi.update([rec])[0] +record.set_attributes([base]) +record = mi.update([record])[0] ``` View the smart links that have just been created to the new record. ```python -for link_group, records in rec.links.items(): +for link_group, records in record.links.items(): print(f'Link group "{link_group}" contains links to the following records:') print(", ".join([r.name for r in records])) ``` @@ -51,7 +51,7 @@ for link_group, records in rec.links.items(): Link group "MaterialUniverse" contains links to the following records: Link group "Smart Link to MaterialUniverse" contains links to the following records: -Lithium aluminosilicate, Barium silicate, Alumino silicate - 1723, Alumino silicate - 1720, Soda barium glass +Alumino silicate - 1720, Lithium aluminosilicate, Alumino silicate - 1723, Barium silicate, Soda barium glass ``` ## Static links A static link can be created between two existing records, including cross-database. @@ -60,30 +60,30 @@ Get a record from *MaterialUniverse* to link to your newly-created record. ```python -mu_rec = db.get_record_by_id(hguid="bf5e6054-6cad-4c9d-ad7a-adfa124c504b") +mu_record = db.get_record_by_id(hguid="bf5e6054-6cad-4c9d-ad7a-adfa124c504b") ``` Add the *MaterialUniverse* record to the link group on the new record. ```python -new_linked_recs = rec.links["MaterialUniverse"] -new_linked_recs.add(mu_rec) -rec.set_links(link_name="MaterialUniverse", records=new_linked_recs) +new_linked_records = record.links["MaterialUniverse"] +new_linked_records.add(mu_record) +record.set_links(link_name="MaterialUniverse", records=new_linked_records) ``` Write your changes to MI (use `update_links()` for changes to links, not `update()`). ```python -rec = mi.update_links([rec])[0] +record = mi.update_links([record])[0] ``` View your new link on the list of record links. ```python -for link_group, records in rec.links.items(): +for link_group, records in record.links.items(): print(f'Link group "{link_group}" contains links to the following records:') print(", ".join([r.name for r in records])) ``` @@ -92,7 +92,7 @@ for link_group, records in rec.links.items(): Link group "MaterialUniverse" contains links to the following records: Soda barium glass Link group "Smart Link to MaterialUniverse" contains links to the following records: -Lithium aluminosilicate, Alumino silicate - 1723, Soda barium glass, Barium silicate, Alumino silicate - 1720 +Alumino silicate - 1720, Lithium aluminosilicate, Barium silicate, Alumino silicate - 1723, Soda barium glass ``` ## Associated Records Associated Records are a way of traversing tabular links multiple steps at a time. This example finds all materials diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/17_Layouts.md b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/17_Layouts.md index c131f0a736..d26795c131 100644 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/17_Layouts.md +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/17_Layouts.md @@ -6,8 +6,9 @@ This notebook shows how to access layouts through the Streamlined API. ```python -from GRANTA_MIScriptingToolkit import granta as mpy -mi = mpy.connect("http://my.server.name/mi_servicelayer", autologon=True) +import ansys.grantami.core as mpy + +mi = mpy.SessionBuilder("http://my.server.name/mi_servicelayer").with_autologon() db = mi.get_db(db_key="MI_Training") ``` diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/18_Record_Lists_Interoperability.md b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/18_Record_Lists_Interoperability.md index 92c991b29f..c7d8f43121 100644 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/18_Record_Lists_Interoperability.md +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/18_Record_Lists_Interoperability.md @@ -33,10 +33,10 @@ First create an MI Scripting Toolkit session. ```python -from GRANTA_MIScriptingToolkit import granta as mpy +import ansys.grantami.core as mpy SERVICE_LAYER_URL = "http://my.server.name/mi_servicelayer" -mi = mpy.connect(SERVICE_LAYER_URL, autologon=True) +mi = mpy.SessionBuilder(SERVICE_LAYER_URL).with_autologon() ``` Search for all *MaterialUniverse* records with a density above a certain threshold. The @@ -49,8 +49,8 @@ db.unit_system = "SI (Consistent)" material_universe = db.get_table("MaterialUniverse") criterion = material_universe.attributes["Density"].search_criterion(greater_than=7000.0) -results = material_universe.search_for_records_where([criterion]) -results +material_universe_results = material_universe.search_for_records_where([criterion]) +material_universe_results ``` @@ -97,7 +97,7 @@ items = [ table_guid=record.table.guid, record_history_guid=record.history_guid, ) - for record in results + for record in material_universe_results ] ``` @@ -196,7 +196,7 @@ Search for all *Design Data* records with a density above a certain threshold. design_data = db.get_table("Design Data") criterion = design_data.attributes["Density"].search_criterion(greater_than=7000.0) -results = design_data.search_for_records_where([criterion]) +design_data_results = design_data.search_for_records_where([criterion]) ``` Since the *Design Data* table is version-controlled, each `Record` object represents a particular @@ -205,8 +205,8 @@ property. ```python -for r in results: - print(f"'{r.name}'", ", version: ", r.version_number) +for r in design_data_results: + print(f"'{r.name}'", ", version: ", r.version_number) ``` *Previous cell output:* ```output @@ -228,7 +228,7 @@ version_controlled_items = [ record_history_guid=record.history_guid, record_version=record.version_number, ) - for record in results + for record in design_data_results ] record_list_items = api_client.add_items_to_list(record_list, version_controlled_items) record_list_items @@ -277,7 +277,7 @@ identifiers = [ { "db_key": mi.dbs_by_guid[item.database_guid].db_key, "hguid": item.record_history_guid, - "vguid": item.record_guid + "vguid": item.record_guid, } for item in record_list_items ] diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/19_Job_Queue_Interoperability.md b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/19_Job_Queue_Interoperability.md index b281b669a0..24c6513901 100644 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/19_Job_Queue_Interoperability.md +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/samples/streamlined/19_Job_Queue_Interoperability.md @@ -27,10 +27,10 @@ First create an MI Scripting Toolkit session. ```python -from GRANTA_MIScriptingToolkit import granta as mpy +import ansys.grantami.core as mpy SERVICE_LAYER_URL = "http://my.server.name/mi_servicelayer" -mi = mpy.connect(SERVICE_LAYER_URL, autologon=True) +mi = mpy.SessionBuilder(SERVICE_LAYER_URL).with_autologon() ``` Next, access all records in a specific tree location. We will need the database key later, so @@ -43,8 +43,7 @@ db = mi.get_db(db_key=DB_KEY) tensile_test_data = db.get_table("Tensile Test Data") records = tensile_test_data.get_records_from_path( - starting_node=None, - tree_path=["High Alloy Steels", "AMS 6520", "Plate", "300°F"] + starting_node=None, tree_path=["High Alloy Steels", "AMS 6520", "Plate", "300°F"] ) records ``` @@ -123,7 +122,7 @@ from pathlib import Path request = ExcelExportJobRequest( name="Example export", description="A demonstration of how to export data to Excel using Granta MI JobQueue", - template_file=Path("supporting_files/23_Export_Template.xlsx"), + template_file=Path("supporting_files/18_Export_Template.xlsx"), database_key=DB_KEY, records=export_records, ) diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/streamlined_api/attribute-definitions.md b/2026R1/scripting-toolkit-dev-portal-26-r1/streamlined_api/attribute-definitions.md new file mode 100644 index 0000000000..37a8fdf6eb --- /dev/null +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/streamlined_api/attribute-definitions.md @@ -0,0 +1,826 @@ +# Attribute definitions + + + + + + + +### *class* PseudoAttributeDefinition + +Stores basic information about a pseudo-attribute. + +* **Parameters:** + **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – Name of the pseudo-attribute. + +### Notes + +Supported names are: + +* `recordType` +* `recordHistoryIdentity` +* `recordColor` +* `recordVersionNumber` +* `tableName` +* `writable` +* `parentShortName` +* `parentName` +* `parentRecordHistoryIdentity` +* `shortName` +* `modifiedDate` +* `createdDate` +* `releasedDate` +* `lastModifier` +* `creator` +* `subsets` +* `name` + +* **Raises:** + [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – If the name is not a recognized pseudo-attribute name. + + + +#### *property* id *: [int](https://docs.python.org/3/library/functions.html#int)* + +Attribute identifier. + +Always 0 for pseudo-attributes. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Name of the pseudo-attribute. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* read_only *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Whether the current user has the correct permissions to edit the attribute. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* type *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Data type of the pseudo-attribute (four-character string). + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +### *class* AttributeDefinition + +Base attribute definition class. + +Stores basic information about an attribute, such as data type or possible values. Contains information about +the attribute itself, not the data. Cannot be used to set attribute values. + +### Notes + +Do not create instances of this class, it represents an abstract database structure. + + + +#### 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()`](table.md#ansys.grantami.core.mi_tree_classes.Table.search_for_records_where) or +[`Database.search_for_records_where()`](database.md#ansys.grantami.core.mi_tree_classes.Database.search_for_records_where). + +Operator priority is the same as the order of the arguments. + +* **Parameters:** + * **less_than** ([*float*](https://docs.python.org/3/library/functions.html#float) *,* *optional*) – Search for values less than this. + * **greater_than** ([*float*](https://docs.python.org/3/library/functions.html#float) *,* *optional*) – Search for values greater than this. + * **contains** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *or* [*bool*](https://docs.python.org/3/library/functions.html#bool) *,* *optional*) – Search for values containing this. + * **contains_any** ([*list*](https://docs.python.org/3/library/stdtypes.html#list) *[*[*str*](https://docs.python.org/3/library/stdtypes.html#str) *]* *,* *optional*) – Search for values containing any of these. + * **contains_all** ([*list*](https://docs.python.org/3/library/stdtypes.html#list) *[*[*str*](https://docs.python.org/3/library/stdtypes.html#str) *]* *,* *optional*) – Search for values containing all of these. + * **does_not_contain** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* *optional*) – Search for values not containing this. + * **exists** ([*bool*](https://docs.python.org/3/library/functions.html#bool) *,* *optional*) – Search for existence of attribute values. + * **equal_to** ([*int*](https://docs.python.org/3/library/functions.html#int) *or* [*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* *optional*) – Search for values equal to this. + * **between_dates** ([*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple) *[*[*datetime.date*](https://docs.python.org/3/library/datetime.html#datetime.date) *,* [*datetime.date*](https://docs.python.org/3/library/datetime.html#datetime.date) *]* *,* *optional*) – Two dates in chronological order to search between. + * **in_column** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* *optional*) – Name of tabular column to search. +* **Return type:** + [`SearchCriterion`](supporting.md#ansys.grantami.core.mi_meta_classes.SearchCriterion) or [`None`](https://docs.python.org/3/library/constants.html#None) +* **Raises:** + * [**AssertionError**](https://docs.python.org/3/library/exceptions.html#AssertionError) – If the criterion type is incompatible with the attribute type. + * [**AssertionError**](https://docs.python.org/3/library/exceptions.html#AssertionError) – If required parameters are missing. + +### Notes + +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 *: [ObjectHistory](supporting.md#ansys.grantami.core.mi_meta_classes.ObjectHistory)* + +Revision history of the attribute. + +* **Return type:** + [`ObjectHistory`](supporting.md#ansys.grantami.core.mi_meta_classes.ObjectHistory) + + + +#### *property* id *: [int](https://docs.python.org/3/library/functions.html#int)* + +Attribute identifier. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* is_meta *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Whether the attribute is a meta-attribute or not. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* is_meta_for *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +Parent attribute name. + +* **Returns:** + Name of the parent attribute, if the attribute is a meta-attribute. Returns [`None`](https://docs.python.org/3/library/constants.html#None) if not a + meta-attribute. +* **Return type:** + str or [`None`](https://docs.python.org/3/library/constants.html#None) + + + +#### *property* meta_attributes *: [Dict](https://docs.python.org/3/library/typing.html#typing.Dict)[[str](https://docs.python.org/3/library/stdtypes.html#str), [AttributeDefinition](#ansys.grantami.core.mi_attribute_classes.AttributeDefinition)]* + +Meta-attributes associated with this attribute, indexed by name. + +* **Return type:** + dict[str, [`AttributeDefinition`](#ansys.grantami.core.mi_attribute_classes.AttributeDefinition)] + + + +#### *property* name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Attribute name. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* order *: [int](https://docs.python.org/3/library/functions.html#int)* + +Display order in MI Viewer. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* table *: [Table](table.md#ansys.grantami.core.mi_tree_classes.Table)* + +Parent [`Table`](table.md#ansys.grantami.core.mi_tree_classes.Table) the attribute belongs to. + +* **Return type:** + [`Table`](table.md#ansys.grantami.core.mi_tree_classes.Table) + + + +#### *property* type *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Attribute data type, as a four-character string. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + +### Notes + +* Numeric attributes: `POIN` (point), `RNGE` (range), `INPT` (integer). +* Text attributes: `STXT` (short text), `LTXT` (long text), `DISC` (discrete). +* Functional attributes: `FUNC` (float functional). +* Media attributes: `HLNK` (hyperlink), `PICT` (picture), `FILE` (file). +* Other attributes: `LOGI` (logical), `DTTM` (date time), `TABL` (tabular). + +`DSFN` (discrete functional) 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` (maths functional) attribute definitions cannot be obtained via the MI Scripting Toolkit. + + + +### *class* AttributeDefinitionDate + +Extended [`AttributeDefinition`](#ansys.grantami.core.mi_attribute_classes.AttributeDefinition) class for date attributes. + +Provides properties to view the table-wide minimum and maximum values for this attribute. + +### Notes + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`Table.attributes`](table.md#ansys.grantami.core.mi_tree_classes.Table.attributes) to access instances of this class. + + + +#### *property* max *: [date](https://docs.python.org/3/library/datetime.html#datetime.date) | [None](https://docs.python.org/3/library/constants.html#None)* + +Maximum value of the data attribute. + +Affected by user read permissions. + +* **Return type:** + datetime.date or [`None`](https://docs.python.org/3/library/constants.html#None) + + + +#### *property* min *: [date](https://docs.python.org/3/library/datetime.html#datetime.date) | [None](https://docs.python.org/3/library/constants.html#None)* + +Minimum value of the data attribute. + +Affected by user read permissions. + +* **Return type:** + datetime.date or [`None`](https://docs.python.org/3/library/constants.html#None) + + + +### *class* AttributeDefinitionDiscrete + +Extended [`AttributeDefinition`](#ansys.grantami.core.mi_attribute_classes.AttributeDefinition) class for discrete attributes. + +Provides a method to view the possible discrete values of an attribute. + +### Notes + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`Table.attributes`](table.md#ansys.grantami.core.mi_tree_classes.Table.attributes) to access instances of this class. + + + +#### *property* discrete_values *: [List](https://docs.python.org/3/library/typing.html#typing.List)[[str](https://docs.python.org/3/library/stdtypes.html#str)]* + +All possible discrete values of the attribute, in the order defined by the associated discrete type. + +* **Return type:** + [list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str)] + + + +#### *property* is_multivalued *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Whether this attribute allows multiple values to be set. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* is_ordered *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Whether the discrete type associated with the discrete attribute is ordered. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +### *class* AttributeDefinitionFile + +Extended [`AttributeDefinition`](#ansys.grantami.core.mi_attribute_classes.AttributeDefinition) class for file attributes. + +### Notes + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`Table.attributes`](table.md#ansys.grantami.core.mi_tree_classes.Table.attributes) to access instances of this class. + + + +### *class* AttributeDefinitionHyperlink + +Extended [`AttributeDefinition`](#ansys.grantami.core.mi_attribute_classes.AttributeDefinition) class for hyperlink attributes. + +### Notes + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`Table.attributes`](table.md#ansys.grantami.core.mi_tree_classes.Table.attributes) to access instances of this class. + + + +### *class* AttributeDefinitionInteger + +Extended [`AttributeDefinition`](#ansys.grantami.core.mi_attribute_classes.AttributeDefinition) class for integer attributes. + +Provides properties to view the table-wide minimum and maximum values for this attribute. + +### Notes + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`Table.attributes`](table.md#ansys.grantami.core.mi_tree_classes.Table.attributes) to access instances of this class. + + + +#### *property* is_unique *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Whether this attribute is defined as unique. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* max *: [int](https://docs.python.org/3/library/functions.html#int) | [None](https://docs.python.org/3/library/constants.html#None)* + +Maximum value of the data attribute. + +Affected by user read permissions. + +* **Return type:** + int or [`None`](https://docs.python.org/3/library/constants.html#None) + + + +#### *property* min *: [int](https://docs.python.org/3/library/functions.html#int) | [None](https://docs.python.org/3/library/constants.html#None)* + +Minimum value of the data attribute. + +Affected by user read permissions. + +* **Return type:** + int or [`None`](https://docs.python.org/3/library/constants.html#None) + + + +### *class* AttributeDefinitionLogical + +Extended [`AttributeDefinition`](#ansys.grantami.core.mi_attribute_classes.AttributeDefinition) class for logical attributes. + +### Notes + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`Table.attributes`](table.md#ansys.grantami.core.mi_tree_classes.Table.attributes) to access instances of this class. + + + +### *class* AttributeDefinitionLongText + +Extended [`AttributeDefinition`](#ansys.grantami.core.mi_attribute_classes.AttributeDefinition) class for long text attributes. + +### Notes + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`Table.attributes`](table.md#ansys.grantami.core.mi_tree_classes.Table.attributes) to access instances of this class. + + + +### *class* AttributeDefinitionPicture + +Extended [`AttributeDefinition`](#ansys.grantami.core.mi_attribute_classes.AttributeDefinition) class for picture attributes. + +### Notes + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`Table.attributes`](table.md#ansys.grantami.core.mi_tree_classes.Table.attributes) to access instances of this class. + + + +### *class* AttributeDefinitionRange + +Extended [`AttributeDefinition`](#ansys.grantami.core.mi_attribute_classes.AttributeDefinition) class for range attributes. + +Provides access to range-specific information and methods. + + + +#### *property* database_unit *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +The database unit for this attribute. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + + + +#### *property* default_unit *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +Attribute database unit in the active unit system. + +The unit used by MI Viewer or MI Explore to display this attribute in the active unit system. This +property is only affected by the unit system choice, and is not affected by [`Table.set_display_unit()`](table.md#ansys.grantami.core.mi_tree_classes.Table.set_display_unit). + +* **Returns:** + [`None`](https://docs.python.org/3/library/constants.html#None) if the attribute is dimensionless. +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + + + +#### *property* max *: [float](https://docs.python.org/3/library/functions.html#float) | [None](https://docs.python.org/3/library/constants.html#None)* + +Maximum value of the data attribute. + +Affected by user read permissions. + +* **Return type:** + float or [`None`](https://docs.python.org/3/library/constants.html#None) + + + +#### *property* min *: [float](https://docs.python.org/3/library/functions.html#float) | [None](https://docs.python.org/3/library/constants.html#None)* + +Minimum value of the data attribute. + +Affected by user read permissions. + +* **Return type:** + float or [`None`](https://docs.python.org/3/library/constants.html#None) + + + +#### *property* unit *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +Unit symbol. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + + + +### *class* AttributeDefinitionShortText + +Extended [`AttributeDefinition`](#ansys.grantami.core.mi_attribute_classes.AttributeDefinition) class for short text attributes. + +### Notes + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`Table.attributes`](table.md#ansys.grantami.core.mi_tree_classes.Table.attributes) to access instances of this class. + + + +#### *property* is_unique *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Whether this attribute is defined as unique. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +### *class* AttributeDefinitionTabular + +Extended [`AttributeDefinition`](#ansys.grantami.core.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. + +### Notes + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`Table.attributes`](table.md#ansys.grantami.core.mi_tree_classes.Table.attributes) to access instances of this class. + + + +#### *property* column_database_units *: [List](https://docs.python.org/3/library/typing.html#typing.List)[[str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)]* + +Database unit symbols for each column. + +* **Return type:** + [list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str) | None] + + + +#### *property* column_histories *: [List](https://docs.python.org/3/library/typing.html#typing.List)[[ObjectHistory](supporting.md#ansys.grantami.core.mi_meta_classes.ObjectHistory) | [None](https://docs.python.org/3/library/constants.html#None)]* + +The revision histories of each column. + +* **Returns:** + List of equal length to the number of columns. Each item is either an object history, or [`None`](https://docs.python.org/3/library/constants.html#None) for + unavailable columns. Use [`column_targets`](#ansys.grantami.core.mi_attribute_classes.AttributeDefinitionTabular.column_targets) to identify unavailable columns. +* **Return type:** + list[[`ObjectHistory`](supporting.md#ansys.grantami.core.mi_meta_classes.ObjectHistory) or [`None`](https://docs.python.org/3/library/constants.html#None)] + + + +#### *property* column_targets *: [List](https://docs.python.org/3/library/typing.html#typing.List)[[str](https://docs.python.org/3/library/stdtypes.html#str)]* + +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. + +* **Return type:** + [list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str)] + + + +#### *property* column_types *: [List](https://docs.python.org/3/library/typing.html#typing.List)[[str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)]* + +Data type for each column. + +* **Returns:** + List of equal length to the number of columns. Each item is one of a type codes for local tabular columns, + an empty string for linked columns, or [`None`](https://docs.python.org/3/library/constants.html#None) for unavailable columns. Use [`column_targets`](#ansys.grantami.core.mi_attribute_classes.AttributeDefinitionTabular.column_targets) to + identify unavailable columns. +* **Return type:** + list[str or [`None`](https://docs.python.org/3/library/constants.html#None)] + +### Examples + +```pycon +>>> tabular_attribute.column_types +['STXT', 'POIN', 'DISC', '', ''] +``` + +#### SEE ALSO +[`AttributeDefinition.type`](#ansys.grantami.core.mi_attribute_classes.AttributeDefinition.type) +: List of type codes. + + + +#### *property* column_units *: [List](https://docs.python.org/3/library/typing.html#typing.List)[[str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)]* + +Unit symbols for each column. + +* **Return type:** + [list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str) | None] + + + +#### *property* columns *: [List](https://docs.python.org/3/library/typing.html#typing.List)[[str](https://docs.python.org/3/library/stdtypes.html#str)]* + +Column names (headers). + +* **Return type:** + [list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str)] + + + +#### *property* columns_to_process *: [List](https://docs.python.org/3/library/typing.html#typing.List)[[str](https://docs.python.org/3/library/stdtypes.html#str)]* + +Columns to be included when populating an AttributeTabular object. + +Defaults to all columns, which will fully populate the AttributeTabular object. The content of unprocessed +columns depends on the column type: + +* Ignored linked columns contain the value `` in all cells. +* Ignored local tabular columns contain instances of [`IgnoredLocalTabularCell`](tabular.md#ansys.grantami.core._mi_tabular_value_classes.IgnoredLocalTabularCell). These objects contain no + accessible data, and they cannot be modified. + +Ignoring columns that aren’t required by the script can significantly improve performance for operations with +large amounts of tabular data. + +* **Return type:** + [list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str)] + +### Notes + +This property must be set on the AttributeDefinitionTabular object associated with the Table object +*before* data export for the setting to have an effect. + + + +#### *property* discrete_values *: [List](https://docs.python.org/3/library/typing.html#typing.List)[[List](https://docs.python.org/3/library/typing.html#typing.List)[[str](https://docs.python.org/3/library/stdtypes.html#str)]]* + +All possible discrete values, for all columns with the discrete data type. + +* **Return type:** + [list](https://docs.python.org/3/library/stdtypes.html#list)[[list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str)]] + + + +#### *property* ignore_linked_records *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Whether to ignore linked records when creating Record objects. + +Defaults to [`False`](https://docs.python.org/3/library/constants.html#False). Even when set to [`True`](https://docs.python.org/3/library/constants.html#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. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + +### Notes + +This property must be set on the AttributeDefinitionTabular object associated with the Table object +*before* data export for the setting to have an effect. + + + +#### *property* linking_attribute *: [None](https://docs.python.org/3/library/constants.html#None) | [AttributeDefinition](#ansys.grantami.core.mi_attribute_classes.AttributeDefinition)* + +Short text-type attribute used to link rows in the tabular data attribute to records. + +* **Returns:** + The attribute definition of the linking attribute. Returns [`None`](https://docs.python.org/3/library/constants.html#None) for purely local tabular data or if the + user annot access the table in Granta MI. +* **Return type:** + [`AttributeDefinition`](#ansys.grantami.core.mi_attribute_classes.AttributeDefinition) or [`None`](https://docs.python.org/3/library/constants.html#None) + + + +#### *property* linking_table *: [None](https://docs.python.org/3/library/constants.html#None) | [Table](table.md#ansys.grantami.core.mi_tree_classes.Table)* + +[`Table`](table.md#ansys.grantami.core.mi_tree_classes.Table) object which the linking attribute belongs to. + +* **Returns:** + The table object that the tabular attribute is linked to. Returns [`None`](https://docs.python.org/3/library/constants.html#None) for purely local tabular data or + if the user cannot access the table in Granta MI. +* **Return type:** + [`Table`](table.md#ansys.grantami.core.mi_tree_classes.Table) or [`None`](https://docs.python.org/3/library/constants.html#None) + + + +### *class* AttributeDefinitionMultiValue + +Extended [`AttributeDefinition`](#ansys.grantami.core.mi_attribute_classes.AttributeDefinition) class for functional and point data attributes. + +Provides access to functional data parameters. + +### Notes + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`Table.attributes`](table.md#ansys.grantami.core.mi_tree_classes.Table.attributes) to access instances of this class. + + + +#### *property* parameters *: [Dict](https://docs.python.org/3/library/typing.html#typing.Dict)[[str](https://docs.python.org/3/library/stdtypes.html#str), [AttributeParameter](supporting.md#ansys.grantami.core.mi_attribute_classes.AttributeParameter)]* + +Parameters associated with the attribute, indexed by name. + +* **Return type:** + dict[str, [`AttributeParameter`](supporting.md#ansys.grantami.core.mi_attribute_classes.AttributeParameter)] + + + +### *class* AttributeDefinitionFloatFunctional + +Extended [`AttributeDefinitionMultiValue`](#ansys.grantami.core.mi_attribute_classes.AttributeDefinitionMultiValue) class for float functional attributes. + +### Notes + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`Table.attributes`](table.md#ansys.grantami.core.mi_tree_classes.Table.attributes) to access instances of this class. + + + +#### *property* axis_name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Y-axis label. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* database_unit *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +The database unit for this attribute. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + + + +#### *property* parameters *: [Dict](https://docs.python.org/3/library/typing.html#typing.Dict)[[str](https://docs.python.org/3/library/stdtypes.html#str), [AttributeParameter](supporting.md#ansys.grantami.core.mi_attribute_classes.AttributeParameter)]* + +Parameters associated with the attribute, indexed by name. + +* **Return type:** + dict[str, [`AttributeParameter`](supporting.md#ansys.grantami.core.mi_attribute_classes.AttributeParameter)] + + + +#### *property* unit *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +Unit symbol. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + + + +### *class* AttributeDefinitionPoint + +Extended [`AttributeDefinitionMultiValue`](#ansys.grantami.core.mi_attribute_classes.AttributeDefinitionMultiValue) class for point attributes. + +Provides access to point-specific information and methods. + +### Notes + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`Table.attributes`](table.md#ansys.grantami.core.mi_tree_classes.Table.attributes) to access instances of this class. + + + +#### *property* database_unit *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +The database unit for this attribute. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + + + +#### *property* default_unit *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +Attribute database unit in the active unit system. + +The unit used by MI Viewer or MI Explore to display this attribute in the active unit system. This +property is only affected by the unit system choice, and is not affected by [`Table.set_display_unit()`](table.md#ansys.grantami.core.mi_tree_classes.Table.set_display_unit). + +* **Returns:** + [`None`](https://docs.python.org/3/library/constants.html#None) if the attribute is dimensionless. +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + + + +#### *property* is_multivalued *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Whether this attribute allows multiple values to be set. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* max *: [float](https://docs.python.org/3/library/functions.html#float) | [None](https://docs.python.org/3/library/constants.html#None)* + +Maximum value of the data attribute. + +Affected by user read permissions. + +* **Return type:** + float or [`None`](https://docs.python.org/3/library/constants.html#None) + + + +#### *property* min *: [float](https://docs.python.org/3/library/functions.html#float) | [None](https://docs.python.org/3/library/constants.html#None)* + +Minimum value of the data attribute. + +Affected by user read permissions. + +* **Return type:** + float or [`None`](https://docs.python.org/3/library/constants.html#None) + + + +#### *property* parameters *: [Dict](https://docs.python.org/3/library/typing.html#typing.Dict)[[str](https://docs.python.org/3/library/stdtypes.html#str), [AttributeParameter](supporting.md#ansys.grantami.core.mi_attribute_classes.AttributeParameter)]* + +Parameters associated with the attribute, indexed by name. + +* **Return type:** + dict[str, [`AttributeParameter`](supporting.md#ansys.grantami.core.mi_attribute_classes.AttributeParameter)] + + + +#### *property* unit *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +Unit symbol. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + + + +### *class* AttributeDefinitionUnsupported + +Extended [`AttributeDefinition`](#ansys.grantami.core.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). + +### Notes + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`Table.attributes`](table.md#ansys.grantami.core.mi_tree_classes.Table.attributes) to access instances of this class. + + + +### *class* AttributeDefinitionDiscreteFunctional + +Extended [`AttributeDefinitionUnsupported`](#ansys.grantami.core.mi_attribute_classes.AttributeDefinitionUnsupported) class for discrete functional attributes. + +Provides access to the limited information available (name, type and unit, if present). + +### Notes + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`Table.attributes`](table.md#ansys.grantami.core.mi_tree_classes.Table.attributes) to access instances of this class. diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/streamlined_api/attribute-values.md b/2026R1/scripting-toolkit-dev-portal-26-r1/streamlined_api/attribute-values.md new file mode 100644 index 0000000000..649513c2e2 --- /dev/null +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/streamlined_api/attribute-values.md @@ -0,0 +1,2258 @@ +# Attribute values + + + + + + + +### *class* AttributeValue + +Stores and provides access to attribute data values. + +The attributes in a [`Record`](record.md#ansys.grantami.core.mi_record_classes.Record) are represented in the MI Scripting Toolkit by [`AttributeDefinition`](attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinition) +objects, with an associated [`AttributeValue`](#ansys.grantami.core.mi_attribute_value_classes.AttributeValue) object containing the attribute’s data. +[`AttributeValue`](#ansys.grantami.core.mi_attribute_value_classes.AttributeValue) is the base class, and each attribute type has a specialised class that inherits from it. + +### Notes + +Do not create instances of this class; it represents an abstract database structure. + +The ‘Notes’ field, available for all attributes, is a property of the update operation. Use the +[`update()`](session.md#ansys.grantami.core.mi.Session.update) `notes` argument to provide revision notes. + + + +#### is_empty() + +Checks whether the attribute value is populated. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* definition *: [AttributeDefinition](attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinition)* + +The attribute definition associated with this attribute value. + +* **Return type:** + [`AttributeDefinition`](attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinition) + + + +#### *property* id *: [int](https://docs.python.org/3/library/functions.html#int)* + +Attribute identifier. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* is_applicable *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Whether the attribute is applicable to the current record. + +Setting this to [`False`](https://docs.python.org/3/library/constants.html#False) will clear any data values on the attribute on import. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) +* **Raises:** + [**TypeError**](https://docs.python.org/3/library/exceptions.html#TypeError) – If attempting to set a non-boolean value. + + + +#### *property* is_meta *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Whether the attribute is a meta-attribute. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* is_meta_for *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +Name of the parent attribute. + +* **Returns:** + Name of the parent attribute, or [`None`](https://docs.python.org/3/library/constants.html#None) if not a meta-attribute. +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + + + +#### *property* meta_attributes *: [dict](https://docs.python.org/3/library/stdtypes.html#dict)[[str](https://docs.python.org/3/library/stdtypes.html#str), [AttributeValue](#ansys.grantami.core.mi_attribute_value_classes.AttributeValue)]* + +Meta-attributes associated with this attribute. + +Does not make calls to the Service Layer. + +* **Return type:** + dict[str, [`AttributeValue`](#ansys.grantami.core.mi_attribute_value_classes.AttributeValue)] + + + +#### *property* name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Attribute name. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* record *: [Record](record.md#ansys.grantami.core.mi_record_classes.Record)* + +Record in which the attribute value is defined. + +* **Return type:** + [`Record`](record.md#ansys.grantami.core.mi_record_classes.Record) +* **Raises:** + [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – If the AttributeValue is not associated with a record. + + + +#### *property* type *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Attribute data type, as a four-character string. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + +### Notes + +* Numeric attributes: `POIN` (point), `RNGE` (range), `INPT` (integer). +* Text attributes: `STXT` (short text), `LTXT` (long text), `DISC` (discrete). +* Functional attributes: `FUNC` (float functional). +* Media attributes: `HLNK` (hyperlink), `PICT` (picture), `FILE` (file). +* Other attributes: `LOGI` (logical), `DTTM` (date time), `TABL` (tabular). + +`DSFN` and `MAFN` data values are not supported by the MI Scripting Toolkit, and appear as UNSUPPORTED DATA +TYPE. + + + +#### *abstract property* value *: [Any](https://docs.python.org/3/library/typing.html#typing.Any)* + +Current value of the attribute. + +Can be modified. + +* **Return type:** + Any + + + +### *class* AttributeBinary + +Extended [`AttributeValue`](#ansys.grantami.core.mi_attribute_value_classes.AttributeValue) class to handle [`BinaryType`](supporting.md#ansys.grantami.core.mi_attribute_value_classes.BinaryType) objects as attribute data values. + +Base class for [`AttributePicture`](#ansys.grantami.core.mi_attribute_value_classes.AttributePicture) and [`AttributeFile`](#ansys.grantami.core.mi_attribute_value_classes.AttributeFile). + +### Notes + +Do not create instances of this class; it represents an abstract database structure. + + + +#### is_empty() + +Checks if the [`BinaryType`](supporting.md#ansys.grantami.core.mi_attribute_value_classes.BinaryType) object is populated by checking if it contains any binary data. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* binary_data *: [bytes](https://docs.python.org/3/library/stdtypes.html#bytes) | [None](https://docs.python.org/3/library/constants.html#None)* + +The binary data for the file. + +Binary data can be set with a bytes object or file buffer. + +* **Return type:** + [bytes](https://docs.python.org/3/library/stdtypes.html#bytes) or None +* **Raises:** + [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – If binary data is available on the server but has not been exported. + + + +#### *property* mime_file_type *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +MIME (Multipurpose Internet Mail Extensions) file type. + +If this object is populated via export, the `mime_file_type` property returns the MIME file type stored in +Granta MI. + +Setting this attribute value (via either `.load()`, setting the [`binary_data`](#ansys.grantami.core.mi_attribute_value_classes.AttributeBinary.binary_data) property, or +setting the underlying `.object.binary_data`) will update the `mime_file_type` property using the +`filetype` library. If `filetype` cannot determine the MIME file type, the `mime_file_type` property is +set to [`None`](https://docs.python.org/3/library/constants.html#None) and Granta MI determines the MIME file type during import. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + +### Notes + +The [filetype PyPI page](https://pypi.org/project/filetype) lists supported MIME types. + + + +#### *property* url *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +URL of the hosted file. + +In a future version this property will raise an exception if the attribute is exported with +`include_binary_data = True`. See [Planned file and picture data changes](../release_notes/deprecations.md#planned-changes-file-picture) for more details. + +* **Returns:** + URL to the file stored in the parent Granta MI attribute, or [`None`](https://docs.python.org/3/library/constants.html#None) if the URL was not populated. +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + +### Notes + +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()`](table.md#ansys.grantami.core.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`](https://docs.python.org/3/library/constants.html#None). + + + +#### *property* value *: [bytes](https://docs.python.org/3/library/stdtypes.html#bytes) | [None](https://docs.python.org/3/library/constants.html#None)* + +The binary data of the hosted file, if exported. + +* **Return type:** + bytes or [`None`](https://docs.python.org/3/library/constants.html#None) +* **Raises:** + [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – If binary data is available on the server but has not been exported. In the next release, this behavior will + be deprecated. A later release will not raise an exception if the attribute is exported with + `include_binary_data = False`. Instead, the URL will be returned if the attribute is populated. See + [Planned file and picture data changes](../release_notes/deprecations.md#planned-changes-file-picture) for more details. + + + +### *class* AttributePicture + +Extended [`AttributeBinary`](#ansys.grantami.core.mi_attribute_value_classes.AttributeBinary) class for handling [`Picture`](supporting.md#ansys.grantami.core.mi_attribute_value_classes.Picture) objects. + +Provides access to [`Picture`](supporting.md#ansys.grantami.core.mi_attribute_value_classes.Picture) save/load methods. + +### Notes + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`Record.attributes`](record.md#ansys.grantami.core.mi_record_classes.Record.attributes) to access instances of this class. + +Pictures of up to 500 MB in size may be stored in Granta MI databases. To upload pictures larger than 20 Mb using +Scripting Toolkit: + +* Granta MI Service Layer must be configured to allow large requests. If this is not configured, + [`Session.update()`](session.md#ansys.grantami.core.mi.Session.update) will raise a [`GRANTA_ServiceLayerError`](../foundation_api.md#ansys.grantami.backend.soap.GRANTA_Exceptions.GRANTA_ServiceLayerError) for a “413 Request Entity Too Large” HTTP + response. For more information, contact your Ansys Technical Representative. +* The Python client environment must have sufficient system resources to load and Base64-encode the binary data. If + there are insufficient system resources, unhandled Python exceptions may be raised. + + + +#### is_empty() + +Checks if the [`BinaryType`](supporting.md#ansys.grantami.core.mi_attribute_value_classes.BinaryType) object is populated by checking if it contains any binary data. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### load(path) + +Wraps the [`Picture.load()`](supporting.md#ansys.grantami.core.mi_attribute_value_classes.Picture.load) method (populates the [`Picture`](supporting.md#ansys.grantami.core.mi_attribute_value_classes.Picture) object with the specified image file). + +* **Parameters:** + **path** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *or* [*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`. + + + +#### save(path) + +Wraps the [`Picture.save()`](supporting.md#ansys.grantami.core.mi_attribute_value_classes.Picture.save) method. + +* **Parameters:** + **path** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *or* [*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`. + + + +#### *property* binary_data *: [bytes](https://docs.python.org/3/library/stdtypes.html#bytes) | [None](https://docs.python.org/3/library/constants.html#None)* + +The binary data for the file. + +Binary data can be set with a bytes object or file buffer. + +* **Return type:** + [bytes](https://docs.python.org/3/library/stdtypes.html#bytes) or None +* **Raises:** + [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – If binary data is available on the server but has not been exported. + + + +#### *property* mime_file_type *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +MIME (Multipurpose Internet Mail Extensions) file type. + +If this object is populated via export, the `mime_file_type` property returns the MIME file type stored in +Granta MI. + +Setting this attribute value (via either `.load()`, setting the [`binary_data`](#ansys.grantami.core.mi_attribute_value_classes.AttributePicture.binary_data) property, or +setting the underlying `.object.binary_data`) will update the `mime_file_type` property using the +`filetype` library. If `filetype` cannot determine the MIME file type, the `mime_file_type` property is +set to [`None`](https://docs.python.org/3/library/constants.html#None) and Granta MI determines the MIME file type during import. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + +### Notes + +The [filetype PyPI page](https://pypi.org/project/filetype) lists supported MIME types. + + + +#### *property* url *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +URL of the hosted file. + +In a future version this property will raise an exception if the attribute is exported with +`include_binary_data = True`. See [Planned file and picture data changes](../release_notes/deprecations.md#planned-changes-file-picture) for more details. + +* **Returns:** + URL to the file stored in the parent Granta MI attribute, or [`None`](https://docs.python.org/3/library/constants.html#None) if the URL was not populated. +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + +### Notes + +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()`](table.md#ansys.grantami.core.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`](https://docs.python.org/3/library/constants.html#None). + + + +#### *property* value *: [bytes](https://docs.python.org/3/library/stdtypes.html#bytes) | [None](https://docs.python.org/3/library/constants.html#None)* + +The binary data of the hosted file, if exported. + +* **Return type:** + bytes or [`None`](https://docs.python.org/3/library/constants.html#None) +* **Raises:** + [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – If binary data is available on the server but has not been exported. In the next release, this behavior will + be deprecated. A later release will not raise an exception if the attribute is exported with + `include_binary_data = False`. Instead, the URL will be returned if the attribute is populated. See + [Planned file and picture data changes](../release_notes/deprecations.md#planned-changes-file-picture) for more details. + + + +### *class* AttributeFile + +Extended [`AttributeBinary`](#ansys.grantami.core.mi_attribute_value_classes.AttributeBinary) class to handle [`File`](supporting.md#ansys.grantami.core.mi_attribute_value_classes.File) objects. + +Provides access to [`File`](supporting.md#ansys.grantami.core.mi_attribute_value_classes.File) object save/load methods, file name, and description. + +### Notes + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`Record.attributes`](record.md#ansys.grantami.core.mi_record_classes.Record.attributes) to access instances of this class. + +Files of up to 500 MB in size may be stored in Granta MI databases. To upload files larger than 20 Mb using +Scripting Toolkit: + +* Granta MI Service Layer must be configured to allow large requests. If this is not configured, + [`Session.update()`](session.md#ansys.grantami.core.mi.Session.update) will raise a [`GRANTA_ServiceLayerError`](../foundation_api.md#ansys.grantami.backend.soap.GRANTA_Exceptions.GRANTA_ServiceLayerError) for a “413 Request Entity Too Large” HTTP + response. For more information, contact your Ansys Technical Representative. +* The Python client environment must have sufficient system resources to load and Base64-encode the binary data. If + there are insufficient system resources, unhandled Python exceptions may be raised. + + + +#### is_empty() + +Checks if the [`BinaryType`](supporting.md#ansys.grantami.core.mi_attribute_value_classes.BinaryType) object is populated by checking if it contains any binary data. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### load(path) + +Wraps the [`File.load()`](supporting.md#ansys.grantami.core.mi_attribute_value_classes.File.load) method (populates the [`File`](supporting.md#ansys.grantami.core.mi_attribute_value_classes.File) object with the specified file). + +* **Parameters:** + **path** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *or* [*pathlib.Path*](https://docs.python.org/3/library/pathlib.html#pathlib.Path)) – Path to the file to be imported. + Takes the form `C:\\Users\\yourname\\Documents\\file.pdf` or + `/home/username/Documents/file.pdf`. + + + +#### save(path) + +Wraps the [`File.save()`](supporting.md#ansys.grantami.core.mi_attribute_value_classes.File.save) method. + +* **Parameters:** + **path** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *or* [*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`. + + + +#### *property* binary_data *: [bytes](https://docs.python.org/3/library/stdtypes.html#bytes) | [None](https://docs.python.org/3/library/constants.html#None)* + +The binary data for the file. + +Binary data can be set with a bytes object or file buffer. + +* **Return type:** + [bytes](https://docs.python.org/3/library/stdtypes.html#bytes) or None +* **Raises:** + [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – If binary data is available on the server but has not been exported. + + + +#### *property* description *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +Description of the file displayed in MI applications. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) | None + + + +#### *property* file_name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Name of the file associated with the [`File`](supporting.md#ansys.grantami.core.mi_attribute_value_classes.File) object. + +Displayed in MI applications. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* mime_file_type *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +MIME (Multipurpose Internet Mail Extensions) file type. + +If this object is populated via export, the `mime_file_type` property returns the MIME file type stored in +Granta MI. + +Setting this attribute value (via either `.load()`, setting the [`binary_data`](#ansys.grantami.core.mi_attribute_value_classes.AttributeFile.binary_data) property, or +setting the underlying `.object.binary_data`) will update the `mime_file_type` property using the +`filetype` library. If `filetype` cannot determine the MIME file type, the `mime_file_type` property is +set to [`None`](https://docs.python.org/3/library/constants.html#None) and Granta MI determines the MIME file type during import. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + +### Notes + +The [filetype PyPI page](https://pypi.org/project/filetype) lists supported MIME types. + + + +#### *property* url *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +URL of the hosted file. + +In a future version this property will raise an exception if the attribute is exported with +`include_binary_data = True`. See [Planned file and picture data changes](../release_notes/deprecations.md#planned-changes-file-picture) for more details. + +* **Returns:** + URL to the file stored in the parent Granta MI attribute, or [`None`](https://docs.python.org/3/library/constants.html#None) if the URL was not populated. +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + +### Notes + +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()`](table.md#ansys.grantami.core.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`](https://docs.python.org/3/library/constants.html#None). + + + +#### *property* value *: [bytes](https://docs.python.org/3/library/stdtypes.html#bytes) | [None](https://docs.python.org/3/library/constants.html#None)* + +The binary data of the hosted file, if exported. + +* **Return type:** + bytes or [`None`](https://docs.python.org/3/library/constants.html#None) +* **Raises:** + [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – If binary data is available on the server but has not been exported. In the next release, this behavior will + be deprecated. A later release will not raise an exception if the attribute is exported with + `include_binary_data = False`. Instead, the URL will be returned if the attribute is populated. See + [Planned file and picture data changes](../release_notes/deprecations.md#planned-changes-file-picture) for more details. + + + +### *class* AttributeDate + +Extended [`AttributeValue`](#ansys.grantami.core.mi_attribute_value_classes.AttributeValue) class for date attributes. + +### Notes + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`Record.attributes`](record.md#ansys.grantami.core.mi_record_classes.Record.attributes) to access instances of this class. + + + +#### *property* value *: [date](https://docs.python.org/3/library/datetime.html#datetime.date) | [None](https://docs.python.org/3/library/constants.html#None)* + +Return the value of the date attribute as a [`datetime.date`](https://docs.python.org/3/library/datetime.html#datetime.date) object. + +Can be modified. Use [`datetime.date.fromisoformat()`](https://docs.python.org/3/library/datetime.html#datetime.date.fromisoformat) to create a date object from a string before +assigning to this property. + +* **Return type:** + [datetime.date](https://docs.python.org/3/library/datetime.html#datetime.date) or None +* **Raises:** + [**TypeError**](https://docs.python.org/3/library/exceptions.html#TypeError) – If providing a non-date value. + + + +### *class* AttributeDiscrete + +Extended [`AttributeValue`](#ansys.grantami.core.mi_attribute_value_classes.AttributeValue) class for discrete attributes. + +Base class for [`AttributeDiscreteSingle`](#ansys.grantami.core.mi_attribute_value_classes.AttributeDiscreteSingle) and [`AttributeDiscreteMulti`](#ansys.grantami.core.mi_attribute_value_classes.AttributeDiscreteMulti). + +### Notes + +Do not create instances of this class; it represents an abstract database structure. + + + +#### *property* is_multivalued *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Whether this attribute allows multiple values to be set. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* possible_discrete_values *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str)]* + +List of the attribute’s possible discrete data values. + +* **Return type:** + [list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str)] + + + +### *class* AttributeDiscreteSingle + +Extended [`AttributeValue`](#ansys.grantami.core.mi_attribute_value_classes.AttributeValue) class for discrete attributes. + +Provides access to the attribute’s data value as a string, and the order. + +### Notes + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`Record.attributes`](record.md#ansys.grantami.core.mi_record_classes.Record.attributes) to access instances of this class. + + + +#### *property* order *: [int](https://docs.python.org/3/library/functions.html#int) | [None](https://docs.python.org/3/library/constants.html#None)* + +Position of the current discrete value in the discrete type. + +Relevant for ordered discrete types. Read-only property. Index starts at 1. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) or None + + + +#### *property* value *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +Discrete value associated with this attribute. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None +* **Raises:** + * [**TypeError**](https://docs.python.org/3/library/exceptions.html#TypeError) – If providing a non-string value. + * [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – If the value is not in the list of possible discrete values. + + + +### *class* AttributeDiscreteMulti + +Extended [`AttributeDiscrete`](#ansys.grantami.core.mi_attribute_value_classes.AttributeDiscrete) class for multivalued discrete attributes. + +Provides access to the tuple of strings that store the attribute’s data values, and their order. + +### Notes + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`Record.attributes`](record.md#ansys.grantami.core.mi_record_classes.Record.attributes) to access instances of this class. + + + +#### is_empty() + +Checks whether the attribute value is populated. + +[`AttributeDiscreteMulti`](#ansys.grantami.core.mi_attribute_value_classes.AttributeDiscreteMulti) objects are empty if [`AttributeDiscreteMulti.value`](#ansys.grantami.core.mi_attribute_value_classes.AttributeDiscreteMulti.value) is [`None`](https://docs.python.org/3/library/constants.html#None) or an +empty tuple. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* order *: [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)[[int](https://docs.python.org/3/library/functions.html#int)] | [None](https://docs.python.org/3/library/constants.html#None)* + +Positions of the current discrete values in the discrete type. + +Relevant for ordered discrete types. Read-only property. Index starts at 1. + +* **Return type:** + [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)[[int](https://docs.python.org/3/library/functions.html#int)] or None + + + +#### *property* value *: [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)[[str](https://docs.python.org/3/library/stdtypes.html#str)] | [None](https://docs.python.org/3/library/constants.html#None)* + +Discrete value(s) associated with this attribute. + +To set to a single value, use a tuple with one item, such as `('item',)`. + +* **Return type:** + [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)[[str](https://docs.python.org/3/library/stdtypes.html#str)] or None +* **Raises:** + * [**TypeError**](https://docs.python.org/3/library/exceptions.html#TypeError) – If providing a string, a non-tuple value, or if any element in the tuple is not a string. + * [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – If one or more values are not in the list of possible discrete values. + + + +### *class* AttributeHyperlink + +Extended [`AttributeValue`](#ansys.grantami.core.mi_attribute_value_classes.AttributeValue) class for hyperlink attributes. + +Provides access to the `hyperlink_description` and `hyperlink_display` text properties. + +### Notes + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`Record.attributes`](record.md#ansys.grantami.core.mi_record_classes.Record.attributes) to access instances of this class. + + + +#### *property* hyperlink_description *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Text which displays instead of the URL in MI applications. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* hyperlink_display *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +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). + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) +* **Raises:** + [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – If providing an invalid hyperlink display style. + + + +#### *property* value *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +Returns the URL as a string, or None if unset. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + + + +### *class* AttributeInteger + +Extended [`AttributeValue`](#ansys.grantami.core.mi_attribute_value_classes.AttributeValue) class for integer attributes. + +### Notes + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`Record.attributes`](record.md#ansys.grantami.core.mi_record_classes.Record.attributes) to access instances of this class. + + + +#### *property* value *: [int](https://docs.python.org/3/library/functions.html#int) | [None](https://docs.python.org/3/library/constants.html#None)* + +Current value of the attribute. + +Can be modified. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) or None +* **Raises:** + * [**TypeError**](https://docs.python.org/3/library/exceptions.html#TypeError) – If providing a non-integer value. + * [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – If the value is too large (must be between -2,147,483,648 and 2,147,483,647). + + + +### *class* AttributeLogical + +Extended [`AttributeValue`](#ansys.grantami.core.mi_attribute_value_classes.AttributeValue) class for logical attributes. + +### Notes + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`Record.attributes`](record.md#ansys.grantami.core.mi_record_classes.Record.attributes) to access instances of this class. + + + +#### *property* value *: [bool](https://docs.python.org/3/library/functions.html#bool) | [None](https://docs.python.org/3/library/constants.html#None)* + +Current value of the attribute. + +Can be modified. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) or None + + + +### *class* AttributePoint + +Extended [`AttributeValue`](#ansys.grantami.core.mi_attribute_value_classes.AttributeValue) class for point data attributes. + +Base class for [`AttributePointSingle`](#ansys.grantami.core.mi_attribute_value_classes.AttributePointSingle) and [`AttributePointMulti`](#ansys.grantami.core.mi_attribute_value_classes.AttributePointMulti). + +### Notes + +Do not create instances of this class; it represents an abstract database structure. + + + +#### *property* is_estimated *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Whether the value has been estimated. + +Defaults to [`False`](https://docs.python.org/3/library/constants.html#False) for new attribute values. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* is_multivalued *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Whether this attribute allows multiple values to be set. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +### *class* AttributePointSingle + +Extended [`AttributePoint`](#ansys.grantami.core.mi_attribute_value_classes.AttributePoint) class for single-valued point data attributes. + +Provides access to the single scalar value. + +### Notes + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`Record.attributes`](record.md#ansys.grantami.core.mi_record_classes.Record.attributes) to access instances of this class. + + + +#### set_value(value) + +Sets the attribute value. + +This method is an alternative to setting the [`value`](#ansys.grantami.core.mi_attribute_value_classes.AttributePointSingle.value) property directly. It accepts any object that +implements the [`SupportsFloat`](https://docs.python.org/3/library/typing.html#typing.SupportsFloat) protocol and sets the attribute value to the result of the +conversion of the input value to a float. + +* **Parameters:** + **value** ([`SupportsFloat`](https://docs.python.org/3/library/typing.html#typing.SupportsFloat)) – Value to set. + + + +#### *property* default_unit *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +Attribute database unit in the active unit system. + +The unit used by MI Viewer or MI Explore to display this attribute in the active unit system. This +property is only affected by the unit system choice, and is not affected by [`Table.set_display_unit()`](table.md#ansys.grantami.core.mi_tree_classes.Table.set_display_unit). + +* **Returns:** + [`None`](https://docs.python.org/3/library/constants.html#None) if the attribute is dimensionless. +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + + + +#### *property* trailing_zero_information *: [TrailingZeroInformation](supporting.md#ansys.grantami.core.mi_meta_classes.TrailingZeroInformation) | [None](https://docs.python.org/3/library/constants.html#None)* + +Trailing zero information associated with the attribute value. + +This property is only populated for exported attribute values which include trailing zero information. To +include trailing zero information in an attribute value during import with the Scripting Toolkit, use a +[`ValueWithPrecision`](supporting.md#ansys.grantami.core.mi_meta_classes.ValueWithPrecision) to set the [`value`](#ansys.grantami.core.mi_attribute_value_classes.AttributePointSingle.value). + +* **Return type:** + [`TrailingZeroInformation`](supporting.md#ansys.grantami.core.mi_meta_classes.TrailingZeroInformation) or None + + + +#### *property* unit *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +Unit symbol of the attribute. + +Can be modified. [`None`](https://docs.python.org/3/library/constants.html#None) if the attribute is dimensionless. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + + + +#### *property* value *: [float](https://docs.python.org/3/library/functions.html#float) | [int](https://docs.python.org/3/library/functions.html#int) | [ValueWithPrecision](supporting.md#ansys.grantami.core.mi_meta_classes.ValueWithPrecision) | [None](https://docs.python.org/3/library/constants.html#None)* + +Point values associated with this attribute. + +* **Return type:** + float or int or [`ValueWithPrecision`](supporting.md#ansys.grantami.core.mi_meta_classes.ValueWithPrecision) or None +* **Raises:** + [**TypeError**](https://docs.python.org/3/library/exceptions.html#TypeError) – If providing a value that is not a float, int, or [`ValueWithPrecision`](supporting.md#ansys.grantami.core.mi_meta_classes.ValueWithPrecision). + + + +### *class* AttributePointMulti + +Extended [`AttributePoint`](#ansys.grantami.core.mi_attribute_value_classes.AttributePoint) class for multi-valued point data attributes. + +Multi-valued points are represented in the Streamlined API as tuples of [`ParameterizedPointValue`](supporting.md#ansys.grantami.core._mi_value_classes.ParameterizedPointValue) objects. + +### Notes + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`Record.attributes`](record.md#ansys.grantami.core.mi_record_classes.Record.attributes) to access instances of this class. + + + +#### is_empty() + +Checks whether the attribute value is populated. + +[`AttributePointMulti`](#ansys.grantami.core.mi_attribute_value_classes.AttributePointMulti) objects are empty if [`AttributePointMulti.value`](#ansys.grantami.core.mi_attribute_value_classes.AttributePointMulti.value) is [`None`](https://docs.python.org/3/library/constants.html#None) or an empty +tuple. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### set_value(values, parameters=None) + +Sets the [`value`](#ansys.grantami.core.mi_attribute_value_classes.AttributePointMulti.value) to a tuple of [`ParameterizedPointValue`](supporting.md#ansys.grantami.core._mi_value_classes.ParameterizedPointValue) built from values and parameters. + +Arguments `values` and `parameters` must be Sequences of equal lengths. + +* **Parameters:** + * **values** (Sequence[SupportsFloat | [`ValueWithPrecision`](supporting.md#ansys.grantami.core.mi_meta_classes.ValueWithPrecision)]) – Point values. + * **parameters** (*Sequence* *[**Mapping* *[*[*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* [*str*](https://docs.python.org/3/library/stdtypes.html#str) *|* [*float*](https://docs.python.org/3/library/functions.html#float) *]* *] or* *None* *,* *optional*) – Parameter values for each point in values. If [`None`](https://docs.python.org/3/library/constants.html#None), values are set without parameter values. + +### Examples + +Attribute value without parameter values: + +```pycon +>>> multivalued_point_attribute: AttributePointMulti +>>> multivalued_point_attribute.set_value([1.0, 2, 3.0]) +>>> multivalued_point_attribute.value +(ParameterizedPointValue(value=1.0, parameters=()), +ParameterizedPointValue(value=2.0, parameters=()), +ParameterizedPointValue(value=3.0, parameters=())) +``` + +Attribute value with parameter values for the first value only: + +```pycon +>>> multivalued_point_attribute: AttributePointMulti +>>> multivalued_point_attribute.set_value([1.0, 2, 3.0], [{"Temperature": 25.0, "Statistical basis": "A-basis"}, {}, {}]) +>>> multivalued_point_attribute.value +(ParameterizedPointValue(value=1.0, parameters=(PointParameterValue(name='Temperature', value=25.0), PointParameterValue(name='Statistical basis', value='A-basis'))), +ParameterizedPointValue(value=2.0, parameters=()), +ParameterizedPointValue(value=3.0, parameters=())) +``` + + + +#### *property* default_unit *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +Attribute database unit in the active unit system. + +The unit used by MI Viewer or MI Explore to display this attribute in the active unit system. This +property is only affected by the unit system choice, and is not affected by [`Table.set_display_unit()`](table.md#ansys.grantami.core.mi_tree_classes.Table.set_display_unit). + +* **Returns:** + [`None`](https://docs.python.org/3/library/constants.html#None) if the attribute is dimensionless. +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + + + +#### *property* parameters *: mappingproxy[[str](https://docs.python.org/3/library/stdtypes.html#str), [PointValueParameter](supporting.md#ansys.grantami.core.mi_attribute_value_classes.PointValueParameter)]* + +Parameters associated with the point data attribute, indexed by name. + +Modify the [`PointValueParameter.unit`](supporting.md#ansys.grantami.core.mi_attribute_value_classes.PointValueParameter.unit) property on the returned objects to specify a different unit for +import. + +* **Returns:** + Read-only mapping of parameters +* **Return type:** + [`MappingProxyType`](https://docs.python.org/3/library/types.html#types.MappingProxyType) [str, [`PointValueParameter`](supporting.md#ansys.grantami.core.mi_attribute_value_classes.PointValueParameter)] + + + +#### *property* points *: [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)[[float](https://docs.python.org/3/library/functions.html#float), ...]* + +Read-only view of point values currently set on the attribute value. + +The returned value does not include parameter values and converts [`ValueWithPrecision`](supporting.md#ansys.grantami.core.mi_meta_classes.ValueWithPrecision) to float. + +* **Return type:** + [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)[[float](https://docs.python.org/3/library/functions.html#float), …] + +### Examples + +For a multi-valued point attribute named `Modulus`, with parameters `Temperature` and `Statistical basis`: + +```pycon +>>> multivalued_point_attribute: AttributePointMulti +>>> multivalued_point_attribute.value = ( +... ParameterizedPointValue( +... value=1.0, +... parameters=( +... PointParameterValue("Temperature", 25.0), +... PointParameterValue("Statistical basis", "A-basis"), +... ), +... ), +... ParameterizedPointValue(value=2.0), +... ) +>>> multivalued_point_attribute.points +(1.0, 2.0) +``` + + + +#### *property* trailing_zero_information *: [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)[[TrailingZeroInformation](supporting.md#ansys.grantami.core.mi_meta_classes.TrailingZeroInformation) | [None](https://docs.python.org/3/library/constants.html#None), ...] | [None](https://docs.python.org/3/library/constants.html#None)* + +Trailing zero information associated with the attribute value. + +This property is only populated for exported attribute values which include trailing zero information. To +include trailing zero information in an attribute value during import with the Scripting Toolkit, use +[`ValueWithPrecision`](supporting.md#ansys.grantami.core.mi_meta_classes.ValueWithPrecision) in [`value`](#ansys.grantami.core.mi_attribute_value_classes.AttributePointMulti.value). + +* **Return type:** + [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)[[*TrailingZeroInformation*](supporting.md#ansys.grantami.core.mi_meta_classes.TrailingZeroInformation) | None] | None + + + +#### *property* unit *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +Unit symbol of the attribute. + +Can be modified. [`None`](https://docs.python.org/3/library/constants.html#None) if the attribute is dimensionless. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + + + +#### *property* value *: [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)[[ParameterizedPointValue](supporting.md#ansys.grantami.core._mi_value_classes.ParameterizedPointValue), ...]* + +Point values associated with this attribute. + +* **Return type:** + [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)[[ParameterizedPointValue](supporting.md#ansys.grantami.core._mi_value_classes.ParameterizedPointValue), …] + +### Examples + +For a multi-valued point attribute named `Modulus`, with parameters `Temperature` and `Statistical basis`: + +```pycon +>>> multivalued_point_attribute: AttributePointMulti +>>> multivalued_point_attribute.value = ( +... ParameterizedPointValue( +... value=1.0, +... parameters=( +... PointParameterValue("Temperature", 25.0), +... PointParameterValue("Statistical basis", "A-basis"), +... ), +... ), +... ParameterizedPointValue(value=2.0), +... ) +>>> multivalued_point_attribute.value +(ParameterizedPointValue(value=1.0, parameters=(PointParameterValue(name='Temperature', value=25.0), PointParameterValue(name='Statistical basis', value='A-basis'))), +ParameterizedPointValue(value=2.0, parameters=())) +``` + + + +### *class* AttributeRange + +Extended [`AttributeValue`](#ansys.grantami.core.mi_attribute_value_classes.AttributeValue) class for range data attributes. + +### Notes + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`Record.attributes`](record.md#ansys.grantami.core.mi_record_classes.Record.attributes) to access instances of this class. + + + +#### *property* default_unit *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +Attribute database unit in the active unit system. + +The unit used by MI Viewer or MI Explore to display this attribute in the active unit system. This +property is only affected by the unit system choice, and is not affected by [`Table.set_display_unit()`](table.md#ansys.grantami.core.mi_tree_classes.Table.set_display_unit). + +* **Returns:** + [`None`](https://docs.python.org/3/library/constants.html#None) if the attribute is dimensionless. +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + + + +#### *property* high *: [float](https://docs.python.org/3/library/functions.html#float) | [ValueWithPrecision](supporting.md#ansys.grantami.core.mi_meta_classes.ValueWithPrecision) | [None](https://docs.python.org/3/library/constants.html#None)* + +High value of the range. + +Read-only property. Proxies to [`Range.high`](supporting.md#ansys.grantami.core._mi_value_classes.Range.high) on the attribute [`value`](#ansys.grantami.core.mi_attribute_value_classes.AttributeRange.value). + +* **Return type:** + float or [`ValueWithPrecision`](supporting.md#ansys.grantami.core.mi_meta_classes.ValueWithPrecision) or None +* **Raises:** + [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – If the attribute value is empty. + + + +#### *property* high_value_is_inclusive *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Whether the high value is included in the range. + +Read-only property. Proxies to [`Range.high_value_is_inclusive`](supporting.md#ansys.grantami.core._mi_value_classes.Range.high_value_is_inclusive) on the attribute [`value`](#ansys.grantami.core.mi_attribute_value_classes.AttributeRange.value). + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) +* **Raises:** + [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – If the attribute value is empty. + + + +#### *property* high_value_trailing_zero_information *: [TrailingZeroInformation](supporting.md#ansys.grantami.core.mi_meta_classes.TrailingZeroInformation) | [None](https://docs.python.org/3/library/constants.html#None)* + +Trailing zero information associated with the high value. + +This property is only populated for exported attribute values which include trailing zero information. To +include trailing zero information in an attribute value during import with the Scripting Toolkit, use a +[`ValueWithPrecision`](supporting.md#ansys.grantami.core.mi_meta_classes.ValueWithPrecision) object to set the [`value`](#ansys.grantami.core.mi_attribute_value_classes.AttributeRange.value). + +* **Return type:** + [`TrailingZeroInformation`](supporting.md#ansys.grantami.core.mi_meta_classes.TrailingZeroInformation) or None + + + +#### *property* is_estimated *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Whether the value has been estimated. + +Defaults to [`False`](https://docs.python.org/3/library/constants.html#False) for new attribute values. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* low *: [float](https://docs.python.org/3/library/functions.html#float) | [ValueWithPrecision](supporting.md#ansys.grantami.core.mi_meta_classes.ValueWithPrecision) | [None](https://docs.python.org/3/library/constants.html#None)* + +Low value of the range. + +Read-only property. Proxies to [`Range.low`](supporting.md#ansys.grantami.core._mi_value_classes.Range.low) on the attribute [`value`](#ansys.grantami.core.mi_attribute_value_classes.AttributeRange.value). + +* **Return type:** + float or [`ValueWithPrecision`](supporting.md#ansys.grantami.core.mi_meta_classes.ValueWithPrecision) or None +* **Raises:** + [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – If the attribute value is empty. + + + +#### *property* low_value_is_inclusive *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Whether the low value is included in the range. + +Read-only property. Proxies to [`Range.low_value_is_inclusive`](supporting.md#ansys.grantami.core._mi_value_classes.Range.low_value_is_inclusive) on the attribute [`value`](#ansys.grantami.core.mi_attribute_value_classes.AttributeRange.value). + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) +* **Raises:** + [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – If the attribute value is empty. + + + +#### *property* low_value_trailing_zero_information *: [TrailingZeroInformation](supporting.md#ansys.grantami.core.mi_meta_classes.TrailingZeroInformation) | [None](https://docs.python.org/3/library/constants.html#None)* + +Trailing zero information associated with the low value. + +This property is only populated for exported attribute values which include trailing zero information. To +include trailing zero information in an attribute value during import with the Scripting Toolkit, use a +[`ValueWithPrecision`](supporting.md#ansys.grantami.core.mi_meta_classes.ValueWithPrecision) object to set the [`value`](#ansys.grantami.core.mi_attribute_value_classes.AttributeRange.value). + +* **Return type:** + [`TrailingZeroInformation`](supporting.md#ansys.grantami.core.mi_meta_classes.TrailingZeroInformation) or None + + + +#### *property* unit *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +Unit symbol of the attribute. + +Can be modified. [`None`](https://docs.python.org/3/library/constants.html#None) if the attribute is dimensionless. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + + + +#### *property* value *: [Range](supporting.md#ansys.grantami.core._mi_value_classes.Range) | [None](https://docs.python.org/3/library/constants.html#None)* + +Current value of the attribute. + +Can be modified. + +* **Return type:** + [`Range`](supporting.md#ansys.grantami.core._mi_value_classes.Range) or None +* **Raises:** + [**TypeError**](https://docs.python.org/3/library/exceptions.html#TypeError) – If providing a value that is not a Range instance. + + + +### *class* AttributeTabular + +Extended [`AttributeValue`](#ansys.grantami.core.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 +Linked functional columns are not supported in tabular attributes. Exported cells are represented as +[`UnsupportedType`](supporting.md#ansys.grantami.core.mi_attribute_value_classes.UnsupportedType) + +Importing an empty tabular attribute is deprecated. Instead: + +* To delete all rows in an existing tabular attribute, use the [`Record.clear_attributes`](record.md#ansys.grantami.core.mi_record_classes.Record.clear_attributes) method to delete + the attribute value. +* To mark the attribute as Not Applicable, set the [`AttributeValue.is_applicable`](#ansys.grantami.core.mi_attribute_value_classes.AttributeValue.is_applicable) property to `False`. + +Use the [`AttributeTabular.shape`](#ansys.grantami.core.mi_attribute_value_classes.AttributeTabular.shape) property to determine the current number of rows in the tabular +attribute. + +### Notes + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`Record.attributes`](record.md#ansys.grantami.core.mi_record_classes.Record.attributes) to access instances of this class. + + + +#### append_row(linking_value=None) + +Appends a new unpopulated row, and sets the linking value for that row if one is provided. + +* **Parameters:** + **linking_value** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* *optional*) – Linking value for the new row. + + + +#### delete_row(index) + +Removes the row at the specified index. + +* **Parameters:** + **index** ([*int*](https://docs.python.org/3/library/functions.html#int)) – Index of the row to delete. + +### Examples + +`delete_row(0)` deletes the first row. + + + +#### enable_destructive_editing() + +Enable destructive editing of the tabular data. + +* **Warns:** + **UserWarning** – If unexported binary data is present in any of the tabular cells. + +#### WARNING +Destructive editing removes existing rows and creates new ones. Destructive editing should be avoided because: + +* This can be slow for attributes with File or Picture attributes, especially if many rows are present. +* Users of Data Updater will face conflicts when applying subsequent updates. + +If destructive editing is performed while unexported binary data is present, a +[`UnexportedBinaryDataError`](exceptions.md#ansys.grantami.core.mi_meta_classes.UnexportedBinaryDataError) is raised on import. See [`Table.bulk_fetch()`](table.md#ansys.grantami.core.mi_tree_classes.Table.bulk_fetch) for more information. + +#### SEE ALSO +[`is_destructive_editing_allowed`](#ansys.grantami.core.mi_attribute_value_classes.AttributeTabular.is_destructive_editing_allowed) +: Whether destructive editing of the tabular attribute value is allowed. + +[`destructively_edited`](#ansys.grantami.core.mi_attribute_value_classes.AttributeTabular.destructively_edited) +: Whether destructive editing has been performed. + +### Notes + +The following actions are considered destructive: + +* [`AttributeTabular.swap_rows()`](#ansys.grantami.core.mi_attribute_value_classes.AttributeTabular.swap_rows) +* [`TabularRow.set_linking_value()`](tabular.md#ansys.grantami.core.mi_attribute_value_classes.TabularRow.set_linking_value) for an exported row + +Destructive editing may be forced for a tabular attribute by calling [`force_destructive_editing()`](#ansys.grantami.core.mi_attribute_value_classes.AttributeTabular.force_destructive_editing) before +importing the data. + + + +#### force_destructive_editing() + +Force destructive editing of the tabular data. + +See [`enable_destructive_editing()`](#ansys.grantami.core.mi_attribute_value_classes.AttributeTabular.enable_destructive_editing) for warnings associated with destructive editing. This method should +only be used for cases where destructive editing is absolutely necessary and is not triggered automatically. + +* **Warns:** + **UserWarning** – If unexported binary data is present in any of the tabular cells. + +### Notes + +If destructive editing is performed while unexported binary data is present, a +[`UnexportedBinaryDataError`](exceptions.md#ansys.grantami.core.mi_meta_classes.UnexportedBinaryDataError) is raised on import. See [`Table.bulk_fetch()`](table.md#ansys.grantami.core.mi_tree_classes.Table.bulk_fetch) for more information. + + + +#### is_empty() + +Checks whether the attribute value is populated. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### load() + +Loads exported tabular data. + +Exported data is generally lazily loaded by any property of the tabular that requires it. This method can be +used to explicitly load the exported data or to discard staged user modifications and reset the attribute value +to the exported data. + + + +#### show() + +Displays the data as an ascii-art style table. + + + +#### swap_rows(row1, row2) + +Change the positions of two rows with indices `row1` and `row2`. + +* **Parameters:** + * **row1** ([*int*](https://docs.python.org/3/library/functions.html#int)) – Index of the first row. + * **row2** ([*int*](https://docs.python.org/3/library/functions.html#int)) – Index of the second row. +* **Raises:** + [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – If destructive editing is not enabled. + +#### WARNING +The swap_rows operation is considered destructive and will trigger a complete re-import of the tabular data +which may be slow, and will prevent Data Updater from tracking row-level updates to the tabular data. It is +disabled by default. To enable this action, call the method [`enable_destructive_editing()`](#ansys.grantami.core.mi_attribute_value_classes.AttributeTabular.enable_destructive_editing) before calling +this method. + +#### SEE ALSO +[`is_destructive_editing_allowed`](#ansys.grantami.core.mi_attribute_value_classes.AttributeTabular.is_destructive_editing_allowed) +: Whether destructive editing of the tabular attribute value is allowed. + +### Examples + +Swap the first and fifth rows in the Tabular data structure `my_data`: + +```python +my_data.swap_rows(0, 4) +``` + + + +#### *property* column_types *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str)]* + +Data type in each column. + +* **Returns:** + Only populated for local, linked attribute, or linked column tabular columns. The element will be an empty + string otherwise. +* **Return type:** + [list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str)] + +### Examples + +`['STXT', 'POIN', 'DISC', '', '']` + + + +#### *property* columns *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str)]* + +List of columns in the tabular data. + +* **Return type:** + [list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str)] + + + +#### *property* definition *: [AttributeDefinitionTabular](attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinitionTabular)* + +The attribute definition associated with this attribute value. + +* **Return type:** + [`AttributeDefinition`](attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinition) + + + +#### *property* destructively_edited *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Whether the tabular data has been destructively edited. + +If the value of this property is [`False`](https://docs.python.org/3/library/constants.html#False) then imports will be safe to use with Data Updater. + +#### SEE ALSO +[`enable_destructive_editing()`](#ansys.grantami.core.mi_attribute_value_classes.AttributeTabular.enable_destructive_editing) +: Enable destructive editing of the tabular data. + +* **Returns:** + [`True`](https://docs.python.org/3/library/constants.html#True) if destructive editing is enabled and any actions have been taken that require destructive + editing. [`False`](https://docs.python.org/3/library/constants.html#False) if no destructive actions have been taken or if destructive editing is not + enabled. +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* is_destructive_editing_allowed *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Whether destructive editing of the tabular data is allowed. + +By default, destructive editing is not allowed. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + +#### SEE ALSO +[`enable_destructive_editing()`](#ansys.grantami.core.mi_attribute_value_classes.AttributeTabular.enable_destructive_editing) +: Enable destructive editing of the tabular data. + + + +#### *property* linked_columns *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[bool](https://docs.python.org/3/library/functions.html#bool)]* + +Whether each column is linked or not. + +* **Return type:** + [list](https://docs.python.org/3/library/stdtypes.html#list)[[bool](https://docs.python.org/3/library/functions.html#bool)] + + + +#### *property* linked_records *: [dict](https://docs.python.org/3/library/stdtypes.html#dict)[[str](https://docs.python.org/3/library/stdtypes.html#str), [list](https://docs.python.org/3/library/stdtypes.html#list)[[Record](record.md#ansys.grantami.core.mi_record_classes.Record)]]* + +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`](attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinitionTabular.ignore_linked_records) was set to [`True`](https://docs.python.org/3/library/constants.html#True) before data export. + +* **Return type:** + dict[str, list[[`Record`](record.md#ansys.grantami.core.mi_record_classes.Record)]] + + + +#### *property* linking_attribute *: [AttributeDefinition](attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinition) | [None](https://docs.python.org/3/library/constants.html#None)* + +Short text-type attribute used to link rows in the tabular data attribute to records. + +* **Returns:** + [`AttributeDefinition`](attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinition) object. [`None`](https://docs.python.org/3/library/constants.html#None) for purely local tabular data. +* **Return type:** + [AttributeDefinition](attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinition) or None + + + +#### *property* linking_table *: [Table](table.md#ansys.grantami.core.mi_tree_classes.Table) | [None](https://docs.python.org/3/library/constants.html#None)* + +[`Table`](table.md#ansys.grantami.core.mi_tree_classes.Table) object which the linking attribute belongs to. + +* **Returns:** + [`Table`](table.md#ansys.grantami.core.mi_tree_classes.Table) object. [`None`](https://docs.python.org/3/library/constants.html#None) for purely local tabular data. +* **Return type:** + [Table](table.md#ansys.grantami.core.mi_tree_classes.Table) or None + + + +#### *property* rows *: [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)[[TabularRow](tabular.md#ansys.grantami.core.mi_attribute_value_classes.TabularRow), ...]* + +Returns a tuple of [`TabularRow`](tabular.md#ansys.grantami.core.mi_attribute_value_classes.TabularRow) objects representing each row in the tabular data. + +* **Return type:** + tuple[[`TabularRow`](tabular.md#ansys.grantami.core.mi_attribute_value_classes.TabularRow), …] + + + +#### *property* shape *: [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)[[int](https://docs.python.org/3/library/functions.html#int), [int](https://docs.python.org/3/library/functions.html#int)]* + +Number of rows by number of columns. + +* **Return type:** + [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)[[int](https://docs.python.org/3/library/functions.html#int), [int](https://docs.python.org/3/library/functions.html#int)] + + + +#### *property* value *: [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)[[tuple](https://docs.python.org/3/library/stdtypes.html#tuple)[[str](https://docs.python.org/3/library/stdtypes.html#str) | [int](https://docs.python.org/3/library/functions.html#int) | [bool](https://docs.python.org/3/library/functions.html#bool) | [date](https://docs.python.org/3/library/datetime.html#datetime.date) | [MappingProxyType](https://docs.python.org/3/library/types.html#types.MappingProxyType) | [HyperlinkValue](tabular.md#ansys.grantami.core._mi_tabular_value_classes.HyperlinkValue) | [PictureValue](tabular.md#ansys.grantami.core._mi_tabular_value_classes.PictureValue) | [FileValue](tabular.md#ansys.grantami.core._mi_tabular_value_classes.FileValue) | [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)[[float](https://docs.python.org/3/library/functions.html#float)] | [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)[[str](https://docs.python.org/3/library/stdtypes.html#str)] | [None](https://docs.python.org/3/library/constants.html#None) | [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)[[str](https://docs.python.org/3/library/stdtypes.html#str) | [int](https://docs.python.org/3/library/functions.html#int) | [bool](https://docs.python.org/3/library/functions.html#bool) | [date](https://docs.python.org/3/library/datetime.html#datetime.date) | [MappingProxyType](https://docs.python.org/3/library/types.html#types.MappingProxyType) | [HyperlinkValue](tabular.md#ansys.grantami.core._mi_tabular_value_classes.HyperlinkValue) | [PictureValue](tabular.md#ansys.grantami.core._mi_tabular_value_classes.PictureValue) | [FileValue](tabular.md#ansys.grantami.core._mi_tabular_value_classes.FileValue) | [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)[[float](https://docs.python.org/3/library/functions.html#float)] | [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)[[str](https://docs.python.org/3/library/stdtypes.html#str)] | [None](https://docs.python.org/3/library/constants.html#None)]]]* + +Raw data for the attribute. + +Data is organized as a tuple of tuples: + +* The items in the outer tuple represent a row, and so the length of the outer tuple corresponds to the number + of rows in the tabular attribute. +* The items in each inner tuple represent a cell, and so the lengths of the inner tuples correspond to the + number of columns in the tabular attribute. + +* **Return type:** + tuple[tuple[str | int | bool | datetime.date | MappingProxyType | [`HyperlinkValue`](tabular.md#ansys.grantami.core._mi_tabular_value_classes.HyperlinkValue) | [`PictureValue`](tabular.md#ansys.grantami.core._mi_tabular_value_classes.PictureValue) | [`FileValue`](tabular.md#ansys.grantami.core._mi_tabular_value_classes.FileValue) | tuple | None]] + +### Notes + +When exporting data as a read user, this property may omit rows for the following reasons: + +* If a row is completely empty. +* If a row contains no local data and has a linking value which does not exist in the target table. +* If a row contains no local data and has a linking value which exists in the target table, but all linked + records are inaccessible to the user because of version control or access control. + +When exporting data as a write user or above, this property will include all rows. + + + +### *class* AttributeShortText + +Extended [`AttributeValue`](#ansys.grantami.core.mi_attribute_value_classes.AttributeValue) class for short text attributes. + +### Notes + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`Record.attributes`](record.md#ansys.grantami.core.mi_record_classes.Record.attributes) to access instances of this class. + + + +#### *property* value *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +Current value of the attribute. + +Can be modified. Short text values can be at most 255 characters long. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None +* **Raises:** + [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – If the value is too long. + + + +### *class* AttributeLongText + +Extended [`AttributeValue`](#ansys.grantami.core.mi_attribute_value_classes.AttributeValue) class for long text attributes. + +### Notes + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`Record.attributes`](record.md#ansys.grantami.core.mi_record_classes.Record.attributes) to access instances of this class. + + + +#### *property* value *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +Current value of the attribute. + +Can be modified. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + + + +### *class* AttributeFunctionalSeriesPoint + +Attribute value class for point series functional data. + +### Notes + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`Record.attributes`](record.md#ansys.grantami.core.mi_record_classes.Record.attributes) to access instances of this class. + + + +#### generate_grid_version(create_empty=False) + +Convert this object to the equivalent grid functional attribute value object and return the result. + +* **Parameters:** + **create_empty** ([*bool*](https://docs.python.org/3/library/functions.html#bool) *,* *optional*) – Whether to create an empty object. Default is [`False`](https://docs.python.org/3/library/constants.html#False). +* **Returns:** + New instance of a grid functional attribute value. +* **Return type:** + [`AttributeFunctionalGridPoint`](#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalGridPoint) +* **Raises:** + [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – If data cannot be represented as grid functional data. + +### Notes + +If `create_empty` is [`True`](https://docs.python.org/3/library/constants.html#True), an empty functional attribute value is returned. + +If `create_empty` is [`False`](https://docs.python.org/3/library/constants.html#False), the following information is copied to the new functional attribute value: + +* [`value`](#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalSeriesPoint.value) (converted to [`GridPoint`](supporting.md#ansys.grantami.core._mi_value_classes.GridPoint)) +* [`unit`](#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalSeriesPoint.unit) +* [`parameters`](#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalSeriesPoint.parameters) +* [`is_applicable`](#ansys.grantami.core.mi_attribute_value_classes.AttributeValue.is_applicable) + +If this method is used with data that cannot be represented as grid functional data, conversion will fail with +a [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError). + +Series functional data can be defined with multiple points sharing the same set of parameter values. These may +occur with hysteresis curves or multiple series without distinguishing parameters. Such data cannot be +represented as grid data. + +Series with identical parameter values, or with no parameter values, can be converted to grid functional data as +long as all points have unique x-axis values. However, information about which series the points used to belong +to will be lost. + + + +#### is_empty() + +Checks whether the attribute value is populated. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### set_value(value) + +Set the current value of the attribute. + +This method is an alternative to setting the [`value`](#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalSeriesPoint.value) property directly, and accepts any sequence type. + +* **Parameters:** + **value** (Sequence[[`SeriesPoint`](supporting.md#ansys.grantami.core._mi_value_classes.SeriesPoint)]) – New value for the attribute. + + + +#### with_new_x_axis(parameter_name, create_empty=False) + +Generate an empty attribute value of the same type with another parameter as X-axis. + +* **Parameters:** + * **parameter_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – Name of the parameter to use as X-axis. + * **create_empty** ([*bool*](https://docs.python.org/3/library/functions.html#bool) *,* *optional*) – Whether to create an empty attribute value or copy existing data. Default is [`False`](https://docs.python.org/3/library/constants.html#False). +* **Returns:** + New instance of functional attribute of identical type. +* **Return type:** + [`AttributeFunctionalSeriesPoint`](#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalSeriesPoint) +* **Raises:** + [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – If the name is not a valid parameter. + +### Notes + +If `create_empty` is [`True`](https://docs.python.org/3/library/constants.html#True), an empty functional attribute value is returned. + +If `create_empty` is [`False`](https://docs.python.org/3/library/constants.html#False), the following information is copied to the new functional attribute value: + +* [`unit`](#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalSeriesPoint.unit) +* [`parameters`](#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalSeriesPoint.parameters) +* [`is_applicable`](#ansys.grantami.core.mi_attribute_value_classes.AttributeValue.is_applicable) +* [`show_as_table`](#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalSeriesPoint.show_as_table) +* [`log_yaxis`](#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalSeriesPoint.log_yaxis) + + + +#### *property* log_yaxis *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Whether the Y axis is using a logarithmic scale. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* parameters *: mappingproxy[[str](https://docs.python.org/3/library/stdtypes.html#str), [FunctionalValueParameter](supporting.md#ansys.grantami.core.mi_attribute_value_classes.FunctionalValueParameter)]* + +Parameters associated with the functional data attribute, indexed by name. + +Modify the [`FunctionalValueParameter.unit`](supporting.md#ansys.grantami.core.mi_attribute_value_classes.FunctionalValueParameter.unit) property on the returned objects to specify a different unit +for import. + +* **Returns:** + Read-only mapping of parameters associated with this functional value. +* **Return type:** + [`MappingProxyType`](https://docs.python.org/3/library/types.html#types.MappingProxyType) [str, [`FunctionalValueParameter`](supporting.md#ansys.grantami.core.mi_attribute_value_classes.FunctionalValueParameter)] + + + +#### *property* show_as_table *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Whether the attribute should be displayed as a table. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* table_view *: [FunctionalSeriesPointTableView](supporting.md#ansys.grantami.core.mi_attribute_value_classes.FunctionalSeriesPointTableView)* + +Supports additional read-only views of the attribute value. + +* **Return type:** + [`FunctionalSeriesPointTableView`](supporting.md#ansys.grantami.core.mi_attribute_value_classes.FunctionalSeriesPointTableView) + + + +#### *property* unit *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Unit symbol for the y-axis. + +For the x-axis parameter or constraint parameters, use [`unit`](supporting.md#ansys.grantami.core.mi_attribute_value_classes.FunctionalValueParameter.unit) on +`FunctionalValueParameter` objects provided by the [`parameters`](#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalSeriesPoint.parameters) property. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + + + +#### *property* value *: [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)[[SeriesPoint](supporting.md#ansys.grantami.core._mi_value_classes.SeriesPoint), ...]* + +Current value of the attribute. + +Can be modified. + +#### Versionchanged +Changed in version 5.0: This property now accepts as input and returns a structured representation of a functional attribute value. +[`table_view`](#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalSeriesPoint.table_view) provides properties to obtain the value in the format +previously returned by this property. + +* **Return type:** + tuple[[`SeriesPoint`](supporting.md#ansys.grantami.core._mi_value_classes.SeriesPoint), …] +* **Raises:** + * [**TypeError**](https://docs.python.org/3/library/exceptions.html#TypeError) – If providing a value that is not a tuple of SeriesPoint objects. + * [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – If the value defines series with incompatible parameters or invalid parameter names. + + + +#### *property* x_axis *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Name of the parameter used as the x-axis for the attribute value. + +Data exported from Granta MI may define a different x-axis parameter than the default x-axis parameter set in +the attribute definition. To import data with a different x-axis parameter, use [`with_new_x_axis()`](#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalSeriesPoint.with_new_x_axis). + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +### *class* AttributeFunctionalSeriesRange + +Attribute value class for series range functional data. + +### Notes + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`Record.attributes`](record.md#ansys.grantami.core.mi_record_classes.Record.attributes) to access instances of this class. + + + +#### generate_grid_version(create_empty=False) + +Convert this object to the equivalent grid functional attribute value object and return the result. + +* **Parameters:** + **create_empty** ([*bool*](https://docs.python.org/3/library/functions.html#bool) *,* *optional*) – Whether to create an empty object. Default is [`False`](https://docs.python.org/3/library/constants.html#False). +* **Returns:** + New instance of a grid functional attribute value. +* **Return type:** + [`AttributeFunctionalGridRange`](#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalGridRange) +* **Raises:** + [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – If data cannot be represented as grid functional data. + +### Notes + +If `create_empty` is [`True`](https://docs.python.org/3/library/constants.html#True), an empty functional attribute value is returned. + +If `create_empty` is [`False`](https://docs.python.org/3/library/constants.html#False), the following information is copied to the new functional attribute value: + +* [`value`](#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalSeriesRange.value) (converted to [`GridRange`](supporting.md#ansys.grantami.core._mi_value_classes.GridRange)) +* [`unit`](#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalSeriesRange.unit) +* [`parameters`](#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalSeriesRange.parameters) +* [`is_applicable`](#ansys.grantami.core.mi_attribute_value_classes.AttributeValue.is_applicable) + +Series functional data can be defined with multiple points sharing the same set of parameter values. These may +occur with hysteresis curves or multiple series without distinguishing parameters. Such data cannot be +represented as grid data. If this method is used with data that cannot be represented as grid functional data, +conversion will fail with a [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError). + +Series with identical parameter values, or with no parameter values can be converted to grid functional as long +as all points have unique x-axis values. + + + +#### is_empty() + +Checks whether the attribute value is populated. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### set_value(value) + +Set the current value of the attribute. + +This method is an alternative to setting the [`value`](#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalSeriesRange.value) property directly, and accepts any Sequence type. + +* **Parameters:** + **value** (Sequence[[`SeriesRange`](supporting.md#ansys.grantami.core._mi_value_classes.SeriesRange)]) – New value for the attribute. + + + +#### with_new_x_axis(parameter_name, create_empty=False) + +Generate an empty attribute value of the same type with another parameter as X-axis. + +* **Parameters:** + * **parameter_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – Name of the parameter to use as X-axis. + * **create_empty** ([*bool*](https://docs.python.org/3/library/functions.html#bool) *,* *optional*) – Whether to create an empty attribute value or copy existing data. Default is [`False`](https://docs.python.org/3/library/constants.html#False). +* **Returns:** + New instance of functional attribute of identical type. +* **Return type:** + [`AttributeFunctionalSeriesRange`](#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalSeriesRange) +* **Raises:** + [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – If the name is not a valid parameter. + +### Notes + +If `create_empty` is [`True`](https://docs.python.org/3/library/constants.html#True), an empty functional attribute value is returned. + +If `create_empty` is [`False`](https://docs.python.org/3/library/constants.html#False), the following information is copied to the new functional attribute value: + +* [`unit`](#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalSeriesRange.unit) +* [`parameters`](#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalSeriesRange.parameters) +* [`is_applicable`](#ansys.grantami.core.mi_attribute_value_classes.AttributeValue.is_applicable) +* [`show_as_table`](#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalSeriesRange.show_as_table) +* [`log_yaxis`](#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalSeriesRange.log_yaxis) + + + +#### *property* log_yaxis *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Whether the Y axis is using a logarithmic scale. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* parameters *: mappingproxy[[str](https://docs.python.org/3/library/stdtypes.html#str), [FunctionalValueParameter](supporting.md#ansys.grantami.core.mi_attribute_value_classes.FunctionalValueParameter)]* + +Parameters associated with the functional data attribute, indexed by name. + +Modify the [`FunctionalValueParameter.unit`](supporting.md#ansys.grantami.core.mi_attribute_value_classes.FunctionalValueParameter.unit) property on the returned objects to specify a different unit +for import. + +* **Returns:** + Read-only mapping of parameters associated with this functional value. +* **Return type:** + [`MappingProxyType`](https://docs.python.org/3/library/types.html#types.MappingProxyType) [str, [`FunctionalValueParameter`](supporting.md#ansys.grantami.core.mi_attribute_value_classes.FunctionalValueParameter)] + + + +#### *property* show_as_table *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Whether the attribute should be displayed as a table. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* table_view *: [FunctionalSeriesRangeTableView](supporting.md#ansys.grantami.core.mi_attribute_value_classes.FunctionalSeriesRangeTableView)* + +Supports additional read-only views of the attribute value. + +* **Return type:** + [`FunctionalSeriesRangeTableView`](supporting.md#ansys.grantami.core.mi_attribute_value_classes.FunctionalSeriesRangeTableView) + + + +#### *property* unit *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Unit symbol for the y-axis. + +For the x-axis parameter or constraint parameters, use [`unit`](supporting.md#ansys.grantami.core.mi_attribute_value_classes.FunctionalValueParameter.unit) on +`FunctionalValueParameter` objects provided by the [`parameters`](#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalSeriesRange.parameters) property. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + + + +#### *property* value *: [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)[[SeriesRange](supporting.md#ansys.grantami.core._mi_value_classes.SeriesRange), ...]* + +Current value of the attribute. + +Can be modified. + +#### Versionchanged +Changed in version 5.0: This property now accepts as input and returns a structured representation of a functional attribute value. +[`table_view`](#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalSeriesRange.table_view) provides properties to obtain the value in the format +previously returned by this property. + +* **Return type:** + tuple[[`SeriesRange`](supporting.md#ansys.grantami.core._mi_value_classes.SeriesRange), …] +* **Raises:** + * [**TypeError**](https://docs.python.org/3/library/exceptions.html#TypeError) – If providing a value that is not a tuple of SeriesRange objects. + * [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – If the value defines series with incompatible parameters or invalid parameter names. + + + +#### *property* x_axis *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Name of the parameter used as the x-axis for the attribute value. + +Data exported from Granta MI may define a different x-axis parameter than the default x-axis parameter set in +the attribute definition. To import data with a different x-axis parameter, use [`with_new_x_axis()`](#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalSeriesRange.with_new_x_axis). + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +### *class* AttributeFunctionalGridPoint + +Attribute value class for point grid functional data. + +### Notes + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`Record.attributes`](record.md#ansys.grantami.core.mi_record_classes.Record.attributes) to access instances of this class. + + + +#### generate_series_version(create_empty=False) + +Convert this object to the equivalent series functional attribute value object and return the result. + +* **Parameters:** + **create_empty** ([*bool*](https://docs.python.org/3/library/functions.html#bool) *,* *optional*) – Whether to create an empty object. Default is [`False`](https://docs.python.org/3/library/constants.html#False). +* **Returns:** + New instance of a series functional attribute value. +* **Return type:** + [`AttributeFunctionalSeriesPoint`](#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalSeriesPoint) + +### Notes + +If `create_empty` is [`True`](https://docs.python.org/3/library/constants.html#True), an empty functional attribute value is returned. + +If `create_empty` is [`False`](https://docs.python.org/3/library/constants.html#False), the following information is copied to the new functional attribute value: + +* [`value`](#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalGridPoint.value) (converted to [`SeriesPoint`](supporting.md#ansys.grantami.core._mi_value_classes.SeriesPoint)) +* [`unit`](#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalGridPoint.unit) +* [`parameters`](#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalGridPoint.parameters) +* [`is_applicable`](#ansys.grantami.core.mi_attribute_value_classes.AttributeValue.is_applicable) + + + +#### with_new_x_axis(parameter_name, create_empty=False) + +Generate an empty attribute value of the same type with another parameter as X-axis. + +* **Parameters:** + * **parameter_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – Name of the parameter to use as X-axis. + * **create_empty** ([*bool*](https://docs.python.org/3/library/functions.html#bool) *,* *optional*) – Whether to create an empty attribute value or copy existing data. Default is [`False`](https://docs.python.org/3/library/constants.html#False). +* **Returns:** + New instance of functional attribute of identical type. +* **Return type:** + [`AttributeFunctionalGridPoint`](#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalGridPoint) +* **Raises:** + [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – If the name is not a valid parameter. + +### Notes + +If `create_empty` is [`True`](https://docs.python.org/3/library/constants.html#True), an empty functional attribute value is returned. + +If `create_empty` is [`False`](https://docs.python.org/3/library/constants.html#False), the following information is copied to the new functional attribute value: + +* [`unit`](#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalGridPoint.unit) +* [`parameters`](#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalGridPoint.parameters) +* [`is_applicable`](#ansys.grantami.core.mi_attribute_value_classes.AttributeValue.is_applicable) + + + +#### *property* parameters *: mappingproxy[[str](https://docs.python.org/3/library/stdtypes.html#str), [FunctionalValueParameter](supporting.md#ansys.grantami.core.mi_attribute_value_classes.FunctionalValueParameter)]* + +Parameters associated with the functional data attribute, indexed by name. + +Modify the [`FunctionalValueParameter.unit`](supporting.md#ansys.grantami.core.mi_attribute_value_classes.FunctionalValueParameter.unit) property on the returned objects to specify a different unit +for import. + +* **Returns:** + Read-only mapping of parameters associated with this functional value. +* **Return type:** + [`MappingProxyType`](https://docs.python.org/3/library/types.html#types.MappingProxyType) [str, [`FunctionalValueParameter`](supporting.md#ansys.grantami.core.mi_attribute_value_classes.FunctionalValueParameter)] + + + +#### *property* table_view *: [FunctionalGridPointTableView](supporting.md#ansys.grantami.core.mi_attribute_value_classes.FunctionalGridPointTableView)* + +Supports additional read-only views of the attribute value. + +* **Return type:** + [`FunctionalGridPointTableView`](supporting.md#ansys.grantami.core.mi_attribute_value_classes.FunctionalGridPointTableView) + + + +#### *property* unit *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Unit symbol for the y-axis. + +For the x-axis parameter or constraint parameters, use [`unit`](supporting.md#ansys.grantami.core.mi_attribute_value_classes.FunctionalValueParameter.unit) on +`FunctionalValueParameter` objects provided by the [`parameters`](#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalGridPoint.parameters) property. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + + + +#### *property* value *: [GridPoint](supporting.md#ansys.grantami.core._mi_value_classes.GridPoint)* + +Current value of the attribute. + +Can be modified. + +#### Versionchanged +Changed in version 5.0: This property now accepts as input and returns a structured representation of a functional attribute value. +[`table_view`](#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalGridPoint.table_view) provides properties to obtain the value in the format +previously returned by this property. + +* **Return type:** + [`GridPoint`](supporting.md#ansys.grantami.core._mi_value_classes.GridPoint) +* **Raises:** + * [**TypeError**](https://docs.python.org/3/library/exceptions.html#TypeError) – If providing a value that is not a GridPoint object. + * [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – If the value defines invalid parameter names. + + + +#### *property* x_axis *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Name of the parameter used as the x-axis for the attribute value. + +Data exported from Granta MI may define a different x-axis parameter than the default x-axis parameter set in +the attribute definition. To import data with a different x-axis parameter, use [`with_new_x_axis()`](#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalGridPoint.with_new_x_axis). + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +### *class* AttributeFunctionalGridRange + +Attribute value class for range grid functional data. + +### Notes + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`Record.attributes`](record.md#ansys.grantami.core.mi_record_classes.Record.attributes) to access instances of this class. + + + +#### generate_series_version(create_empty=False) + +Convert this object to the equivalent series functional attribute value object and return the result. + +* **Parameters:** + **create_empty** ([*bool*](https://docs.python.org/3/library/functions.html#bool) *,* *optional*) – Whether to create an empty object. Default is [`False`](https://docs.python.org/3/library/constants.html#False). +* **Returns:** + New instance of a series functional attribute value. +* **Return type:** + [`AttributeFunctionalSeriesRange`](#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalSeriesRange) + +### Notes + +If `create_empty` is [`True`](https://docs.python.org/3/library/constants.html#True), an empty functional attribute value is returned. + +If `create_empty` is [`False`](https://docs.python.org/3/library/constants.html#False), the following information is copied to the new functional attribute value: + +* [`value`](#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalGridRange.value) (converted to [`SeriesRange`](supporting.md#ansys.grantami.core._mi_value_classes.SeriesRange)) +* [`unit`](#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalGridRange.unit) +* [`parameters`](#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalGridRange.parameters) +* [`is_applicable`](#ansys.grantami.core.mi_attribute_value_classes.AttributeValue.is_applicable) + + + +#### with_new_x_axis(parameter_name, create_empty=False) + +Generate an empty attribute value of the same type with another parameter as X-axis. + +* **Parameters:** + * **parameter_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – Name of the parameter to use as X-axis. + * **create_empty** ([*bool*](https://docs.python.org/3/library/functions.html#bool) *,* *optional*) – Whether to create an empty attribute value or copy existing data. Default is [`False`](https://docs.python.org/3/library/constants.html#False). +* **Returns:** + New instance of functional attribute of identical type. +* **Return type:** + [`AttributeFunctionalGridRange`](#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalGridRange) +* **Raises:** + [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – If the name is not a valid parameter. + +### Notes + +If `create_empty` is [`True`](https://docs.python.org/3/library/constants.html#True), an empty functional attribute value is returned. + +If `create_empty` is [`False`](https://docs.python.org/3/library/constants.html#False), the following information is copied to the new functional attribute value: + +* [`unit`](#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalGridRange.unit) +* [`parameters`](#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalGridRange.parameters) +* [`is_applicable`](#ansys.grantami.core.mi_attribute_value_classes.AttributeValue.is_applicable) + + + +#### *property* parameters *: mappingproxy[[str](https://docs.python.org/3/library/stdtypes.html#str), [FunctionalValueParameter](supporting.md#ansys.grantami.core.mi_attribute_value_classes.FunctionalValueParameter)]* + +Parameters associated with the functional data attribute, indexed by name. + +Modify the [`FunctionalValueParameter.unit`](supporting.md#ansys.grantami.core.mi_attribute_value_classes.FunctionalValueParameter.unit) property on the returned objects to specify a different unit +for import. + +* **Returns:** + Read-only mapping of parameters associated with this functional value. +* **Return type:** + [`MappingProxyType`](https://docs.python.org/3/library/types.html#types.MappingProxyType) [str, [`FunctionalValueParameter`](supporting.md#ansys.grantami.core.mi_attribute_value_classes.FunctionalValueParameter)] + + + +#### *property* table_view *: [FunctionalGridRangeTableView](supporting.md#ansys.grantami.core.mi_attribute_value_classes.FunctionalGridRangeTableView)* + +Supports additional read-only views of the attribute value. + +* **Return type:** + [`FunctionalGridRangeTableView`](supporting.md#ansys.grantami.core.mi_attribute_value_classes.FunctionalGridRangeTableView) + + + +#### *property* unit *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Unit symbol for the y-axis. + +For the x-axis parameter or constraint parameters, use [`unit`](supporting.md#ansys.grantami.core.mi_attribute_value_classes.FunctionalValueParameter.unit) on +`FunctionalValueParameter` objects provided by the [`parameters`](#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalGridRange.parameters) property. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + + + +#### *property* value *: [GridRange](supporting.md#ansys.grantami.core._mi_value_classes.GridRange)* + +Current value of the attribute. + +Can be modified. + +#### Versionchanged +Changed in version 5.0: This property now accepts as input and returns a structured representation of a functional attribute value. +[`table_view`](#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalGridRange.table_view) provides properties to obtain the value in the format +previously returned by this property. + +* **Return type:** + [`GridRange`](supporting.md#ansys.grantami.core._mi_value_classes.GridRange) +* **Raises:** + * [**TypeError**](https://docs.python.org/3/library/exceptions.html#TypeError) – If providing a value that is not a GridRange object. + * [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – If the value defines invalid parameter names. + + + +#### *property* x_axis *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Name of the parameter used as the x-axis for the attribute value. + +Data exported from Granta MI may define a different x-axis parameter than the default x-axis parameter set in +the attribute definition. To import data with a different x-axis parameter, use [`with_new_x_axis()`](#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalGridRange.with_new_x_axis). + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +### *class* AttributeUnsupported + +Extended [`AttributeValue`](#ansys.grantami.core.mi_attribute_value_classes.AttributeValue) class for attributes with unsupported data types. + +### Notes + +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. + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`Record.attributes`](record.md#ansys.grantami.core.mi_record_classes.Record.attributes) to access instances of this class. + + + +#### is_empty() + +Checks whether the attribute value is populated. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* is_applicable *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Whether the attribute is applicable to the current record. + +Setting this to [`False`](https://docs.python.org/3/library/constants.html#False) will clear any data values on the attribute on import. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) +* **Raises:** + [**TypeError**](https://docs.python.org/3/library/exceptions.html#TypeError) – If attempting to set a non-boolean value. + + + +#### *property* object *: [UnsupportedType](supporting.md#ansys.grantami.core.mi_attribute_value_classes.UnsupportedType)* + +Gets the underlying [`UnsupportedType`](supporting.md#ansys.grantami.core.mi_attribute_value_classes.UnsupportedType) object representing the attribute value or the tabular cell. + +Does not allow access to the data. + +* **Return type:** + [`UnsupportedType`](supporting.md#ansys.grantami.core.mi_attribute_value_classes.UnsupportedType) + + + +#### *property* value *: [None](https://docs.python.org/3/library/constants.html#None)* + +This property always returns None for unsupported attribute values. + + + +### *class* PseudoAttributeValue + +Stores and provides access to pseudo-attribute data values. + +### Notes + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`Record.get_attributes()`](record.md#ansys.grantami.core.mi_record_classes.Record.get_attributes) to generate instances of this class. + + + +#### is_empty() + +Checks whether the pseudo-attribute value is populated or not. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* id *: [int](https://docs.python.org/3/library/functions.html#int)* + +Attribute identifier (this is always 0 for pseudo-attributes). + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Name of the pseudo-attribute. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* record *: [Record](record.md#ansys.grantami.core.mi_record_classes.Record)* + +Parent [`Record`](record.md#ansys.grantami.core.mi_record_classes.Record) described by the [`PseudoAttributeValue`](#ansys.grantami.core.mi_attribute_value_classes.PseudoAttributeValue). + +* **Return type:** + [`Record`](record.md#ansys.grantami.core.mi_record_classes.Record) + + + +#### *property* type *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Data type of the pseudo-attribute value (four-character string). + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* value *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str)] | [str](https://docs.python.org/3/library/stdtypes.html#str) | [int](https://docs.python.org/3/library/functions.html#int) | [bool](https://docs.python.org/3/library/functions.html#bool) | [set](https://docs.python.org/3/library/stdtypes.html#set)[[str](https://docs.python.org/3/library/stdtypes.html#str)] | [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime) | [RecordColor](constants.md#ansys.grantami.core.mi_constants.RecordColor)* + +Current value of the pseudo-attribute. + +Cannot be modified. Modification of editable pseudo-attributes must be done through the [`Record.color`](record.md#ansys.grantami.core.mi_record_classes.Record.color), +[`Record.short_name`](record.md#ansys.grantami.core.mi_record_classes.Record.short_name) and [`Record.name`](record.md#ansys.grantami.core.mi_record_classes.Record.name) properties. + +* **Return type:** + list[str] or str or int or bool or set[str] or datetime.datetime or [`RecordColor`](constants.md#ansys.grantami.core.mi_constants.RecordColor) diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/streamlined_api/constants.md b/2026R1/scripting-toolkit-dev-portal-26-r1/streamlined_api/constants.md new file mode 100644 index 0000000000..a72fd1d39a --- /dev/null +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/streamlined_api/constants.md @@ -0,0 +1,204 @@ +# Constants + + + + + +### *class* RecordProperties + +Provides [`PseudoAttributeDefinition`](attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.PseudoAttributeDefinition) for every supported pseudo-attribute. + +Attribute names match the corresponding property on [`Record`](record.md#ansys.grantami.core.mi_record_classes.Record). + + + +#### *classmethod* all() + +All pseudo-attribute definitions. + +* **Return type:** + list[[`PseudoAttributeDefinition`](attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.PseudoAttributeDefinition)] + + + +#### color *= * + + + +#### created_by *= * + + + +#### created_on *= * + + + +#### history_identity *= * + + + +#### is_writable *= * + + + +#### last_modified_by *= * + + + +#### last_modified_on *= * + + + +#### name *= * + + + +#### parent_record_history_identity *= * + + + +#### parent_record_name *= * + + + +#### parent_record_short_name *= * + + + +#### released_on *= * + + + +#### short_name *= * + + + +#### subsets *= * + + + +#### table_name *= * + + + +#### type *= * + + + +#### version_number *= * + + + +### *class* RecordColor(value) + + + +#### Red *= 0* + + + +#### Maroon *= 1* + + + +#### Fuchsia *= 2* + + + +#### Yellow *= 3* + + + +#### Black *= 4* + + + +#### Gray *= 5* + + + +#### Aqua *= 6* + + + +#### Green *= 7* + + + +#### Navy *= 8* + + + +#### Purple *= 9* + + + +#### Blue *= 10* + + + +#### Silver *= 11* + + + +#### Lime *= 12* + + + +#### Olive *= 13* + + + +#### Teal *= 14* + + + +#### White *= 15* + + + +#### InheritFromParent *= 16* + + + +#### *property* safe_name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + + + +### *class* RecordType(value) + + + +#### Record *= 'Record'* + + + +#### Folder *= 'Folder'* + + + +#### Generic *= 'Generic'* + + + +### DATABASE_CURRENCY + +Value used to refer to the ‘Database currency’ + + + +### DATABASE_UNIT_SYSTEM + +Value used to refer to the ‘Database unit system’. + + + +### InterpolationType + +alias of [`Literal`](https://docs.python.org/3/library/typing.html#typing.Literal)[‘None’, ‘Linear’, ‘Cubic Spline’] + + + +### ScaleType + +alias of [`Literal`](https://docs.python.org/3/library/typing.html#typing.Literal)[‘Linear’, ‘Log’] diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/streamlined_api/database.md b/2026R1/scripting-toolkit-dev-portal-26-r1/streamlined_api/database.md new file mode 100644 index 0000000000..b9638d8756 --- /dev/null +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/streamlined_api/database.md @@ -0,0 +1,362 @@ +# Database + + + + + +### *class* Database + +Represents an MI database, and provides access to its tables, unit systems, and record link groups. + +### Notes + +Do not create instances of this class; it represents a pre-existing database structure. Use [`Session.get_db()`](session.md#ansys.grantami.core.mi.Session.get_db) +to access an instance of this class. + + + +#### dimensionally_equivalent_units(unit) + +Returns all units which are dimensionally equivalent to the specified unit, with conversion factor and offset. + +* **Parameters:** + **unit** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – The unit to find equivalent units for. +* **Returns:** + Dictionary mapping unit symbols to their conversion factors and offsets. +* **Return type:** + [dict](https://docs.python.org/3/library/stdtypes.html#dict)[[str](https://docs.python.org/3/library/stdtypes.html#str), [dict](https://docs.python.org/3/library/stdtypes.html#dict)[[str](https://docs.python.org/3/library/stdtypes.html#str), [float](https://docs.python.org/3/library/functions.html#float)]] + +### Notes + +Makes a single call to the Service Layer and caches the results. + +### Examples + +```pycon +>>> db.dimensionally_equivalent_units(unit='kg') +{'g': {'factor': 1000.0, 'offset': 0.0}} +``` + + + +#### get_record_by_id(hguid=None, vguid=None, history_identity=None, version_number=None) + +Returns the [`Record`](record.md#ansys.grantami.core.mi_record_classes.Record) object with the following (sets of) references in priority order. + +1. `vguid` (record version 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*](https://docs.python.org/3/library/stdtypes.html#str) *,* *optional*) – Record history GUID: uniquely identifies record. + * **vguid** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* *optional*) – Record version GUID: uniquely identifies record version. + * **history_identity** ([*int*](https://docs.python.org/3/library/functions.html#int) *,* *optional*) – Record history identity. + * **version_number** ([*int*](https://docs.python.org/3/library/functions.html#int) *,* *optional*) – Record version number. +* **Returns:** + Record object with the specified ID. +* **Return type:** + [`Record`](record.md#ansys.grantami.core.mi_record_classes.Record) + +### Notes + +Makes a Service Layer call. + + + +#### get_records_by_ids(record_identifiers) + +Returns a [`Record`](record.md#ansys.grantami.core.mi_record_classes.Record) object for each identifier provided. + +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 version 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. + +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`](https://docs.python.org/3/library/constants.html#None). + +* **Parameters:** + **record_identifiers** (*Sequence* *[*[*dict*](https://docs.python.org/3/library/stdtypes.html#dict) *[*[*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* [*str*](https://docs.python.org/3/library/stdtypes.html#str) *|* [*int*](https://docs.python.org/3/library/functions.html#int) *]* *]*) – Sequence of dictionaries containing record identifiers. +* **Return type:** + list[[`Record`](record.md#ansys.grantami.core.mi_record_classes.Record) | [`None`](https://docs.python.org/3/library/constants.html#None)] + +### Notes + +Makes multiple Service Layer calls depending on number of identifiers provided. + + + +#### get_table(name) + +Returns the [`Table`](table.md#ansys.grantami.core.mi_tree_classes.Table) object with the specified name. + +Case-insensitive. + +* **Parameters:** + **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – Name of the table. +* **Return type:** + [`Table`](table.md#ansys.grantami.core.mi_tree_classes.Table) +* **Raises:** + [**KeyError**](https://docs.python.org/3/library/exceptions.html#KeyError) – If no table with the specified name exists in the database. + + + +#### get_table_by_guid(guid) + +Returns the [`Table`](table.md#ansys.grantami.core.mi_tree_classes.Table) object with the specified GUID. + +Case-insensitive. + +* **Parameters:** + **guid** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – GUID of the table. +* **Return type:** + [`Table`](table.md#ansys.grantami.core.mi_tree_classes.Table) +* **Raises:** + [**KeyError**](https://docs.python.org/3/library/exceptions.html#KeyError) – If no table with the specified GUID exists in the database. + + + +#### refetch_unit_systems() + +Fetches the unit systems associated with the database. + +### Notes + +Makes a Service Layer call. + + + +#### refresh_tables() + +Performs a Foundation API [`BrowseService.get_tables()`](../foundation_api.md#ansys.grantami.backend.soap.BrowseService.BrowseService.get_tables) request and creates a new list of tables. + +Also updates the attributes in each table. + +### Notes + +Makes a Service Layer call. + + + +#### search_for_records_by_name(name) + +Performs a search on record name across the database. + +Returns only the [`Record`](record.md#ansys.grantami.core.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. + +* **Parameters:** + **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – Name to search for. +* **Return type:** + list[[`Record`](record.md#ansys.grantami.core.mi_record_classes.Record)] + +### Notes + +Makes a Service Layer call for each table in the database. + +#### SEE ALSO +[`Table.search_for_records_by_name()`](table.md#ansys.grantami.core.mi_tree_classes.Table.search_for_records_by_name) +: Searches within a single table. + + + +#### search_for_records_by_text(text) + +Performs a simple text search across the database for the string provided. + +Returns a list of matching [`Record`](record.md#ansys.grantami.core.mi_record_classes.Record) objects. This method does not apply any subset filtering. + +* **Parameters:** + **text** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – Text to search for. +* **Return type:** + list[[`Record`](record.md#ansys.grantami.core.mi_record_classes.Record)] + +### Notes + +Makes a Service Layer call for each table in the database. + +#### SEE ALSO +[`Table.search_for_records_by_text()`](table.md#ansys.grantami.core.mi_tree_classes.Table.search_for_records_by_text) +: Searches within a single table. + + + +#### 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()`](table.md#ansys.grantami.core.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. + +* **Parameters:** + * **list_of_criteria** (list[[`SearchCriterion`](supporting.md#ansys.grantami.core.mi_meta_classes.SearchCriterion)]) – List of search criteria. + * **silent** ([*bool*](https://docs.python.org/3/library/functions.html#bool) *,* *default: True*) – Whether to ignore errors caused by non-existent attributes. +* **Returns:** + A list of Record objects that match the provided criteria. +* **Return type:** + list[[`Record`](record.md#ansys.grantami.core.mi_record_classes.Record)] +* **Raises:** + * [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – If the `list_of_criteria` comprise criteria in multiple tables. + * [**KeyError**](https://docs.python.org/3/library/exceptions.html#KeyError) – If the search criteria include an attribute that does not exist in the database and `silent` is + [`False`](https://docs.python.org/3/library/constants.html#False). + +### Notes + +Makes a Service Layer call for each table in the database. + +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. + + + +#### *property* absolute_temperatures *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Whether the [`Database`](#ansys.grantami.core.mi_tree_classes.Database) uses absolute temperature units (Kelvin/Rankine) or not (Celsius/Fahrenheit). + +Default value is [`False`](https://docs.python.org/3/library/constants.html#False). + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* currency *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Database currency code. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* db_key *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Database key. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* guid *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +GUID of the database. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* mi *: [Session](session.md#ansys.grantami.core.mi.Session)* + +Granta MI Session used to create or access the [`Database`](#ansys.grantami.core.mi_tree_classes.Database) object. + +Used for any Service Layer calls made by the [`Database`](#ansys.grantami.core.mi_tree_classes.Database). + +* **Returns:** + The session object. +* **Return type:** + [`Session`](session.md#ansys.grantami.core.mi.Session) + + + +#### *property* name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Name of the database. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* parameters *: [Dict](https://docs.python.org/3/library/typing.html#typing.Dict)[[str](https://docs.python.org/3/library/stdtypes.html#str), [DatabaseParameter](supporting.md#ansys.grantami.core.mi_attribute_classes.DatabaseParameter)]* + +Parameters associated with the database, indexed by name. + +* **Return type:** + dict[str, [`DatabaseParameter`](supporting.md#ansys.grantami.core.mi_attribute_classes.DatabaseParameter)] + + + +#### *property* record_link_groups *: [List](https://docs.python.org/3/library/typing.html#typing.List)[[LinkGroupDetails](supporting.md#ansys.grantami.core.mi_meta_classes.LinkGroupDetails)]* + +All record link groups in the database. + +* **Return type:** + list[[`LinkGroupDetails`](supporting.md#ansys.grantami.core.mi_meta_classes.LinkGroupDetails)] + + + +#### *property* tables *: [List](https://docs.python.org/3/library/typing.html#typing.List)[[Table](table.md#ansys.grantami.core.mi_tree_classes.Table)]* + +Tables associated with the database. + +* **Return type:** + list[[`Table`](table.md#ansys.grantami.core.mi_tree_classes.Table)] + + + +#### *property* tables_by_guid *: [Dict](https://docs.python.org/3/library/typing.html#typing.Dict)[[str](https://docs.python.org/3/library/stdtypes.html#str), [Table](table.md#ansys.grantami.core.mi_tree_classes.Table)]* + +Tables in the database, as dictionary keyed by GUID. + +* **Return type:** + dict[str, [`Table`](table.md#ansys.grantami.core.mi_tree_classes.Table)] + + + +#### *property* tables_by_name *: [Dict](https://docs.python.org/3/library/typing.html#typing.Dict)[[str](https://docs.python.org/3/library/stdtypes.html#str), [Table](table.md#ansys.grantami.core.mi_tree_classes.Table)]* + +Tables in the database, as dictionary keyed by name. + +* **Return type:** + dict[str, [`Table`](table.md#ansys.grantami.core.mi_tree_classes.Table)] + + + +#### *property* unit_system *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Currently selected unit system (default is [`DATABASE_UNIT_SYSTEM`](constants.md#ansys.grantami.core.mi_constants.DATABASE_UNIT_SYSTEM)). + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* unit_systems_available *: [List](https://docs.python.org/3/library/typing.html#typing.List)[[str](https://docs.python.org/3/library/stdtypes.html#str)]* + +Names of unit systems associated with the database. + +* **Return type:** + [list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str)] + + + +#### *property* version_guid *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Version GUID of the database. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/streamlined_api/exceptions.md b/2026R1/scripting-toolkit-dev-portal-26-r1/streamlined_api/exceptions.md new file mode 100644 index 0000000000..9e37c2e8e2 --- /dev/null +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/streamlined_api/exceptions.md @@ -0,0 +1,40 @@ +# Exceptions + + + + + +### *class* UnsupportedLinkGroupError + +Raised when an operation is performed on a record link group which is incompatible with that operation. + + + +### *class* InvalidRecordStateError + +Raised when a record is in an invalid state for the requested operation. + + + +### *class* UnexportedBinaryDataError + +Raised when an operation requires binary data which has not been exported from the Granta MI database. + + + +# Warnings + + + +### *class* APIDeprecationWarning + +Warning displayed when a property, method, or function will be removed in a future release of MI Scripting Toolkit. + +Users should update their scripts to make use of new features and to avoid breaking changes when the deprecated API +is removed. + + + +### *class* PrereleaseVersionWarning + +Warning displayed when a prerelease version of MI Scripting Toolkit is imported. diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/streamlined_api/helpers.md b/2026R1/scripting-toolkit-dev-portal-26-r1/streamlined_api/helpers.md new file mode 100644 index 0000000000..287232f8d2 --- /dev/null +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/streamlined_api/helpers.md @@ -0,0 +1,12 @@ +# Helper functions + + + + + +### get_foundation_logger() + +Return the logger used by the Foundation API (has the name “GDL”). + +* **Return type:** + [logging.Logger](https://docs.python.org/3/library/logging.html#logging.Logger) diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/api/index.md b/2026R1/scripting-toolkit-dev-portal-26-r1/streamlined_api/index.md similarity index 66% rename from 2026R1/scripting-toolkit-dev-portal-26-r1/api/index.md rename to 2026R1/scripting-toolkit-dev-portal-26-r1/streamlined_api/index.md index ec814f5464..5f6392813a 100644 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/api/index.md +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/streamlined_api/index.md @@ -1,8 +1,8 @@ -# API reference +# Streamlined API reference - + -Reference documentation for the Scripting Toolkit API. +Reference documentation for the Streamlined API. * [Session](session.md) * [Database](database.md) @@ -11,7 +11,7 @@ Reference documentation for the Scripting Toolkit API. * [Record](record.md) * [Attribute values](attribute-values.md) * [Schema and supporting items](supporting.md) -* [Bulk operators](bulk-operators.md) +* [Tabular attribute value items](tabular.md) * [Helper functions](helpers.md) * [Constants](constants.md) * [Exceptions](exceptions.md) diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/streamlined_api/record.md b/2026R1/scripting-toolkit-dev-portal-26-r1/streamlined_api/record.md new file mode 100644 index 0000000000..109729c8d9 --- /dev/null +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/streamlined_api/record.md @@ -0,0 +1,1023 @@ +# Record + + + + + + + +### *class* Record + +Represents a Granta MI record. + +May represent an existing Granta MI record, or a record which is staged for import. + +Stores and provides access to record attributes, pseudo-attributes, links and children. Provides methods for adding, +editing and deleting records, and importing and exporting record data. + +* **Parameters:** + * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – Long name for new records. + * **table** ([`Table`](table.md#ansys.grantami.core.mi_tree_classes.Table)) – Table object. + * **parent** ([`Record`](#ansys.grantami.core.mi_record_classes.Record) or [`Table`](table.md#ansys.grantami.core.mi_tree_classes.Table), optional) – Parent record or table object. + * **short_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* *optional*) – Short (tree) name for new records. + * **attributes** (dict[str, [`AttributeValue`](attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeValue)], optional) – Dictionary of attribute values. + * **subsets** ([*set*](https://docs.python.org/3/library/stdtypes.html#set) *[*[*str*](https://docs.python.org/3/library/stdtypes.html#str) *]* *,* *optional*) – Subsets the record belongs to. + * **folder** ([*bool*](https://docs.python.org/3/library/functions.html#bool) *,* *optional*) – Whether the record is ‘Folder’ type. + * **record_color** ([`RecordColor`](constants.md#ansys.grantami.core.mi_constants.RecordColor), optional) – Color of the record. + * **release_record** (bool, default: [`True`](https://docs.python.org/3/library/constants.html#True)) – Release state of the record; [`True`](https://docs.python.org/3/library/constants.html#True) to release next version. + +#### WARNING +Do not create [`Record`](#ansys.grantami.core.mi_record_classes.Record) instances for records which are already in the database. Use the appropriate +[`Session`](session.md#ansys.grantami.core.mi.Session), [`Database`](database.md#ansys.grantami.core.mi_tree_classes.Database), [`Table`](table.md#ansys.grantami.core.mi_tree_classes.Table), or [`Record`](#ansys.grantami.core.mi_record_classes.Record) methods and properties to access existing +records. + +### Notes + +[`Record`](#ansys.grantami.core.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`](#ansys.grantami.core.mi_record_classes.Record.short_name) property following +object creation. If a record is pushed to Granta MI without a specifying short name, the short name will default to +the record name. + +Records created this way will not exist in the specified database until the changes have been pushed to Granta MI +(see [`Session.update()`](session.md#ansys.grantami.core.mi.Session.update)). + + + +#### clear_attributes(attributes) + +Flags attribute values to be deleted when [`Session.update()`](session.md#ansys.grantami.core.mi.Session.update) is next called. + +Does not delete the local value of flagged attributes, only the data on Granta MI. Supersedes previous +[`set_attributes()`](#ansys.grantami.core.mi_record_classes.Record.set_attributes) calls. + +* **Parameters:** + **attributes** (*Iterable* *[*[*AttributeValue*](attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeValue) *]*) – Attributes to clear on the record. + + + +#### 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. + +* **Parameters:** + * **destination** ([`Record`](#ansys.grantami.core.mi_record_classes.Record) or [`Table`](table.md#ansys.grantami.core.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) *,* *optional*) – 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, default: [`False`](https://docs.python.org/3/library/constants.html#False)) – Whether to release the created record. The argument has no effect for records in tables that are not + version-controlled. +* **Return type:** + [Record](#ansys.grantami.core.mi_record_classes.Record) +* **Raises:** + [**InvalidRecordStateError**](exceptions.md#ansys.grantami.core.mi_meta_classes.InvalidRecordStateError) – If the record has not been pushed to the server. + +#### WARNING +Data validation rules, such as attribute value uniqueness, might prevent record copying. + +### Notes + +Makes a Service Layer call. + + + +#### decache_attributes() + +Removes all attribute values from the [`Record`](#ansys.grantami.core.mi_record_classes.Record). + + + +#### decache_links() + +Removes all links from the [`Record`](#ansys.grantami.core.mi_record_classes.Record). + + + +#### delete_or_withdraw_record_on_server(withdrawal_notes=None) + +Deletes the record from the server, or withdraws it from a version-controlled table. + +* **Parameters:** + **withdrawal_notes** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* *optional*) – Withdrawal revision notes. +* **Raises:** + [**InvalidRecordStateError**](exceptions.md#ansys.grantami.core.mi_meta_classes.InvalidRecordStateError) – If the record has not been pushed to the server. + +### Notes + +Makes a Service Layer call. + + + +#### find_parent() + +Finds and sets the parent record or table. + +* **Raises:** + * [**PermissionError**](https://docs.python.org/3/library/exceptions.html#PermissionError) – If parent record cannot be accessed due to access control. + * [**InvalidRecordStateError**](exceptions.md#ansys.grantami.core.mi_meta_classes.InvalidRecordStateError) – If the record has not been pushed to the server. + +### Notes + +Makes a Service Layer call if the parent has not already been fetched. + +This operation performs no subset filtering because, by definition, the parent record must belong to all subsets +that this record belongs to. + + + +#### get_associated_records(target_table, link_direction='Both', attribute_path=None) + +Gets records `target_table` linked to the current [`Record`](#ansys.grantami.core.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`](table.md#ansys.grantami.core.mi_tree_classes.Table)) – The table from which to retrieve associated records. + * **link_direction** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* *default: "Both"*) – Which direction to follow links in: `Both` (default), `Forward`, `Reverse`. + * **attribute_path** (list[[`AttributeDefinition`](attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinition)], optional) – Path of tabular attributes to follow. If [`None`](https://docs.python.org/3/library/constants.html#None), all paths are followed. +* **Return type:** + list[[`Record`](#ansys.grantami.core.mi_record_classes.Record)] +* **Raises:** + [**InvalidRecordStateError**](exceptions.md#ansys.grantami.core.mi_meta_classes.InvalidRecordStateError) – If the record has not been pushed to the server. + +### Notes + +Makes a Service Layer call. + + + +#### get_attributes(names=None, types=None, include_attributes=True, include_meta_attributes=False, include_pseudo_attributes=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. + +#### Versionchanged +Changed in version 4.2: Argument `include_metas` was renamed to `include_meta_attributes`. + +#### Versionchanged +Changed in version 4.2: Argument `include_pseudos` was renamed to `include_pseudo_attributes`. + +* **Parameters:** + * **names** ([*list*](https://docs.python.org/3/library/stdtypes.html#list) *[*[*str*](https://docs.python.org/3/library/stdtypes.html#str) *]* *,* *optional*) – Attribute names. + * **types** ([*list*](https://docs.python.org/3/library/stdtypes.html#list) *[*[*str*](https://docs.python.org/3/library/stdtypes.html#str) *]* *,* *optional*) – Attribute data types; allowed values are: `DISC`, `DTTM`, `FILE`, `FUNC`, `HLNK`, `INPT`, + `LOGI`, `LTXT`, `PICT`, `POIN`, `RNGE`, `STXT`, `TABL`. + * **include_attributes** (bool, default: [`True`](https://docs.python.org/3/library/constants.html#True)) – Whether to retrieve attributes that are not meta-attributes or pseudo-attributes. + * **include_meta_attributes** (bool, default: [`False`](https://docs.python.org/3/library/constants.html#False)) – Whether to retrieve meta-attributes. + * **include_pseudo_attributes** (bool, default: [`False`](https://docs.python.org/3/library/constants.html#False)) – Whether to retrieve pseudo-attributes. + * **empty** ([*bool*](https://docs.python.org/3/library/functions.html#bool) *,* *optional*) – Whether to filter by whether an attribute is populated or not. If [`None`](https://docs.python.org/3/library/constants.html#None), both populated and empty + attributes are returned. +* **Return type:** + list[[`PseudoAttributeValue`](attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.PseudoAttributeValue) or [`AttributeValue`](attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeValue)] + +### Examples + +The code below returns all point or functional series attributes or meta-attributes named Density or +Stress-Strain: + +```python +r.get_attributes(names=['Density', 'Stress-Strain'], types=['POIN', 'FUNC'], include_meta_attributes=True) +``` + + + +#### 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*](https://docs.python.org/3/library/stdtypes.html#str) *,* *optional*) – Name of target FEA analysis package, for example ‘NX 10.0’ or ‘CATIA V5’. + * **model** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* *optional*) – Material model type, for example ‘Isotropic’ or ‘Linear, temperature-independent, + isotropic, thermal, plastic’. + * **applicability_tag** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* *optional*) – Tag that identifies the MI applications an exporter is intended to be used with, + for example, ‘MIMaterialsGateway’ or ‘MIViewer’. +* **Return type:** + list[[`Exporter`](supporting.md#ansys.grantami.core.mi_exporters.Exporter)] + +### Notes + +Makes a Service Layer call on first request for each applicability tag. + + + +#### 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. + +Populates the [`children`](#ansys.grantami.core.mi_record_classes.Record.children) property of each [`Record`](#ansys.grantami.core.mi_record_classes.Record) object traversed in the process. + +If `filter_by_subset` is [`True`](https://docs.python.org/3/library/constants.html#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`](https://docs.python.org/3/library/constants.html#False) then records will be returned from all subsets. + +* **Parameters:** + * **include_folders** (bool, default: [`False`](https://docs.python.org/3/library/constants.html#False)) – Whether to include folders in the list of descendants. + * **include_generics** (bool, default: [`True`](https://docs.python.org/3/library/constants.html#True)) – Whether to include generic records in the list of descendants. + * **filter_by_subset** (bool, default: [`True`](https://docs.python.org/3/library/constants.html#True)) – Whether to filter by subset. + * **subset_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* *optional*) – Name of the subset to use for filtering. +* **Return type:** + list[[`Record`](#ansys.grantami.core.mi_record_classes.Record)] +* **Raises:** + * [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – If more than one subset is applied to the table when `filter_by_subset` is [`True`](https://docs.python.org/3/library/constants.html#True) and `subset_name` + is not provided. + * [**InvalidRecordStateError**](exceptions.md#ansys.grantami.core.mi_meta_classes.InvalidRecordStateError) – If the record has not been pushed to the server. + +### Notes + +Makes a Service Layer call. + + + +#### move_to(new_parent) + +Moves the record and all its descendants to a new parent. + +The provided new parent must be a [`Record`](#ansys.grantami.core.mi_record_classes.Record) of type [`RecordType.Folder`](constants.md#ansys.grantami.core.mi_constants.RecordType.Folder) or +[`RecordType.Generic`](constants.md#ansys.grantami.core.mi_constants.RecordType.Generic), or a [`Table`](table.md#ansys.grantami.core.mi_tree_classes.Table) to move the record at the root of the table. + +* **Parameters:** + **new_parent** ([`Record`](#ansys.grantami.core.mi_record_classes.Record) or [`Table`](table.md#ansys.grantami.core.mi_tree_classes.Table)) + +### Notes + +Some cached properties are cleared after the record has been moved, as they would be out-of-date: + +* pseudo-attribute properties +* [`Record.path`](#ansys.grantami.core.mi_record_classes.Record.path) +* [`Record.parent`](#ansys.grantami.core.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_pseudo_attributes()`](#ansys.grantami.core.mi_record_classes.Record.refetch_pseudo_attributes) +* [`Record.refresh_path()`](#ansys.grantami.core.mi_record_classes.Record.refresh_path) +* [`Record.find_parent()`](#ansys.grantami.core.mi_record_classes.Record.find_parent) +* [`Record.refresh_properties()`](#ansys.grantami.core.mi_record_classes.Record.refresh_properties) + +[`Record.children`](#ansys.grantami.core.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()`](table.md#ansys.grantami.core.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()`](#ansys.grantami.core.mi_record_classes.Record.refetch_children). + +* **Raises:** + [**InvalidRecordStateError**](exceptions.md#ansys.grantami.core.mi_meta_classes.InvalidRecordStateError) – If the record has not been pushed to the server. + +### Notes + +Makes a Service Layer call. + + + +#### refetch_children(filter_by_subset=True, subset_name=None) + +Refreshes the list of children belonging to the record. + +If `filter_by_subset` is [`True`](https://docs.python.org/3/library/constants.html#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`](https://docs.python.org/3/library/constants.html#False) then records will be returned from all subsets. + +* **Parameters:** + * **filter_by_subset** (bool, default: [`True`](https://docs.python.org/3/library/constants.html#True)) – Whether to filter by subset. + * **subset_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* *optional*) – Name of the subset to use for filtering. +* **Raises:** + * [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – If more than one subset is applied to the table when `filter_by_subset` is [`True`](https://docs.python.org/3/library/constants.html#True) and `subset_name` + is not provided. + * [**InvalidRecordStateError**](exceptions.md#ansys.grantami.core.mi_meta_classes.InvalidRecordStateError) – If the record has not been pushed to the server. + +### Notes + +Makes a Service Layer call. + + + +#### refetch_pseudo_attributes() + +Fetches pseudo-attribute data for this record, and updates subsets for the record if not set. + +* **Raises:** + [**InvalidRecordStateError**](exceptions.md#ansys.grantami.core.mi_meta_classes.InvalidRecordStateError) – If the record has not been pushed to the server. + +### Notes + +Makes a Service Layer call. + + + +#### refetch_record_release_state() + +Fetches the record’s release state from the server. + +* **Raises:** + [**InvalidRecordStateError**](exceptions.md#ansys.grantami.core.mi_meta_classes.InvalidRecordStateError) – If the record has not been pushed to the server. + +### Notes + +Makes a Service Layer call. + + + +#### refetch_record_versions() + +Refetches version information and all visible versions of the record for this user. + +* **Raises:** + [**InvalidRecordStateError**](exceptions.md#ansys.grantami.core.mi_meta_classes.InvalidRecordStateError) – If the record has not been pushed to the server. + +### Notes + +Makes a Service Layer call. + + + +#### refresh_attributes() + +Updates the [`Record`](#ansys.grantami.core.mi_record_classes.Record) object if they have changed on the server. + +Can also be used to populate attributes. + +Always includes binary data in the response. Use the [`bulk_fetch()`](table.md#ansys.grantami.core.mi_tree_classes.Table.bulk_fetch) method if URL data +representation is required. + +### Notes + +Makes a Service Layer call. + + + +#### refresh_path() + +Re-calculates the record path within the current table. + +* **Raises:** + [**InvalidRecordStateError**](exceptions.md#ansys.grantami.core.mi_meta_classes.InvalidRecordStateError) – If the record has not been pushed to the server. + +### Notes + +This operation performs no subset filtering because, by definition, the parent record must belong to all subsets +that this record belongs to. + +Makes a Service Layer call. + + + +#### refresh_properties() + +Refreshes the Foundation API [`ansys.grantami.backend.soap.TreeRecord`](../foundation_api.md#module-ansys.grantami.backend.soap.TreeRecord) object associated with the +[`Record`](#ansys.grantami.core.mi_record_classes.Record), if it has one. + +* **Raises:** + [**InvalidRecordStateError**](exceptions.md#ansys.grantami.core.mi_meta_classes.InvalidRecordStateError) – If the record has not been pushed to the server. + +### Notes + +Makes a Service Layer call. + + + +#### set_attributes(attributes) + +Flags attribute values to update on the server when [`Session.update()`](session.md#ansys.grantami.core.mi.Session.update) is next called. + +If attribute values are not supplied to this method, changes to those attributes will not be transferred to +Granta MI. + +* **Parameters:** + **attributes** (*Iterable* *[*[*AttributeValue*](attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeValue) *]*) – Attributes to set on the record. + +#### SEE ALSO +[`clear_attributes()`](#ansys.grantami.core.mi_record_classes.Record.clear_attributes) +: Flags attribute values to be deleted when [`Session.update()`](session.md#ansys.grantami.core.mi.Session.update) is next called. + + + +#### 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*](https://docs.python.org/3/library/stdtypes.html#str)) – Link group name to be updated. + * **records** (Iterable[[`Record`](#ansys.grantami.core.mi_record_classes.Record)]) – Records to add to the link group. + + + +#### *property* all_versions *: [Dict](https://docs.python.org/3/library/typing.html#typing.Dict)[[str](https://docs.python.org/3/library/stdtypes.html#str), [Record](#ansys.grantami.core.mi_record_classes.Record)]* + +Returns all versions or the record as dictionary of [`Record`](#ansys.grantami.core.mi_record_classes.Record) objects. + +The dictionary is indexed by the version number in the form ‘v#’, for example ‘v1’ or ‘v2’. In a version +controlled table there is an entry for each version of the record in Granta MI. In a non-version controlled +table there is a single entry with the key ‘v0’. + +* **Return type:** + dict[str, [`Record`](#ansys.grantami.core.mi_record_classes.Record)] +* **Raises:** + [**InvalidRecordStateError**](exceptions.md#ansys.grantami.core.mi_meta_classes.InvalidRecordStateError) – If the record has not been pushed to the server. + +### Notes + +Makes a Service Layer call if the [`refetch_record_versions()`](#ansys.grantami.core.mi_record_classes.Record.refetch_record_versions) method has not already been called on +this record. + + + +#### *property* attributes *: [Dict](https://docs.python.org/3/library/typing.html#typing.Dict)[[str](https://docs.python.org/3/library/stdtypes.html#str), [AttributeValue](attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeValue)]* + +Attributes associated with the record, indexed by attribute name. + +* **Return type:** + dict[str, [`AttributeValue`](attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeValue)] + +#### SEE ALSO +[`Table.bulk_fetch()`](table.md#ansys.grantami.core.mi_tree_classes.Table.bulk_fetch) +: Fetch attributes for multiple records in a single call. + +### Notes + +Makes a Service Layer call if the `record.attributes` dictionary is empty when accessed. + + + +#### *property* children *: [List](https://docs.python.org/3/library/typing.html#typing.List)[[Record](#ansys.grantami.core.mi_record_classes.Record)]* + +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()`](#ansys.grantami.core.mi_record_classes.Record.get_descendants), +[`Record.refetch_children()`](#ansys.grantami.core.mi_record_classes.Record.refetch_children) or [`Table.all_records()`](table.md#ansys.grantami.core.mi_tree_classes.Table.all_records), which all apply subset filtering. If the +[`Table`](table.md#ansys.grantami.core.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()`](#ansys.grantami.core.mi_record_classes.Record.refetch_children). The default subset filtering behavior is applied. + +* **Return type:** + list[[`Record`](#ansys.grantami.core.mi_record_classes.Record)] +* **Raises:** + * [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – If more than one subset is applied to the table when dynamically retrieving children records. + * [**InvalidRecordStateError**](exceptions.md#ansys.grantami.core.mi_meta_classes.InvalidRecordStateError) – If the record has not been pushed to the server. + +### Notes + +Makes a Service Layer call if there is no cached list of children. + + + +#### *property* color *: [RecordColor](constants.md#ansys.grantami.core.mi_constants.RecordColor)* + +Color of the record when displayed in MI Viewer and other Granta MI applications. + +If the [`Record`](#ansys.grantami.core.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`](#ansys.grantami.core.mi_record_classes.Record) color will be set to the specified value. +* If `color` is set to [`None`](https://docs.python.org/3/library/constants.html#None), the [`Record`](#ansys.grantami.core.mi_record_classes.Record) color will be reset to the exported value. + +If the [`Record`](#ansys.grantami.core.mi_record_classes.Record) object represents a new record: + +* The `color` property will initially return the value specified in the [`Record`](#ansys.grantami.core.mi_record_classes.Record) constructor. If not + set, it will default to the value `InheritFromParent`. +* If `color` is modified, the [`Record`](#ansys.grantami.core.mi_record_classes.Record) color will be set to the specified value. +* If `color` is set to [`None`](https://docs.python.org/3/library/constants.html#None), the [`Record`](#ansys.grantami.core.mi_record_classes.Record) color will be set to the value `InheritFromParent`. + +* **Return type:** + [`RecordColor`](constants.md#ansys.grantami.core.mi_constants.RecordColor) + +### Notes + +Makes a Service Layer call if the record exists on the server and the color has not already been fetched. + +If a [`Record`](#ansys.grantami.core.mi_record_classes.Record) is imported with `color` set to [`None`](https://docs.python.org/3/library/constants.html#None), the record will inherit the color of the +parent record. + + + +#### *property* created_by *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +User who created the record. + +Read-only property. This property is populated from a pseudo-attribute value and can be refreshed via +[`refetch_pseudo_attributes()`](#ansys.grantami.core.mi_record_classes.Record.refetch_pseudo_attributes). + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) +* **Raises:** + [**InvalidRecordStateError**](exceptions.md#ansys.grantami.core.mi_meta_classes.InvalidRecordStateError) – If the record has not been pushed to the server. + +### Notes + +Makes a Service Layer call if the pseudo-attributes have not yet been fetched for this record. + + + +#### *property* created_on *: [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime)* + +Datetime of the record creation. + +Read-only property. This property is populated from a pseudo-attribute value and can be refreshed via +[`refetch_pseudo_attributes()`](#ansys.grantami.core.mi_record_classes.Record.refetch_pseudo_attributes). + +* **Return type:** + [datetime.datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime) +* **Raises:** + [**InvalidRecordStateError**](exceptions.md#ansys.grantami.core.mi_meta_classes.InvalidRecordStateError) – If the record has not been pushed to the server. + +### Notes + +Makes a Service Layer call if the pseudo-attributes have not yet been fetched for this record. + + + +#### *property* data_revision_history *: Dict[[str](https://docs.python.org/3/library/stdtypes.html#str), [DataRevisionHistory](supporting.md#ansys.grantami.core.mi_meta_classes.DataRevisionHistory)]* + +Data revision history for all attributes, indexed by attribute name. + +* **Return type:** + dict[str, [`DataRevisionHistory`](supporting.md#ansys.grantami.core.mi_meta_classes.DataRevisionHistory)] +* **Raises:** + [**InvalidRecordStateError**](exceptions.md#ansys.grantami.core.mi_meta_classes.InvalidRecordStateError) – If the record has not been pushed to the server. + +### Notes + +Makes a Service Layer call if the data revision history has not already been fetched for this record. + + + +#### *property* db_key *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Database key for the database the record belongs to. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* exists_on_server *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Whether the record exists on the server ([`True`](https://docs.python.org/3/library/constants.html#True)) or has been created in memory ([`False`](https://docs.python.org/3/library/constants.html#False)). + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* flag_for_release *: [bool](https://docs.python.org/3/library/functions.html#bool) | [None](https://docs.python.org/3/library/constants.html#None)* + +Whether the record will be made available to users when it is next updated. + +* [`True`](https://docs.python.org/3/library/constants.html#True) (default): If changes were made to the [`Record`](#ansys.grantami.core.mi_record_classes.Record), a new version will be created and then + immediately released. If changes were not made to the [`Record`](#ansys.grantami.core.mi_record_classes.Record), the existing version will be released. +* [`False`](https://docs.python.org/3/library/constants.html#False): If changes were made to the [`Record`](#ansys.grantami.core.mi_record_classes.Record), a new, unreleased version will be created. The + record will not be released. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) or None + +### Notes + +If you do not have the correct permissions to change release states, setting this property will not have the +documented effect. See the Service Layer documentation for more details. + + + +#### *property* history_guid *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +Record history GUID. + +* **Returns:** + [`None`](https://docs.python.org/3/library/constants.html#None) for records that do not exist on the server. +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + +### Notes + +Records in unversioned tables can be uniquely identified by their record history GUID. + +For records in versioned tables, the record history guid refers to the latest version of the record the user has +access to. + + + +#### *property* history_identity *: [int](https://docs.python.org/3/library/functions.html#int) | [None](https://docs.python.org/3/library/constants.html#None)* + +Record history identity. + +* **Returns:** + [`None`](https://docs.python.org/3/library/constants.html#None) for records that do not exist on the server. +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) or None + +### Notes + +Do not use, use [`history_guid`](#ansys.grantami.core.mi_record_classes.Record.history_guid) instead. + + + +#### *property* is_folder *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Whether the record is a [`RecordType.Folder`](constants.md#ansys.grantami.core.mi_constants.RecordType.Folder) type. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* is_writable *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Whether the current user has write permissions on the record. + +Read-only property. This property is populated from a pseudo-attribute value and can be refreshed via +[`refetch_pseudo_attributes()`](#ansys.grantami.core.mi_record_classes.Record.refetch_pseudo_attributes). + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) +* **Raises:** + [**InvalidRecordStateError**](exceptions.md#ansys.grantami.core.mi_meta_classes.InvalidRecordStateError) – If the record has not been pushed to the server. + +### Notes + +Makes a Service Layer call if the pseudo-attributes have not yet been fetched for this record. + + + +#### *property* last_modified_by *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +User who last modified the record. + +Read-only property. This property is populated from a pseudo-attribute value and can be refreshed via +[`refetch_pseudo_attributes()`](#ansys.grantami.core.mi_record_classes.Record.refetch_pseudo_attributes). + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) +* **Raises:** + [**InvalidRecordStateError**](exceptions.md#ansys.grantami.core.mi_meta_classes.InvalidRecordStateError) – If the record has not been pushed to the server. + +### Notes + +Makes a Service Layer call if the pseudo-attributes have not yet been fetched for this record. + + + +#### *property* last_modified_on *: [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime)* + +Datetime of the last modification. + +Read-only property. This property is populated from a pseudo-attribute value and can be refreshed via +[`refetch_pseudo_attributes()`](#ansys.grantami.core.mi_record_classes.Record.refetch_pseudo_attributes). + +* **Return type:** + [datetime.datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime) +* **Raises:** + [**InvalidRecordStateError**](exceptions.md#ansys.grantami.core.mi_meta_classes.InvalidRecordStateError) – If the record has not been pushed to the server. + +### Notes + +Makes a Service Layer call if the pseudo-attributes have not yet been fetched for this record. + + + +#### *property* links *: [Dict](https://docs.python.org/3/library/typing.html#typing.Dict)[[str](https://docs.python.org/3/library/stdtypes.html#str), [Set](https://docs.python.org/3/library/typing.html#typing.Set)[[Record](#ansys.grantami.core.mi_record_classes.Record)]]* + +Link groups for this [`Record`](#ansys.grantami.core.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. + +* **Return type:** + dict[str, set[[`Record`](#ansys.grantami.core.mi_record_classes.Record)]] + + + +#### *property* mi *: [Session](session.md#ansys.grantami.core.mi.Session)* + +Session used to create or access the record. + +Used for any Service Layer calls made by the [`Record`](#ansys.grantami.core.mi_record_classes.Record) object. + +* **Return type:** + [`Session`](session.md#ansys.grantami.core.mi.Session) + + + +#### *property* name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Long name of record. + +If the [`Record`](#ansys.grantami.core.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`](#ansys.grantami.core.mi_record_classes.Record) name will be set to the specified value. +* If the property is set to [`None`](https://docs.python.org/3/library/constants.html#None), the [`Record`](#ansys.grantami.core.mi_record_classes.Record) name will be reset to the exported value. + +If the [`Record`](#ansys.grantami.core.mi_record_classes.Record) object represents a new record: + +* The property will initially return the value specified in the [`Record`](#ansys.grantami.core.mi_record_classes.Record) constructor. +* If the property is modified, the [`Record`](#ansys.grantami.core.mi_record_classes.Record) name will be set to the specified value. +* If the property is set to [`None`](https://docs.python.org/3/library/constants.html#None), the [`Record`](#ansys.grantami.core.mi_record_classes.Record) name will be set to [`None`](https://docs.python.org/3/library/constants.html#None). + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + +### Notes + +If a [`Record`](#ansys.grantami.core.mi_record_classes.Record) is imported with `name` set to [`None`](https://docs.python.org/3/library/constants.html#None), a `ValueError` is raised. + + + +#### *property* parent *: [Record](#ansys.grantami.core.mi_record_classes.Record) | [Table](table.md#ansys.grantami.core.mi_tree_classes.Table)* + +Parent record or table of this record. + +* **Return type:** + [`Record`](#ansys.grantami.core.mi_record_classes.Record), [`Table`](table.md#ansys.grantami.core.mi_tree_classes.Table), or [`None`](https://docs.python.org/3/library/constants.html#None) +* **Raises:** + * [**PermissionError**](https://docs.python.org/3/library/exceptions.html#PermissionError) – If parent record cannot be accessed due to access control. + * [**InvalidRecordStateError**](exceptions.md#ansys.grantami.core.mi_meta_classes.InvalidRecordStateError) – If the record has not been pushed to the server. + +### Notes + +Makes a Service Layer call if the parent has not already been fetched. + + + +#### *property* parent_record_history_identity *: [int](https://docs.python.org/3/library/functions.html#int)* + +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 property is populated from a pseudo-attribute value and can be refreshed via +[`refetch_pseudo_attributes()`](#ansys.grantami.core.mi_record_classes.Record.refetch_pseudo_attributes). + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) +* **Raises:** + [**InvalidRecordStateError**](exceptions.md#ansys.grantami.core.mi_meta_classes.InvalidRecordStateError) – If the record has not been pushed to the server. + +### Notes + +Makes a Service Layer call if the pseudo-attributes have not yet been fetched for this record. + + + +#### *property* parent_record_name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +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 property is populated from a pseudo-attribute value and can be refreshed via +[`refetch_pseudo_attributes()`](#ansys.grantami.core.mi_record_classes.Record.refetch_pseudo_attributes). + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) +* **Raises:** + [**InvalidRecordStateError**](exceptions.md#ansys.grantami.core.mi_meta_classes.InvalidRecordStateError) – If the record has not been pushed to the server. + +### Notes + +Makes a Service Layer call if the pseudo-attributes have not yet been fetched for this record. + + + +#### *property* parent_record_short_name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +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 property is populated from a pseudo-attribute value and can be refreshed via +[`refetch_pseudo_attributes()`](#ansys.grantami.core.mi_record_classes.Record.refetch_pseudo_attributes). + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) +* **Raises:** + [**InvalidRecordStateError**](exceptions.md#ansys.grantami.core.mi_meta_classes.InvalidRecordStateError) – If the record has not been pushed to the server. + +### Notes + +Makes a Service Layer call if the pseudo-attributes have not yet been fetched for this record. + + + +#### *property* path *: [List](https://docs.python.org/3/library/typing.html#typing.List)[[str](https://docs.python.org/3/library/stdtypes.html#str)]* + +Browse tree path for the record as a list of folder short names. + +* **Raises:** + [**InvalidRecordStateError**](exceptions.md#ansys.grantami.core.mi_meta_classes.InvalidRecordStateError) – If the record has not been pushed to the server. +* **Return type:** + [list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str)] + +### Notes + +Makes a Service Layer call if the path has not already been fetched. + + + +#### *property* record_guid *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +Record version GUID. + +* **Returns:** + [`None`](https://docs.python.org/3/library/constants.html#None) for records that do not exist on the server. +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + +### Notes + +Records in unversioned and versioned tables can be uniquely identified by their record version GUID. + +For records in versioned tables, the record version guid refers to a specific version of a record. + + + +#### *property* record_history *: [RecordVersionHistory](supporting.md#ansys.grantami.core.mi_meta_classes.RecordVersionHistory)* + +Details about the record history. + +Includes user, datetime, and notes associated with events of the record’s life cycle. + +* **Return type:** + [`RecordVersionHistory`](supporting.md#ansys.grantami.core.mi_meta_classes.RecordVersionHistory) +* **Raises:** + [**InvalidRecordStateError**](exceptions.md#ansys.grantami.core.mi_meta_classes.InvalidRecordStateError) – If the record has not been pushed to the server. + +### Notes + +Makes a Service Layer call if the [`refetch_record_release_state()`](#ansys.grantami.core.mi_record_classes.Record.refetch_record_release_state) method has not already been called on +this record. + + + +#### *property* release_state *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Release state of the record. + +Allowed values are `Released`, `Superseded`, `Withdrawn`, `Unreleased`, `Unversioned` or `Unknown`. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) +* **Raises:** + [**InvalidRecordStateError**](exceptions.md#ansys.grantami.core.mi_meta_classes.InvalidRecordStateError) – If the record has not been pushed to the server. + +### Notes + +Makes a Service Layer call if the [`refetch_record_release_state()`](#ansys.grantami.core.mi_record_classes.Record.refetch_record_release_state) method has not already been called on +this record. + + + +#### *property* released_on *: [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime)* + +Datetime of the record release. + +Read-only property. This property is populated from a pseudo-attribute value and can be refreshed via +[`refetch_pseudo_attributes()`](#ansys.grantami.core.mi_record_classes.Record.refetch_pseudo_attributes). + +* **Return type:** + [datetime.datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime) +* **Raises:** + [**InvalidRecordStateError**](exceptions.md#ansys.grantami.core.mi_meta_classes.InvalidRecordStateError) – If the record has not been pushed to the server. + +### Notes + +Makes a Service Layer call if the pseudo-attributes have not yet been fetched for this record. + + + +#### *property* short_name *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +Short (tree) name of the record. + +If the [`Record`](#ansys.grantami.core.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`](#ansys.grantami.core.mi_record_classes.Record) short name will be set to the specified value. +* If `short_name` is set to [`None`](https://docs.python.org/3/library/constants.html#None), the [`Record`](#ansys.grantami.core.mi_record_classes.Record) short name will be reset to the exported value. + +If the [`Record`](#ansys.grantami.core.mi_record_classes.Record) object represents a new record: + +* The `short_name` property will initially return the value specified in the [`Record`](#ansys.grantami.core.mi_record_classes.Record) constructor. +* If `short_name` is modified, the [`Record`](#ansys.grantami.core.mi_record_classes.Record) short name will be set to the specified value. +* If `short_name` is set to [`None`](https://docs.python.org/3/library/constants.html#None), the [`Record`](#ansys.grantami.core.mi_record_classes.Record) short name will be set to [`None`](https://docs.python.org/3/library/constants.html#None). + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str), optional + +### Notes + +Makes a Service Layer call if the record exists on the server and the short name has not already been fetched. + +If a [`Record`](#ansys.grantami.core.mi_record_classes.Record) is imported with `short_name` set to [`None`](https://docs.python.org/3/library/constants.html#None), the short name will default to the +record name. + + + +#### *property* subsets *: [Set](https://docs.python.org/3/library/typing.html#typing.Set)[[str](https://docs.python.org/3/library/stdtypes.html#str)]* + +Subsets that the record belongs to. + +* **Return type:** + [set](https://docs.python.org/3/library/stdtypes.html#set)[[str](https://docs.python.org/3/library/stdtypes.html#str)] + +### Notes + +Makes a Service Layer call if the record exists on the server and the subsets have not already been fetched. + + + +#### *property* table *: [Table](table.md#ansys.grantami.core.mi_tree_classes.Table)* + +Parent table the record belongs to. + +* **Return type:** + [`Table`](table.md#ansys.grantami.core.mi_tree_classes.Table) + + + +#### *property* table_name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Name of parent table. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* type *: [RecordType](constants.md#ansys.grantami.core.mi_constants.RecordType)* + +Record type. + +On record creation via the MI Scripting Toolkit, the record type can only be set to [`RecordType.Folder`](constants.md#ansys.grantami.core.mi_constants.RecordType.Folder) +or [`RecordType.Record`](constants.md#ansys.grantami.core.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`](constants.md#ansys.grantami.core.mi_constants.RecordType.Generic) during the update. + +* **Return type:** + [RecordType](constants.md#ansys.grantami.core.mi_constants.RecordType) +* **Raises:** + [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – If the record exists on the server and an attempt is made to change its type. If this property is set to + [`RecordType.Generic`](constants.md#ansys.grantami.core.mi_constants.RecordType.Generic). + + + +#### *property* version_number *: [int](https://docs.python.org/3/library/functions.html#int) | [None](https://docs.python.org/3/library/constants.html#None)* + +Record version number. + +This is set to None if the record is in a non version-controlled table. + +Read-only property. This property is populated from a pseudo-attribute value and can be refreshed via +[`refetch_pseudo_attributes()`](#ansys.grantami.core.mi_record_classes.Record.refetch_pseudo_attributes). + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) or None +* **Raises:** + [**InvalidRecordStateError**](exceptions.md#ansys.grantami.core.mi_meta_classes.InvalidRecordStateError) – If the record has not been pushed to the server. + +### Notes + +Makes a Service Layer call if the pseudo-attributes have not yet been fetched for this record. + + + +#### *property* viewer_url *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +The MI Viewer URL for the record. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) +* **Raises:** + [**InvalidRecordStateError**](exceptions.md#ansys.grantami.core.mi_meta_classes.InvalidRecordStateError) – If the record has not been pushed to the server. diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/streamlined_api/session.md b/2026R1/scripting-toolkit-dev-portal-26-r1/streamlined_api/session.md new file mode 100644 index 0000000000..feb0282162 --- /dev/null +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/streamlined_api/session.md @@ -0,0 +1,519 @@ +# Session + + + + + + + +### *class* Session + +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. + +Use [`SessionBuilder`](#ansys.grantami.core.mi.SessionBuilder) to create a session and authenticate via one of the supported modes of authentication. + +### Examples + +Authenticating using Windows authentication + +```pycon +>>> session = SessionBuilder( +... service_layer_url="https://my_server_name/mi_servicelayer", +... ).with_autologon() +``` + +Authenticating using credentials and setting timeout and retries + +```pycon +>>> session = SessionBuilder( +... service_layer_url="https://my_server_name/mi_servicelayer", +... session_configuration=SessionConfiguration( +... timeout=200000, +... max_retries=1, +... ) +... ).with_credentials(username="username", password="password") +``` + + + +#### bulk_delete_or_withdraw_records(records, batch_size=100, parallelize=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. + +#### Versionchanged +Changed in version 4.2: Argument `parallelise` was renamed to `parallelize`. + +* **Parameters:** + * **records** ([*list*](https://docs.python.org/3/library/stdtypes.html#list) *[*[*Record*](record.md#ansys.grantami.core.mi_record_classes.Record) *]*) – List of records to delete or withdraw. + * **batch_size** ([*int*](https://docs.python.org/3/library/functions.html#int) *,* *default: 100*) – Number of records to process in each batch. + * **parallelize** (bool, default: [`False`](https://docs.python.org/3/library/constants.html#False)) – Whether to parallelize the operation. + * **max_num_threads** ([*int*](https://docs.python.org/3/library/functions.html#int) *,* *default: 6*) – Maximum number of threads to use when parallelizing. + * **update_release_states** (bool, default: [`False`](https://docs.python.org/3/library/constants.html#False)) – Whether to update release states after deletion/withdrawal. + * **withdrawal_notes** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* *optional*) – Notes to add when withdrawing records. +* **Raises:** + [**InvalidRecordStateError**](exceptions.md#ansys.grantami.core.mi_meta_classes.InvalidRecordStateError) – If one or more records have not been pushed to the server. + +#### WARNING +`parallelize=True` should not be set when using long-running sessions authenticated via OIDC. See +[OIDC and parallel operation](../release_notes/known_issues.md#oidc-known-issue) for more details. + + + +#### bulk_fetch_release_states(records, batch_size=100, parallelize=False, max_num_threads=6) + +Fetches and populates the release states of the specified [`Record`](record.md#ansys.grantami.core.mi_record_classes.Record) objects. + +#### Versionchanged +Changed in version 4.2: Argument `parallelise` was renamed to `parallelize`. + +* **Parameters:** + * **records** ([*list*](https://docs.python.org/3/library/stdtypes.html#list) *[*[*Record*](record.md#ansys.grantami.core.mi_record_classes.Record) *]*) – List of records to fetch release states for. + * **batch_size** ([*int*](https://docs.python.org/3/library/functions.html#int) *,* *default: 100*) – Number of records to process in each batch. + * **parallelize** (bool, default: [`False`](https://docs.python.org/3/library/constants.html#False)) – Whether to parallelize the fetch operation. + * **max_num_threads** ([*int*](https://docs.python.org/3/library/functions.html#int) *,* *default: 6*) – Maximum number of threads to use when parallelizing. +* **Raises:** + [**InvalidRecordStateError**](exceptions.md#ansys.grantami.core.mi_meta_classes.InvalidRecordStateError) – If one or more records have not been pushed to the server. + +#### WARNING +`parallelize` should not be set to [`True`](https://docs.python.org/3/library/constants.html#True) when using long-running sessions authenticated via +OIDC. See [OIDC and parallel operation](../release_notes/known_issues.md#oidc-known-issue) for more details. + +#### SEE ALSO +[`Table.bulk_fetch_all_record_versions()`](table.md#ansys.grantami.core.mi_tree_classes.Table.bulk_fetch_all_record_versions) +: Also populates the [`Record.all_versions`](record.md#ansys.grantami.core.mi_record_classes.Record.all_versions) property. + + + +#### 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` + +* **Parameters:** + * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* *optional*) – Database name. + * **db_key** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* *optional*) – Database key. + * **guid** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* *optional*) – Database GUID. + * **version_guid** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* *optional*) – Database version GUID. +* **Returns:** + Database object matching the specified criteria. +* **Return type:** + [Database](database.md#ansys.grantami.core.mi_tree_classes.Database) +* **Raises:** + * [**KeyError**](https://docs.python.org/3/library/exceptions.html#KeyError) – If multiple databases are found for the same criteria. + * [**KeyError**](https://docs.python.org/3/library/exceptions.html#KeyError) – If no databases are found matching the provided criteria. + * [**KeyError**](https://docs.python.org/3/library/exceptions.html#KeyError) – If no criteria are provided. + + + +#### 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 version GUID): Uniquely identifies specific record version. +2. `history_identity` (record history identity): Uniquely identifies record only. Can be optionally + combined with `version_number` (record version number) to identify a specific record version. +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*](https://docs.python.org/3/library/stdtypes.html#str)) – Database key. + * **hguid** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* *optional*) – Record history GUID, uniquely identifies record. + * **vguid** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* *optional*) – Record version GUID, uniquely identifies record version. + * **history_identity** ([*int*](https://docs.python.org/3/library/functions.html#int) *,* *optional*) – Record history identity. + * **version_number** ([*int*](https://docs.python.org/3/library/functions.html#int) *,* *optional*) – Record version number. +* **Returns:** + Record object with the specified ID. +* **Return type:** + [Record](record.md#ansys.grantami.core.mi_record_classes.Record) + + + +#### get_records_by_ids(record_identifiers) + +Returns a [`Record`](record.md#ansys.grantami.core.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`](https://docs.python.org/3/library/constants.html#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 version GUID): Uniquely identifies specific record version. +2. `history_identity` (record history identity): Uniquely identifies record only. Can be optionally + combined with `version_number` (record version number) to identify a specific record version. +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*](https://docs.python.org/3/library/stdtypes.html#dict) *[*[*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* [*str*](https://docs.python.org/3/library/stdtypes.html#str) *|* [*int*](https://docs.python.org/3/library/functions.html#int) *]* *]*) – Sequence of dictionaries containing record identifiers. +* **Returns:** + List of Record objects corresponding to the identifiers, or [`None`](https://docs.python.org/3/library/constants.html#None) if the reference did not identify a + resolvable record. +* **Return type:** + [list](https://docs.python.org/3/library/stdtypes.html#list)[[Record](record.md#ansys.grantami.core.mi_record_classes.Record) | None] + + + +#### 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 + +#### WARNING +This method raises a `win32ctypes.pywin32.pywintypes.error` when it is used to persist a refresh token +longer than 1280 characters in the Windows Credential Manager. If this error is raised, use an alternative +keyring backend. A list of alternative backends are available on the [keyring PyPI page](https://pypi.org/project/keyring/). + + + +#### records_from_string(text, use_strict_version=True) + +Generates [`Record`](record.md#ansys.grantami.core.mi_record_classes.Record) objects from a tab separated values (.tsv) record list. + +* **Parameters:** + * **text** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – The text string defining the record list. + * **use_strict_version** (bool, default: [`True`](https://docs.python.org/3/library/constants.html#True)) – If [`True`](https://docs.python.org/3/library/constants.html#True), return only the specified version of the record (if you do not have permission, the item + will be [`None`](https://docs.python.org/3/library/constants.html#None)). If [`False`](https://docs.python.org/3/library/constants.html#False), return the latest visible version of the record. +* **Return type:** + [list](https://docs.python.org/3/library/stdtypes.html#list)[[Record](record.md#ansys.grantami.core.mi_record_classes.Record) | None] + +### Notes + +The required string format to identify a record is tab separated values (.tsv) with column headers +`RecordHistoryGuid`, `RecordGuid`, `Table`, `DatabaseKey` and `RecordFullName`. This format may be +generated by copying an MI Viewer record list to the clipboard. + +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. + +In One MI, use MI Favorites and PyGranta RecordLists to transfer a collection of records from the browser to +Scripting Toolkit. + + + +#### refetch_dbs() + +Fetches the list of databases from the server. + +### Notes + +Makes a Service Layer call. + + + +#### search_for_records_by_name(name) + +Searches by record name over all databases (uses [`Database.search_for_records_by_name()`](database.md#ansys.grantami.core.mi_tree_classes.Database.search_for_records_by_name)). + +* **Parameters:** + **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – The name of the record to search for. +* **Return type:** + [list](https://docs.python.org/3/library/stdtypes.html#list)[[Record](record.md#ansys.grantami.core.mi_record_classes.Record)] + +### Notes + +Makes a Service Layer call for each table in each database. + + + +#### search_for_records_by_text(text) + +Performs a simple text search over all databases (uses [`Database.search_for_records_by_text()`](database.md#ansys.grantami.core.mi_tree_classes.Database.search_for_records_by_text)). + +* **Parameters:** + **text** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – The text to search for. +* **Return type:** + [list](https://docs.python.org/3/library/stdtypes.html#list)[[Record](record.md#ansys.grantami.core.mi_record_classes.Record)] + +### Notes + +Makes a Service Layer call for each table in each database. + + + +#### 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`](record.md#ansys.grantami.core.mi_record_classes.Record) objects. If refresh_attributes set to [`True`](https://docs.python.org/3/library/constants.html#True), the +imported records’ attributes are exported after the update is complete. + +* **Parameters:** + * **records** ([*list*](https://docs.python.org/3/library/stdtypes.html#list) *[*[*Record*](record.md#ansys.grantami.core.mi_record_classes.Record) *]*) – List of records to update. + * **update_attributes** (bool, default: [`True`](https://docs.python.org/3/library/constants.html#True)) – Whether to include attribute updates. + * **update_links** (bool, default: [`False`](https://docs.python.org/3/library/constants.html#False)) – Whether to include link updates. + * **refresh_attributes** (bool, default: [`True`](https://docs.python.org/3/library/constants.html#True)) – Whether to include updated attribute values in the returned records. See Notes for more details. + * **include_binary_data_in_refresh** (bool, default: [`False`](https://docs.python.org/3/library/constants.html#False)) – Whether to include binary data in the refresh. See Notes for more details. + * **notes** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* *optional*) – Revision notes for the update. Applies to all records in the update. + * **release_notes** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* *optional*) – Version release notes for the update. Applies to all records flagged for release in the update. +* **Returns:** + List of successfully updated Record objects. +* **Return type:** + [list](https://docs.python.org/3/library/stdtypes.html#list)[[Record](record.md#ansys.grantami.core.mi_record_classes.Record)] +* **Raises:** + * [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – If a [`Record`](record.md#ansys.grantami.core.mi_record_classes.Record) is imported with `name` set to [`None`](https://docs.python.org/3/library/constants.html#None). + * [**UnexportedBinaryDataError**](exceptions.md#ansys.grantami.core.mi_meta_classes.UnexportedBinaryDataError) – If a tabular attribute has been modified destructively and contains unexported binary data that has not + been overwritten. + +#### WARNING +If `include_binary_data_in_refresh` is set to [`False`](https://docs.python.org/3/library/constants.html#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()`](table.md#ansys.grantami.core.mi_tree_classes.Table.bulk_fetch) is unaffected. + +### Notes + +If `refresh_attributes` is set to [`True`](https://docs.python.org/3/library/constants.html#True) (default), the data will be re-exported after import. If data +is not required for subsequent operations, setting `refresh_attributes` to [`False`](https://docs.python.org/3/library/constants.html#False) can improve +performance of this operation significantly. + +If `include_binary_data_in_refresh` is set to [`False`](https://docs.python.org/3/library/constants.html#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`](supporting.md#ansys.grantami.core.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`](supporting.md#ansys.grantami.core.mi_attribute_value_classes.BinaryType.url) property is populated. +* `include_binary_data_in_refresh = True`: The [`BinaryType.binary_data`](supporting.md#ansys.grantami.core.mi_attribute_value_classes.BinaryType.binary_data) property, and + [`AttributeFile.save()`](attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeFile.save) and [`AttributePicture.save()`](attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributePicture.save) methods are all available to access and save + the binary data. The [`BinaryType.url`](supporting.md#ansys.grantami.core.mi_attribute_value_classes.BinaryType.url) property is empty and returns [`None`](https://docs.python.org/3/library/constants.html#None). + + + +#### 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`](record.md#ansys.grantami.core.mi_record_classes.Record) objects. All source and target records must be exported +to/from the server before being linked. + +* **Parameters:** + **records** ([*list*](https://docs.python.org/3/library/stdtypes.html#list) *[*[*Record*](record.md#ansys.grantami.core.mi_record_classes.Record) *]*) – List of records to update links for. +* **Returns:** + List of successfully updated Record objects. +* **Return type:** + [list](https://docs.python.org/3/library/stdtypes.html#list)[[Record](record.md#ansys.grantami.core.mi_record_classes.Record)] +* **Raises:** + [**InvalidRecordStateError**](exceptions.md#ansys.grantami.core.mi_meta_classes.InvalidRecordStateError) – If one or more records have not been pushed to the server. + + + +#### *property* dbs *: [List](https://docs.python.org/3/library/typing.html#typing.List)[[Database](database.md#ansys.grantami.core.mi_tree_classes.Database)]* + +List of databases on the server. + +* **Return type:** + [list](https://docs.python.org/3/library/stdtypes.html#list)[[Database](database.md#ansys.grantami.core.mi_tree_classes.Database)] + + + +#### *property* dbs_by_guid *: [Dict](https://docs.python.org/3/library/typing.html#typing.Dict)[[str](https://docs.python.org/3/library/stdtypes.html#str), [Database](database.md#ansys.grantami.core.mi_tree_classes.Database)]* + +Dictionary of databases on the server, indexed by database GUID + +* **Return type:** + [dict](https://docs.python.org/3/library/stdtypes.html#dict)[[str](https://docs.python.org/3/library/stdtypes.html#str), [Database](database.md#ansys.grantami.core.mi_tree_classes.Database)] +* **Raises:** + [**KeyError**](https://docs.python.org/3/library/exceptions.html#KeyError) – If multiple databases have the same GUID. + + + +#### *property* dbs_by_key *: [Dict](https://docs.python.org/3/library/typing.html#typing.Dict)[[str](https://docs.python.org/3/library/stdtypes.html#str), [Database](database.md#ansys.grantami.core.mi_tree_classes.Database)]* + +Dictionary of databases on the server, indexed by database key. + +* **Return type:** + [dict](https://docs.python.org/3/library/stdtypes.html#dict)[[str](https://docs.python.org/3/library/stdtypes.html#str), [Database](database.md#ansys.grantami.core.mi_tree_classes.Database)] + + + +#### *property* refresh_token *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +The refresh token returned by the OIDC identity provider if one was provided. + +If a refresh token was not returned by the OIDC identity provider, the initial provided token is returned. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str), optional + +#### WARNING +Refresh tokens are bearer tokens that grant access to the Granta MI server, and so should be treated as +confidential. To use a refresh token for unattended Scripting Toolkit authentication, use the +[`persist_oidc_token()`](#ansys.grantami.core.mi.Session.persist_oidc_token) method to persist the refresh token in a secure credential store. + + + +#### *property* service_layer_url *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Service Layer URL. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* viewer_base_url *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +MI Viewer URL associated with the Service Layer. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +### *class* SessionBuilder(service_layer_url, session_configuration) + +Builds a [`Session`](#ansys.grantami.core.mi.Session). + +* **Parameters:** + * **service_layer_url** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – Granta MI Service Layer URL. + * **session_configuration** ([*SessionConfiguration*](#ansys.grantami.core.mi.SessionConfiguration) *,* *optional*) – Additional settings for the connection. + +### Notes + +If MI Scripting Toolkit has been installed on the Granta MI application server, then the Granta MI application +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. + + + +#### with_oidc() + +Connect with OIDC. + +* **Returns:** + An OIDC Session builder to finalize the OIDC connection. +* **Return type:** + [OIDCSessionBuilder](#ansys.grantami.core.mi.OIDCSessionBuilder) + + + +#### with_autologon() + +Connect with Windows Authentication. + +* **Return type:** + [Session](#ansys.grantami.core.mi.Session) + + + +#### with_credentials(username, password, domain=None, store_password=False) + +Connect using provided credentials. + +* **Parameters:** + * **username** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – Username for the connection. + * **password** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – Password for the connection. + * **domain** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* *optional*) – Domain to use for the connection. + * **store_password** (bool, default: [`False`](https://docs.python.org/3/library/constants.html#False)) – Set to [`True`](https://docs.python.org/3/library/constants.html#True) if additional sessions need to be spawned, for example when parallelization is required. +* **Return type:** + [Session](#ansys.grantami.core.mi.Session) + + + +### *class* OIDCSessionBuilder + +OIDC session builder. + +Returned by [`SessionBuilder.with_oidc()`](#ansys.grantami.core.mi.SessionBuilder.with_oidc). + + + +#### with_access_token(token) + +Authenticate the user via the provided access token. + +Access tokens have short lifespans. The session will no longer be authenticated once the token expires. + +* **Parameters:** + **token** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – Access token. +* **Return type:** + [Session](#ansys.grantami.core.mi.Session) + + + +#### with_authorization_code_flow() + +Authenticate the user interactively via a web browser. + +Requires a web browser on the client machine. + +* **Return type:** + [Session](#ansys.grantami.core.mi.Session) + + + +#### with_device_code_flow() + +Authenticate the user interactively using device code flow. + +* **Return type:** + [Session](#ansys.grantami.core.mi.Session) + + + +#### with_refresh_token(token) + +Authenticate the user via the provided refresh token. + +* **Parameters:** + **token** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – Refresh token. +* **Return type:** + [Session](#ansys.grantami.core.mi.Session) + + + +#### with_stored_token() + +Authenticate the user via a persisted token. + +The token must have been persisted to the system credential manager via [`Session.persist_oidc_token()`](#ansys.grantami.core.mi.Session.persist_oidc_token). + +* **Return type:** + [Session](#ansys.grantami.core.mi.Session) + + + +### *class* SessionConfiguration(timeout=300000, max_retries=0, \*\*kwargs) + +Configuration for a session. + +* **Parameters:** + * **timeout** ([*int*](https://docs.python.org/3/library/functions.html#int) *,* *default: 300000*) – Maximum time to wait for a response, in milliseconds. + * **max_retries** ([*int*](https://docs.python.org/3/library/functions.html#int) *,* *default: 0*) – Maximum number of times to retry requests sent to the Service Layer. diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/streamlined_api/supporting.md b/2026R1/scripting-toolkit-dev-portal-26-r1/streamlined_api/supporting.md new file mode 100644 index 0000000000..68e1363e6f --- /dev/null +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/streamlined_api/supporting.md @@ -0,0 +1,2923 @@ +# Schema and supporting items + + + + + + + + + +## Schema + + + +### *class* LinkGroupDetails + +Provides access to the properties of a record link group. + +### Notes + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`Database.record_link_groups`](database.md#ansys.grantami.core.mi_tree_classes.Database.record_link_groups) to access instances of this class. + + + +#### *property* database_from *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Database key of the database the link group originates from. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* database_to *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Database key of the database target by the link group. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Name of the record link group. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* reverse_name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Name of the record link group in the return direction. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* table_from *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Name of the table the link group comes from. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* table_to *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Name of the table targeted by the link group. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* type *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Whether the record link group is ‘static’, ‘crossDatabase’ or ‘dynamic’. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +### *class* TableLayout + +Represents a layout for a table in the database. + +Provides individually accessible categories, or a full representation of the layout as a JSON-style object. + +### Notes + +Do not create instances of this class; it represents a pre-existing database structure. Use [`Table.layouts`](table.md#ansys.grantami.core.mi_tree_classes.Table.layouts) +to access instances of this class. + + + +#### meta_attributes_on(attribute_name) + +Returns the list of meta-attributes corresponding to a given attribute in this layout. + +* **Parameters:** + **attribute_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – Name of the attribute. +* **Return type:** + [list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str)] + + + +#### *property* attributes_by_category *: [Dict](https://docs.python.org/3/library/typing.html#typing.Dict)[[str](https://docs.python.org/3/library/stdtypes.html#str), [List](https://docs.python.org/3/library/typing.html#typing.List)[[str](https://docs.python.org/3/library/stdtypes.html#str)]]* + +Dictionary of attribute lists, indexed by the layout category they are in. + +* **Return type:** + [dict](https://docs.python.org/3/library/stdtypes.html#dict)[[str](https://docs.python.org/3/library/stdtypes.html#str), [list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str)]] + + + +#### *property* categories *: [List](https://docs.python.org/3/library/typing.html#typing.List)[[str](https://docs.python.org/3/library/stdtypes.html#str)]* + +List of all the categories (headings) in the layout. + +* **Return type:** + [list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str)] + + + +#### *property* layout *: [List](https://docs.python.org/3/library/typing.html#typing.List)[[Dict](https://docs.python.org/3/library/typing.html#typing.Dict)[[str](https://docs.python.org/3/library/stdtypes.html#str), [str](https://docs.python.org/3/library/stdtypes.html#str) | [List](https://docs.python.org/3/library/typing.html#typing.List)[[str](https://docs.python.org/3/library/stdtypes.html#str)] | [Dict](https://docs.python.org/3/library/typing.html#typing.Dict)[[str](https://docs.python.org/3/library/stdtypes.html#str), [str](https://docs.python.org/3/library/stdtypes.html#str) | [List](https://docs.python.org/3/library/typing.html#typing.List)[[str](https://docs.python.org/3/library/stdtypes.html#str)]]]]* + +JSON-style representation of the layout. + +* **Return type:** + [list](https://docs.python.org/3/library/stdtypes.html#list)[[dict](https://docs.python.org/3/library/stdtypes.html#dict)[[str](https://docs.python.org/3/library/stdtypes.html#str), [str](https://docs.python.org/3/library/stdtypes.html#str) or [list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str)] or [dict](https://docs.python.org/3/library/stdtypes.html#dict)[[str](https://docs.python.org/3/library/stdtypes.html#str), [str](https://docs.python.org/3/library/stdtypes.html#str) or [list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str)]]]] + + + +#### *property* link_groups_by_category *: [Dict](https://docs.python.org/3/library/typing.html#typing.Dict)[[str](https://docs.python.org/3/library/stdtypes.html#str), [List](https://docs.python.org/3/library/typing.html#typing.List)[[str](https://docs.python.org/3/library/stdtypes.html#str)]]* + +Dictionary of link group lists, indexed by the layout category they are in. + +* **Return type:** + [dict](https://docs.python.org/3/library/stdtypes.html#dict)[[str](https://docs.python.org/3/library/stdtypes.html#str), [list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str)]] + + + +#### *property* meta_attributes_by_attribute *: [Dict](https://docs.python.org/3/library/typing.html#typing.Dict)[[str](https://docs.python.org/3/library/stdtypes.html#str), [List](https://docs.python.org/3/library/typing.html#typing.List)[[str](https://docs.python.org/3/library/stdtypes.html#str)]]* + +Dictionary of meta-attribute lists, indexed by parent attributes. + +* **Return type:** + [dict](https://docs.python.org/3/library/stdtypes.html#dict)[[str](https://docs.python.org/3/library/stdtypes.html#str), [list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str)]] + + + +#### *property* name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Layout name. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +### *class* Exporter + +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. + +### Notes + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`get_available_exporters()`](table.md#ansys.grantami.core.mi_tree_classes.Table.get_available_exporters) to retrieve exporters for a given table. + + + +#### export_list_is_valid(records) + +Verifies that a list of records is valid for export. + +* **Parameters:** + **records** (list[[`Record`](record.md#ansys.grantami.core.mi_record_classes.Record)]) – List of records to validate. +* **Returns:** + Whether the specified list of records can be exported with this exporter. +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### get_parameters_required_for_export(records) + +Returns a dictionary of all the parameter definitions the Exporter requires to export the data. + +Returns parameters required from the specified list of records, indexed by parameter name. + +* **Parameters:** + **records** (list[[`Record`](record.md#ansys.grantami.core.mi_record_classes.Record)]) – List of records to export. +* **Return type:** + dict[str, [`ExporterParameter`](#ansys.grantami.core.mi_attribute_classes.ExporterParameter)] +* **Raises:** + [**InvalidRecordStateError**](exceptions.md#ansys.grantami.core.mi_meta_classes.InvalidRecordStateError) – If one or more records have not been pushed to the server. + + + +#### 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`](record.md#ansys.grantami.core.mi_record_classes.Record)]) – List of records to export. + * **stop_before** ([*int*](https://docs.python.org/3/library/functions.html#int) *or* [*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* *optional*) – Either refers to the index of the transform step (int) or its name (str). + * **parameter_defs** (dict[str, [`ExporterParameter`](#ansys.grantami.core.mi_attribute_classes.ExporterParameter)], optional) – Dictionary of exporter parameters. + * **sig_figs** ([*int*](https://docs.python.org/3/library/functions.html#int) *,* *optional*) – Number of significant figures for numerical data. +* **Returns:** + Contains data output by the exporter. +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) +* **Raises:** + [**InvalidRecordStateError**](exceptions.md#ansys.grantami.core.mi_meta_classes.InvalidRecordStateError) – If one or more records have not been pushed to the server. + + + +#### save(file_path, file_name=None, file_extension=None) + +Saves the output of the last FEA export to the path provided. + +Uses 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*](https://docs.python.org/3/library/stdtypes.html#str) *or* [*pathlib.Path*](https://docs.python.org/3/library/pathlib.html#pathlib.Path)) – File path of the form *C:\\Users\\Username\\*. + * **file_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* *optional*) – Output file name. Does not require a file extension. + * **file_extension** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* *optional*) – Output file extension. + + + +#### *property* absolute_temperatures_optional *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Whether this exporter allows the user to specify absolute or relative temperatures. + +If [`True`](https://docs.python.org/3/library/constants.html#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. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* default_bom *: [bytes](https://docs.python.org/3/library/stdtypes.html#bytes) | [None](https://docs.python.org/3/library/constants.html#None)* + +Returns the default byte-order mark as defined by the exporter configuration file. + +If no BOM is required by default, this property is [`None`](https://docs.python.org/3/library/constants.html#None). + +* **Return type:** + bytes or [`None`](https://docs.python.org/3/library/constants.html#None) + + + +#### *property* default_encoding *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Returns the default file encoding scheme as defined by the exporter configuration file. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + +### Notes + +This is returned as a Python-compatible string (e.g. “cp1252”) rather than the .NET codepage “1252”. + + + +#### *property* default_file_extension *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Returns the default file extension as defined by the exporter configuration file. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* default_file_name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Returns the default file name for the last performed export. + +As defined by the exporter configuration file. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* description *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +The Exporter description. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* exporter_key *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +The unique key that is used to identify the exporter. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* model *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +The Finite-Element Material Model name. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + +### Notes + +This name is exported to the initial XML file, and appears in the MI Viewer and MI Explore export interfaces. + + + +#### *property* name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +The name of the exporter, as defined in the `.exp` file. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* package *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +The Package defines the name of the target CAE analysis package. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + +### Notes + +This name is exported to the initial XML file, and appears in the MI Viewer and MI Explore export interfaces. + + + +#### *property* transforms *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[ExporterTransform](#ansys.grantami.core.mi_exporters.ExporterTransform)]* + +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 provided to the [`Exporter.run_exporter()`](#ansys.grantami.core.mi_exporters.Exporter.run_exporter) `stop_before` argument to selectively run +transformation steps. + +* **Return type:** + [list](https://docs.python.org/3/library/stdtypes.html#list)[[ExporterTransform](#ansys.grantami.core.mi_exporters.ExporterTransform)] + + + +#### *property* unit_system *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +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. + +* **Return type:** + str or [`None`](https://docs.python.org/3/library/constants.html#None) + + + +#### *property* unit_systems *: [List](https://docs.python.org/3/library/typing.html#typing.List)[[str](https://docs.python.org/3/library/stdtypes.html#str)]* + +All the unit-systems this exporter supports. + +* **Return type:** + [list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str)] + + + +#### *property* use_absolute_temperatures *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Whether this exporter should use absolute temperatures. + +If [`True`](https://docs.python.org/3/library/constants.html#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. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +### *class* ExporterTransform + +Dictionary representing a transformation step defined for an [`Exporter`](#ansys.grantami.core.mi_exporters.Exporter). + +Provide the `id` or `index` to the [`Exporter.run_exporter()`](#ansys.grantami.core.mi_exporters.Exporter.run_exporter) `stop_before` argument to selectively run +transformation steps. + + + +#### id *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +ID of the transform step. + + + +#### index *: [int](https://docs.python.org/3/library/functions.html#int)* + +Index of the transform step. + + + + + +## Parameters + + + +### *class* ParameterDefinition + +Base class for parameters. + +Provides access to parameter properties such as revision history, default and possible values, and units. + +### Notes + +Do not create instances of this class; it represents an abstract database structure. + + + +#### reset_unit() + +Resets the unit back to its original value when the parameter was initially exported. + + + +#### *property* axis_scale_type *: [Literal](https://docs.python.org/3/library/typing.html#typing.Literal)['Linear', 'Log'] | [None](https://docs.python.org/3/library/constants.html#None)* + +Axis scale type for the parameter. + +* **Returns:** + [`None`](https://docs.python.org/3/library/constants.html#None) for discrete parameters. +* **Return type:** + [`ScaleType`](constants.md#ansys.grantami.core.mi_constants.ScaleType) or [`None`](https://docs.python.org/3/library/constants.html#None) + + + +#### *property* data_type *: [Literal](https://docs.python.org/3/library/typing.html#typing.Literal)['Numeric', 'Discrete']* + +Parameter data type. + +* **Returns:** + One of ‘Numeric’ or ‘Discrete’. +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) +* **Raises:** + [**NotImplementedError**](https://docs.python.org/3/library/exceptions.html#NotImplementedError) – If the parameter type is not supported. + + + +#### *property* database_unit *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +Database unit symbol for the parameter. + +* **Return type:** + str or [`None`](https://docs.python.org/3/library/constants.html#None) + + + +#### *property* default_value *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [float](https://docs.python.org/3/library/functions.html#float)* + +Default value of the parameter. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or [float](https://docs.python.org/3/library/functions.html#float) + + + +#### *property* history *: [ObjectHistory](#ansys.grantami.core.mi_meta_classes.ObjectHistory)* + +Revision history of the parameter. + +* **Return type:** + [`ObjectHistory`](#ansys.grantami.core.mi_meta_classes.ObjectHistory) + + + +#### *property* history_of_default *: [ObjectHistory](#ansys.grantami.core.mi_meta_classes.ObjectHistory)* + +Revision history of the parameter’s default value. + +* **Return type:** + [`ObjectHistory`](#ansys.grantami.core.mi_meta_classes.ObjectHistory) + + + +#### *property* id *: [int](https://docs.python.org/3/library/functions.html#int)* + +Parameter identifier. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* interpolation_type *: [Literal](https://docs.python.org/3/library/typing.html#typing.Literal)['None', 'Linear', 'Cubic Spline']* + +The interpolation type for the parameter. + +* **Return type:** + [`InterpolationType`](constants.md#ansys.grantami.core.mi_constants.InterpolationType) + + + +#### *property* name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Parameter name. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* restricted *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Whether the parameter is restricted to specific values. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* unit *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +Unit symbol for the parameter. + +* **Return type:** + str or [`None`](https://docs.python.org/3/library/constants.html#None) + +### Notes + +This property is used to specify a unit in the following situations: + +* Specify a unit on an object of any [`ParameterDefinition`](#ansys.grantami.core.mi_attribute_classes.ParameterDefinition) subclass to control the unit of the values + returned by the [`default_value`](#ansys.grantami.core.mi_attribute_classes.ParameterDefinition.default_value) and [`values`](#ansys.grantami.core.mi_attribute_classes.ParameterDefinition.values) properties on that object. +* Specify a unit on an [`ExporterParameter`](#ansys.grantami.core.mi_attribute_classes.ExporterParameter) object to provide a value with a different unit to the + [`ExporterParameter.value_for_exporters`](#ansys.grantami.core.mi_attribute_classes.ExporterParameter.value_for_exporters) property. + +This property does not impact data export. Attribute parameter values are always exported according to the +[`Database.unit_system`](database.md#ansys.grantami.core.mi_tree_classes.Database.unit_system) and [`Database.absolute_temperatures`](database.md#ansys.grantami.core.mi_tree_classes.Database.absolute_temperatures) settings. + + + +#### *property* values *: [List](https://docs.python.org/3/library/typing.html#typing.List)[[str](https://docs.python.org/3/library/stdtypes.html#str) | [float](https://docs.python.org/3/library/functions.html#float)]* + +List of all possible values the parameter can take. + +* **Return type:** + [list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str) or [float](https://docs.python.org/3/library/functions.html#float)] + + + +#### *property* values_histories *: [List](https://docs.python.org/3/library/typing.html#typing.List)[[ObjectHistory](#ansys.grantami.core.mi_meta_classes.ObjectHistory)]* + +Revision histories of each possible value of a parameter. + +* **Return type:** + list[[`ObjectHistory`](#ansys.grantami.core.mi_meta_classes.ObjectHistory)] + + + +### *class* DatabaseParameter + +Bases: [`ParameterDefinition`](#ansys.grantami.core.mi_attribute_classes.ParameterDefinition) + +Definition of a parameter at the database level. + +### Notes + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`Database.parameters`](database.md#ansys.grantami.core.mi_tree_classes.Database.parameters) to access instances of this class. + + + +### *class* AttributeParameter + +Bases: [`DatabaseParameter`](#ansys.grantami.core.mi_attribute_classes.DatabaseParameter) + +Definition of a parameter as configured for an attribute. + +Inherited properties [`ParameterDefinition.default_value`](#ansys.grantami.core.mi_attribute_classes.ParameterDefinition.default_value), [`ParameterDefinition.axis_scale_type`](#ansys.grantami.core.mi_attribute_classes.ParameterDefinition.axis_scale_type), and +[`ParameterDefinition.interpolation_type`](#ansys.grantami.core.mi_attribute_classes.ParameterDefinition.interpolation_type) can differ from the database parameter definition. + +### Notes + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`AttributeDefinitionMultiValue.parameters`](attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinitionMultiValue.parameters) to access instances of this class. + + + +#### *property* order *: [int](https://docs.python.org/3/library/functions.html#int)* + +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. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* parent_attribute *: [AttributeDefinitionMultiValue](attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinitionMultiValue)* + +Attribute to which this parameter applies. + +* **Return type:** + [`AttributeDefinitionMultiValue`](attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinitionMultiValue) + + + +### *class* PointValueParameter + +Parameter information that is associated with a point attribute value. + +### Notes + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`AttributePointMulti.parameters`](attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributePointMulti.parameters) to access instances of this class. + + + +#### *property* name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Parameter name. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* unit *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +Unit symbol for the parameter. + +Defines the unit of the values for this parameter when importing into a point attribute. + +* **Returns:** + Unit symbol as str if units are used, else [`None`](https://docs.python.org/3/library/constants.html#None). +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + + + +### *class* ExporterParameter + +Bases: [`DatabaseParameter`](#ansys.grantami.core.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 output. If the value is not set then the database parameter +default value will be used. + +### Notes + +Do not create instances of this class manually. Use [`Exporter.get_parameters_required_for_export()`](#ansys.grantami.core.mi_exporters.Exporter.get_parameters_required_for_export) to +generate instances of this class. + + + +#### clear_value_for_exporters() + +Clear the value on the [`ExporterParameter`](#ansys.grantami.core.mi_attribute_classes.ExporterParameter) instance and return it to the default value. + + + +#### *property* value_for_exporters *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [float](https://docs.python.org/3/library/functions.html#float)* + +Value on the [`ExporterParameter`](#ansys.grantami.core.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 the database +schema. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or [float](https://docs.python.org/3/library/functions.html#float) + + + +### *class* FunctionalValueParameter + +Parameter that is associated with a functional attribute value. + +Used to override parameter settings for an individual attribute value. + +#### WARNING +When importing data, if [`FunctionalValueParameter`](#ansys.grantami.core.mi_attribute_value_classes.FunctionalValueParameter) object attributes are modified and the parameter is not +populated in the parent attribute value, the modification will be ignored during import. A `UserWarning` will be +emitted. + +When exporting data, parameter settings may exist even if the parameter has no value on the parent attribute. These +parameter settings will be exported correctly. + +### Notes + +Do not create instances of this class; it represents a pre-existing database structure. Use the `parameters` +property of a functional attribute value, for example [`AttributeFunctionalSeriesPoint.parameters`](attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalSeriesPoint.parameters), to access +instances of this class. + + + +#### *property* axis_scale_type *: [Literal](https://docs.python.org/3/library/typing.html#typing.Literal)['Linear', 'Log'] | [None](https://docs.python.org/3/library/constants.html#None)* + +The scale type for the parameter. + +* **Returns:** + If set to [`None`](https://docs.python.org/3/library/constants.html#None), the value is inherited from the parameter definition associated with the parent + attribute definition. +* **Return type:** + [`ScaleType`](constants.md#ansys.grantami.core.mi_constants.ScaleType) or None +* **Raises:** + * [**TypeError**](https://docs.python.org/3/library/exceptions.html#TypeError) – If providing a non-string value. + * [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – If providing an invalid scale type. + +#### SEE ALSO +[`effective_axis_scale_type`](#ansys.grantami.core.mi_attribute_value_classes.FunctionalValueParameter.effective_axis_scale_type) +: The effective value of this property, taking inheritance into account if the property is set to [`None`](https://docs.python.org/3/library/constants.html#None). + + + +#### *property* default_value *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [float](https://docs.python.org/3/library/functions.html#float) | [None](https://docs.python.org/3/library/constants.html#None)* + +Default value for the parameter. + +* **Returns:** + Parameter default value. If set to [`None`](https://docs.python.org/3/library/constants.html#None), the value is inherited from the parameter definition associated + with the parent attribute definition. +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or [float](https://docs.python.org/3/library/functions.html#float) or None +* **Raises:** + * [**TypeError**](https://docs.python.org/3/library/exceptions.html#TypeError) – If providing a non-float value for a numeric parameter or a non-str value for a discrete parameter. + * [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – If the string value is not in the allowed values list. + +#### SEE ALSO +[`effective_default_value`](#ansys.grantami.core.mi_attribute_value_classes.FunctionalValueParameter.effective_default_value) +: The effective value of this property, taking inheritance into account if the property is set to [`None`](https://docs.python.org/3/library/constants.html#None). + + + +#### *property* effective_axis_scale_type *: [Literal](https://docs.python.org/3/library/typing.html#typing.Literal)['Linear', 'Log'] | [None](https://docs.python.org/3/library/constants.html#None)* + +Effective scale type, inherited from the attribute parameter if not defined on the datum. + +None for all discrete parameters. + +* **Return type:** + [`ScaleType`](constants.md#ansys.grantami.core.mi_constants.ScaleType) or None + + + +#### *property* effective_default_value *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [float](https://docs.python.org/3/library/functions.html#float)* + +Effective default value, inherited from the attribute parameter if not defined on the datum. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or [float](https://docs.python.org/3/library/functions.html#float) + + + +#### *property* effective_interpolation_type *: [Literal](https://docs.python.org/3/library/typing.html#typing.Literal)['None', 'Linear', 'Cubic Spline']* + +Effective interpolation type, inherited from the attribute parameter if not defined on the datum. + +* **Return type:** + [`InterpolationType`](constants.md#ansys.grantami.core.mi_constants.InterpolationType) + + + +#### *property* interpolation_type *: [Literal](https://docs.python.org/3/library/typing.html#typing.Literal)['None', 'Linear', 'Cubic Spline'] | [None](https://docs.python.org/3/library/constants.html#None)* + +The interpolation type for the parameter. + +* **Returns:** + If set to [`None`](https://docs.python.org/3/library/constants.html#None), the value is inherited from the parameter definition associated with the parent + attribute definition. +* **Return type:** + [`InterpolationType`](constants.md#ansys.grantami.core.mi_constants.InterpolationType) or None +* **Raises:** + * [**TypeError**](https://docs.python.org/3/library/exceptions.html#TypeError) – If providing a non-string value. + * [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – If providing an invalid interpolation type. + +#### SEE ALSO +[`effective_interpolation_type`](#ansys.grantami.core.mi_attribute_value_classes.FunctionalValueParameter.effective_interpolation_type) +: The effective value of this property, taking inheritance into account if the property is set to [`None`](https://docs.python.org/3/library/constants.html#None). + + + +#### *property* name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Parameter name. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* unit *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +Unit symbol for the parameter. + +Defines the unit of the values for this parameter when importing into a functional attribute. + +* **Returns:** + Unit symbol as str if units are used, else [`None`](https://docs.python.org/3/library/constants.html#None). +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + +#### WARNING +The [`unit`](#ansys.grantami.core.mi_attribute_value_classes.FunctionalValueParameter.unit) property affects both the [`default_value`](#ansys.grantami.core.mi_attribute_value_classes.FunctionalValueParameter.default_value) and the functional attribute parameter +value for import. If the unit is modified, you must make sure that both the [`default_value`](#ansys.grantami.core.mi_attribute_value_classes.FunctionalValueParameter.default_value) and the +corresponding functional attribute data contain values consistent with the new unit. + + + + + +## Item history + + + +### *class* ObjectHistory + +Provides access to the revision history of an MI database element. + +Object histories are currently supported via the following properties: + +* [`AttributeDefinition.history`](attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinition.history) +* [`AttributeDefinitionTabular.column_histories`](attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinitionTabular.column_histories) +* [`ParameterDefinition.history`](#ansys.grantami.core.mi_attribute_classes.ParameterDefinition.history) +* [`ParameterDefinition.history_of_default`](#ansys.grantami.core.mi_attribute_classes.ParameterDefinition.history_of_default) +* [`ParameterDefinition.values_histories`](#ansys.grantami.core.mi_attribute_classes.ParameterDefinition.values_histories) +* [`DataRevisionHistory.history`](#ansys.grantami.core.mi_meta_classes.DataRevisionHistory.history) + +### Notes + +Do not create instances of this class; it represents a pre-existing database structure. Use the properties listed +above to access instances of this class. + + + +#### *property* created_at *: [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime)* + +Date and time the database element was created. + +* **Return type:** + [datetime.datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime) + + + +#### *property* created_by *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +The username of the user who created the database element. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* date_created *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Date the database element was created. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* last_modified_at *: [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime)* + +Date and time the database element was last modified. + +* **Return type:** + [datetime.datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime) + + + +#### *property* last_modified_by *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +The username of the last user to modify the database element. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* last_modified_date *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Date the database element was last modified. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* update_count *: [int](https://docs.python.org/3/library/functions.html#int)* + +The number of times the object has been updated. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + + + +### *class* RecordVersionHistory + +Provides access to the revision history of an MI Record. + +### Notes + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`Record.record_history`](record.md#ansys.grantami.core.mi_record_classes.Record.record_history) to access an instance of this class. + + + +#### *property* created_at *: [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime)* + +Date and time the record version was created. + +* **Return type:** + [datetime.datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime) + + + +#### *property* created_by *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +The username of the user who created the record version. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* creation_notes *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Notes associated with the creation of the record version. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* last_modification_notes *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Notes associated with the last modification made to record version. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* last_modified_at *: [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime)* + +Date and time the record version was last modified. + +* **Return type:** + [datetime.datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime) + + + +#### *property* last_modified_by *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +The username of the user who last modified the record version. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* release_notes *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +Notes associated with the release of the record version. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + + + +#### *property* released_at *: [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime) | [None](https://docs.python.org/3/library/constants.html#None)* + +Date and time the record version was released. + +* **Return type:** + [datetime.datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime) or None + + + +#### *property* released_by *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +The username of the user who released the record version. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + + + +#### *property* superseded_at *: [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime) | [None](https://docs.python.org/3/library/constants.html#None)* + +Date and time the record version was superseded. + +* **Return type:** + [datetime.datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime) or None + + + +#### *property* superseded_by *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +The username of the user who superseded the record version. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + + + +#### *property* supersession_notes *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +Notes associated with the last operation that superseded the record version. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + + + +#### *property* withdrawal_notes *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +Notes associated with the withdrawal of the record version. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + + + +#### *property* withdrawn_at *: [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime) | [None](https://docs.python.org/3/library/constants.html#None)* + +Date and time the record version was withdrawn. + +* **Return type:** + [datetime.datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime) or None + + + +#### *property* withdrawn_by *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +The username of the user who withdrew the record version. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + + + + + +### *class* DataRevisionHistory + +Provides revision history information about the data in an attribute of a record. + +### Notes + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`Record.data_revision_history`](record.md#ansys.grantami.core.mi_record_classes.Record.data_revision_history) to access an instance of this class. + + + +#### *property* created_in_record_version *: [int](https://docs.python.org/3/library/functions.html#int)* + +Version of the record when this datum was created. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* data_version_number *: [int](https://docs.python.org/3/library/functions.html#int)* + +Data version number. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* history *: [ObjectHistory](#ansys.grantami.core.mi_meta_classes.ObjectHistory) | [None](https://docs.python.org/3/library/constants.html#None)* + +Revision history of the attribute data, as an [`ObjectHistory`](#ansys.grantami.core.mi_meta_classes.ObjectHistory) object. + +Is [`None`](https://docs.python.org/3/library/constants.html#None) for empty attributes. + +* **Return type:** + [`ObjectHistory`](#ansys.grantami.core.mi_meta_classes.ObjectHistory) or None + + + +#### *property* is_meta *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Whether the attribute is a meta-attribute or not. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* is_meta_for *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +Name of the parent attribute, if a meta-attribute. + +Returns [`None`](https://docs.python.org/3/library/constants.html#None) otherwise. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + + + +#### *property* is_populated *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Whether the attribute is populated. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* meta_attributes *: [Dict](https://docs.python.org/3/library/typing.html#typing.Dict)[[str](https://docs.python.org/3/library/stdtypes.html#str), [DataRevisionHistory](#ansys.grantami.core.mi_meta_classes.DataRevisionHistory)]* + +Data revision history of meta-attributes associated with this attribute, indexed by meta-attribute name. + +* **Return type:** + dict[str, [`DataRevisionHistory`](#ansys.grantami.core.mi_meta_classes.DataRevisionHistory)] + + + +#### *property* name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Name of the attribute. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* retired_in_record_version *: [int](https://docs.python.org/3/library/functions.html#int)* + +Version of the record when this datum was retired. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + + + +## Search criterion + + + +### *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`](attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinition). + +* **Parameters:** + * **attribute** ([*AttributeDefinition*](attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinition) *|* [*PseudoAttributeDefinition*](attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.PseudoAttributeDefinition)) – The subject of the search criterion. + * **operator** (*Literal* *[* *"LESS_THAN"* *,* *"GREATER_THAN"* *,* *"BETWEEN"* *,* *"CONTAINS_ANY"* *,* *"CONTAINS_ALL"* *,* *"CONTAINS"* *,* *"NOT_CONTAINS"* *,* *"EXISTS"* *,* *"NOT_EXISTS"* *,* *"EQUAL"* *]*) – The search mode for this criterion. The operator value must be compatible with the type of attribute or pseudo- + attribute specified in the `attribute` parameter. + * **value** ([*float*](https://docs.python.org/3/library/functions.html#float) *|* [*bool*](https://docs.python.org/3/library/functions.html#bool) *|* [*int*](https://docs.python.org/3/library/functions.html#int) *|* [*str*](https://docs.python.org/3/library/stdtypes.html#str) *|* *List* *[*[*str*](https://docs.python.org/3/library/stdtypes.html#str) *]* *|* [*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple) *[*[*datetime.datetime*](https://docs.python.org/3/library/datetime.html#datetime.datetime) *,* [*datetime.datetime*](https://docs.python.org/3/library/datetime.html#datetime.datetime) *]* *|* [*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple) *[*[*datetime.date*](https://docs.python.org/3/library/datetime.html#datetime.date) *,* [*datetime.date*](https://docs.python.org/3/library/datetime.html#datetime.date) *]* *|* [*list*](https://docs.python.org/3/library/stdtypes.html#list) *[*[*float*](https://docs.python.org/3/library/functions.html#float) *]* *|* [*RecordColor*](constants.md#ansys.grantami.core.mi_constants.RecordColor) *|* [*RecordType*](constants.md#ansys.grantami.core.mi_constants.RecordType) *|* *None*) – The value used in this criterion. The value type must correspond to the type of attribute or pseudo-attribute + specified in the `attribute` parameter. + * **column_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *|* *None*) – For tabular attributes, the name of the column to which this search criterion applies. Required when the + operator is `EQUAL`. + +### Notes + +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. + +[`datetime`](https://docs.python.org/3/library/datetime.html#datetime.datetime) values default to UTC if no timezone information is provided. + + + +#### *property* attribute *: [AttributeDefinition](attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinition) | [PseudoAttributeDefinition](attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.PseudoAttributeDefinition)* + +[`AttributeDefinition`](attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinition) or [`PseudoAttributeDefinition`](attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.PseudoAttributeDefinition) for the attribute used in this search criterion. + +* **Return type:** + [AttributeDefinition](attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinition) | [PseudoAttributeDefinition](attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.PseudoAttributeDefinition) + + + +#### *property* operation *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Operator used in this criterion, if provided. + +* **Example:** + ‘EXISTS’ or ‘CONTAINS’ +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +## Media attribute values + + + + + +### *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. This class wraps files and images for inclusion in the corresponding MI Scripting Toolkit class. + + + +#### load(path) + +Populates the object with the data located on `path`. + +Relative paths are permitted. + +* **Parameters:** + **path** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *or* [*pathlib.Path*](https://docs.python.org/3/library/pathlib.html#pathlib.Path)) – Path to the object to load. + + + +#### save(path) + +Saves an object to file location `path`. + +Relative paths are permitted. + +* **Parameters:** + **path** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *or* [*pathlib.Path*](https://docs.python.org/3/library/pathlib.html#pathlib.Path)) – Path where the object should be saved. + + + +#### *property* binary_data *: [bytes](https://docs.python.org/3/library/stdtypes.html#bytes) | [None](https://docs.python.org/3/library/constants.html#None)* + +The binary data for the file. + +Binary data can be set with a bytes object or file buffer. + +* **Return type:** + [bytes](https://docs.python.org/3/library/stdtypes.html#bytes) or None +* **Raises:** + [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – If binary data is available on the server but has not been exported. + + + +#### *property* is_empty *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Checks whether the [`BinaryType`](#ansys.grantami.core.mi_attribute_value_classes.BinaryType) object is populated by checking whether there is binary data in the +object. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* mime_file_type *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +MIME (Multipurpose Internet Mail Extensions) file type. + +If this object is populated via export, the `mime_file_type` property returns the MIME file type stored in +Granta MI. + +If this object is populated via [`load()`](#ansys.grantami.core.mi_attribute_value_classes.BinaryType.load) or setting the [`binary_data`](#ansys.grantami.core.mi_attribute_value_classes.BinaryType.binary_data) property, the +`mime_file_type` property is populated using the `filetype` library. If `filetype` cannot determine the +MIME file type, the `mime_file_type` property is set to [`None`](https://docs.python.org/3/library/constants.html#None) and Granta MI determines the MIME file +type during import. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + +### Notes + +The [filetype PyPI page](https://pypi.org/project/filetype) lists supported MIME types. + + + +#### *property* url *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +URL of the hosted file. + +* **Returns:** + URL to the file stored in the parent Granta MI attribute, or [`None`](https://docs.python.org/3/library/constants.html#None) if the URL was not populated. +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + +### Notes + +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()`](table.md#ansys.grantami.core.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`](https://docs.python.org/3/library/constants.html#None). + + + +#### *property* value *: [bytes](https://docs.python.org/3/library/stdtypes.html#bytes) | [None](https://docs.python.org/3/library/constants.html#None)* + +The binary data of the hosted file, if exported. + +[`None`](https://docs.python.org/3/library/constants.html#None) if the attribute was exported with `include_binary_data = False`. + +* **Return type:** + bytes or [`None`](https://docs.python.org/3/library/constants.html#None) + + + + + +### *class* Picture(\*, path=None) + +Extended [`BinaryType`](#ansys.grantami.core.mi_attribute_value_classes.BinaryType) class for Pictures in MI. + +* **Parameters:** + **path** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *or* [*pathlib.Path*](https://docs.python.org/3/library/pathlib.html#pathlib.Path) *,* *optional*) – Path to the image file to load. Takes the form `C:\\Users\\username\\Pictures\\image.jpg` or + `/home/username/Pictures/image.jpg`. + +### Notes + +Pictures of up to 500 MB in size may be stored in Granta MI. To upload pictures larger than 20 Mb using Scripting +Toolkit: + +* Granta MI Service Layer must be configured to allow large requests. If this is not configured, + [`Session.update()`](session.md#ansys.grantami.core.mi.Session.update) will raise a [`GRANTA_ServiceLayerError`](../foundation_api.md#ansys.grantami.backend.soap.GRANTA_Exceptions.GRANTA_ServiceLayerError) for a “413 Request Entity Too Large” HTTP + response. For more information, contact your Ansys Technical Representative. +* The Python client environment must have sufficient system resources to load and Base64-encode the binary data. If + there are insufficient system resources, unhandled Python exceptions may be raised. + + + +#### load(path) + +Populates the Picture object with the image located on `path`. + +Relative paths are permitted. + +* **Parameters:** + **path** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *or* [*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`. + + + +#### save(path) + +Saves a Picture object to file location `path`. + +Relative paths are permitted. + +* **Parameters:** + **path** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *or* [*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`. + + + + + +### *class* File(\*, path=None) + +Extended [`BinaryType`](#ansys.grantami.core.mi_attribute_value_classes.BinaryType) class for Files in MI. + +* **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) *]* *,* *optional*) – Path to the file to load. Takes the form `C:\\Users\\username\\Documents\\file.pdf` or + `/home/username/Documents/file.pdf`. + +### Notes + +Files of up to 500 MB in size may be stored in Granta MI. To upload files larger than 20 Mb using Scripting Toolkit: + +* Granta MI Service Layer must be configured to allow large requests. If this is not configured, + [`Session.update()`](session.md#ansys.grantami.core.mi.Session.update) will raise a [`GRANTA_ServiceLayerError`](../foundation_api.md#ansys.grantami.backend.soap.GRANTA_Exceptions.GRANTA_ServiceLayerError) for a “413 Request Entity Too Large” HTTP + response. For more information, contact your Ansys Technical Representative. +* The Python client environment must have sufficient system resources to load and Base64-encode the binary data. If + there are insufficient system resources, unhandled Python exceptions may be raised. + + + +#### load(path) + +Populates the File object with the file located by `path`. + +Relative paths are permitted. + +* **Parameters:** + **path** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *or* [*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`. + + + +#### save(path) + +Saves a File object to file location `path`. + +Relative paths are permitted. + +* **Parameters:** + **path** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *or* [*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`. + + + +#### *property* description *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +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. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None +* **Raises:** + [**TypeError**](https://docs.python.org/3/library/exceptions.html#TypeError) – If providing a non-string value. + + + +#### *property* file_name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Name of the file. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + + + +## Numeric attribute values + + + +### *class* ParameterizedPointValue(value, parameters=) + +Represents a point value with parameters in a multi-valued point attribute value. + +* **Parameters:** + * **value** ([*float*](https://docs.python.org/3/library/functions.html#float) *|* [*ValueWithPrecision*](#ansys.grantami.core.mi_meta_classes.ValueWithPrecision)) – The point float value. + * **parameters** ([*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple) *[*[*PointParameterValue*](#ansys.grantami.core._mi_value_classes.PointParameterValue) *,* *...* *]* *,* *optional*) – Tuple of [`PointParameterValue`](#ansys.grantami.core._mi_value_classes.PointParameterValue) objects. + +### Examples + +Point with no parameters: + +```pycon +>>> point = ParameterizedPointValue(value=1.0) +``` + +Point with parameters: + +```pycon +>>> point = ParameterizedPointValue( +... value=1.0, +... parameters=( +... PointParameterValue("Temperature", 25.0), +... PointParameterValue("Statistical basis", "A-basis"), +... ), +... ) +``` + +Point with precision information and parameters: + +```pycon +>>> point = ParameterizedPointValue( +... value=ValueWithPrecision(1.0, 3), +... parameters=( +... PointParameterValue("Temperature", 25.0), +... PointParameterValue("Statistical basis", "A-basis"), +... ), +... ) +``` + + + +#### *classmethod* from_data(value, parameters=None) + +Alternative constructor to create [`ParameterizedPointValue`](#ansys.grantami.core._mi_value_classes.ParameterizedPointValue) from more general data types. + +* **Parameters:** + * **value** (*SupportsFloat*) – The point float value. + * **parameters** (*Sequence* *[*[*PointParameterValue*](#ansys.grantami.core._mi_value_classes.PointParameterValue) *]* *,* *optional*) – Sequence of [`PointParameterValue`](#ansys.grantami.core._mi_value_classes.PointParameterValue) objects. +* **Return type:** + [ParameterizedPointValue](#ansys.grantami.core._mi_value_classes.ParameterizedPointValue) + + + +#### parameters *: [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)[[PointParameterValue](#ansys.grantami.core._mi_value_classes.PointParameterValue), ...]* + +Tuple of [`PointParameterValue`](#ansys.grantami.core._mi_value_classes.PointParameterValue) objects. + + + +#### *property* parameters_by_name *: mappingproxy[[str](https://docs.python.org/3/library/stdtypes.html#str), [str](https://docs.python.org/3/library/stdtypes.html#str) | [float](https://docs.python.org/3/library/functions.html#float)]* + +Returns a read-only mapping of parameter values by name. + +* **Return type:** + [`MappingProxyType`](https://docs.python.org/3/library/types.html#types.MappingProxyType) [str, str | float] + + + +#### value *: [float](https://docs.python.org/3/library/functions.html#float) | [ValueWithPrecision](#ansys.grantami.core.mi_meta_classes.ValueWithPrecision)* + +The point float value. + + + +### *class* PointParameterValue(name, value) + +Parameter value for a point in a multi-valued point value. + +* **Parameters:** + * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – The name of the parameter. + * **value** ([*float*](https://docs.python.org/3/library/functions.html#float) *|* [*str*](https://docs.python.org/3/library/stdtypes.html#str)) – The value of the parameter. This must be a [`float`](https://docs.python.org/3/library/functions.html#float) for numeric parameters, or [`str`](https://docs.python.org/3/library/stdtypes.html#str) for discrete + parameters. + +### Examples + +Numeric parameter: + +```pycon +>>> parameter = PointParameterValue( +... name="Temperature", +... value=25.0, +... ) +``` + +Discrete parameter: + +```pycon +>>> parameter = PointParameterValue( +... name="Statistical basis", +... value="A-basis", +... ) +``` + + + +#### *classmethod* from_data(name, value) + +Alternative constructor to create [`PointParameterValue`](#ansys.grantami.core._mi_value_classes.PointParameterValue) from more general data types. + +* **Parameters:** + * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – The name of the parameter. + * **value** (*SupportsFloat* *|* [*str*](https://docs.python.org/3/library/stdtypes.html#str)) – The value of the parameter. This must be a ‘float’-like for numeric parameters, or a ‘str’ for discrete + parameters. +* **Return type:** + [PointParameterValue](#ansys.grantami.core._mi_value_classes.PointParameterValue) + + + +#### name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +The name of the parameter. + + + +#### value *: [float](https://docs.python.org/3/library/functions.html#float) | [str](https://docs.python.org/3/library/stdtypes.html#str)* + +The value of the parameter. + + + +### *class* Range(low, high, low_value_is_inclusive=True, high_value_is_inclusive=True) + +Range value representation. + +* **Parameters:** + * **low** ([*float*](https://docs.python.org/3/library/functions.html#float) *|* [*ValueWithPrecision*](#ansys.grantami.core.mi_meta_classes.ValueWithPrecision) *|* *None*) – The lower bound value. Use [`None`](https://docs.python.org/3/library/constants.html#None) for an open-ended range. + * **high** ([*float*](https://docs.python.org/3/library/functions.html#float) *|* [*ValueWithPrecision*](#ansys.grantami.core.mi_meta_classes.ValueWithPrecision) *|* *None*) – The upper bound value. Use [`None`](https://docs.python.org/3/library/constants.html#None) for an open-ended range. + * **low_value_is_inclusive** ([*bool*](https://docs.python.org/3/library/functions.html#bool) *,* *optional*) – Whether the low value is included in the range. Defaults to [`True`](https://docs.python.org/3/library/constants.html#True). This property should only be set if the + [`low`](#ansys.grantami.core._mi_value_classes.Range.low) property has a value. If [`low`](#ansys.grantami.core._mi_value_classes.Range.low) is [`None`](https://docs.python.org/3/library/constants.html#None), this property has no effect on imported data. + * **high_value_is_inclusive** ([*bool*](https://docs.python.org/3/library/functions.html#bool) *,* *optional*) – Whether the high value is included in the range. Defaults to [`True`](https://docs.python.org/3/library/constants.html#True). This property should only be set if + the [`high`](#ansys.grantami.core._mi_value_classes.Range.high) property has a value. If [`high`](#ansys.grantami.core._mi_value_classes.Range.high) is [`None`](https://docs.python.org/3/library/constants.html#None), this property has no effect on imported + data. + +### Examples + +Range with default inclusiveness and values for the lower and upper bounds: + +```pycon +>>> value = Range(1.0, 2.0) +``` + +Range value using significant figures and specifying inclusiveness: + +```pycon +>>> value = Range( +... low=ValueWithPrecision(1.0, 2), +... high=2.0, +... low_value_is_inclusive=False, +... high_value_is_inclusive=False, +... ) +``` + +Open-ended range: + +```pycon +>>> value = Range(1.0, None) +``` + + + +#### *classmethod* from_data(value, low_value_is_inclusive=True, high_value_is_inclusive=True) + +Create a [`Range`](#ansys.grantami.core._mi_value_classes.Range) from data in various formats. + +* **Parameters:** + * **value** ([`Range_Value_Type`](#ansys.grantami.core._mi_value_classes.Range_Value_Type)) – Low and high values. + * **low_value_is_inclusive** ([*bool*](https://docs.python.org/3/library/functions.html#bool) *,* *optional*) – Whether the low value is included in the range. Defaults to [`True`](https://docs.python.org/3/library/constants.html#True). + * **high_value_is_inclusive** ([*bool*](https://docs.python.org/3/library/functions.html#bool) *,* *optional*) – Whether the high value is included in the range. Defaults to [`True`](https://docs.python.org/3/library/constants.html#True). +* **Returns:** + The created [`Range`](#ansys.grantami.core._mi_value_classes.Range) object. +* **Return type:** + [Range](#ansys.grantami.core._mi_value_classes.Range) + +### Examples + +From a dictionary with keys `low` and `high`: + +```pycon +>>> value = Range.from_data({"low": 1.0, "high": 2.0}) +``` + +From a tuple: + +```pycon +>>> value = Range.from_data((1.0, 2.0)) +``` + +From a list of integers: + +```pycon +>>> value = Range.from_data([1, 2]) +``` + +From a single float value: + +```pycon +>>> Range.from_data(1.0) +Range(low=1.0, high=1.0, low_value_is_inclusive=True, high_value_is_inclusive=True) +``` + + + +#### *property* as_dict *: [dict](https://docs.python.org/3/library/stdtypes.html#dict)[[str](https://docs.python.org/3/library/stdtypes.html#str), [float](https://docs.python.org/3/library/functions.html#float) | [ValueWithPrecision](#ansys.grantami.core.mi_meta_classes.ValueWithPrecision) | [None](https://docs.python.org/3/library/constants.html#None)]* + +Returns a dictionary representation of the range value with `low` and `high` keys. + +* **Return type:** + [dict](https://docs.python.org/3/library/stdtypes.html#dict)[[str](https://docs.python.org/3/library/stdtypes.html#str), [float](https://docs.python.org/3/library/functions.html#float) | [ValueWithPrecision](#ansys.grantami.core.mi_meta_classes.ValueWithPrecision) | None] + + + +#### high *: [float](https://docs.python.org/3/library/functions.html#float) | [ValueWithPrecision](#ansys.grantami.core.mi_meta_classes.ValueWithPrecision) | [None](https://docs.python.org/3/library/constants.html#None)* + +The upper bound value. + + + +#### high_value_is_inclusive *: [bool](https://docs.python.org/3/library/functions.html#bool)* *= True* + +Whether the high value is included in the range. + +This property should only be set if the [`high`](#ansys.grantami.core._mi_value_classes.Range.high) property has a value. If [`high`](#ansys.grantami.core._mi_value_classes.Range.high) is [`None`](https://docs.python.org/3/library/constants.html#None), this +property has no effect on imported data. + + + +#### low *: [float](https://docs.python.org/3/library/functions.html#float) | [ValueWithPrecision](#ansys.grantami.core.mi_meta_classes.ValueWithPrecision) | [None](https://docs.python.org/3/library/constants.html#None)* + +The lower bound value. + + + +#### low_value_is_inclusive *: [bool](https://docs.python.org/3/library/functions.html#bool)* *= True* + +Whether the low value is included in the range. + +This property should only be set if the [`low`](#ansys.grantami.core._mi_value_classes.Range.low) property has a value. If [`low`](#ansys.grantami.core._mi_value_classes.Range.low) is [`None`](https://docs.python.org/3/library/constants.html#None), this +property has no effect on imported data. + + + +### Range_Value_Type + +Valid values for use with [`Range.from_data()`](#ansys.grantami.core._mi_value_classes.Range.from_data). + +Alias of: + +* [`tuple`](https://docs.python.org/3/library/stdtypes.html#tuple) [[`Range_Extrema_Value_Type`](#ansys.grantami.core._mi_value_classes.Range_Extrema_Value_Type), [`Range_Extrema_Value_Type`](#ansys.grantami.core._mi_value_classes.Range_Extrema_Value_Type)] +* [`list`](https://docs.python.org/3/library/stdtypes.html#list) [[`Range_Extrema_Value_Type`](#ansys.grantami.core._mi_value_classes.Range_Extrema_Value_Type)] +* [`dict`](https://docs.python.org/3/library/stdtypes.html#dict) [[`Literal`](https://docs.python.org/3/library/typing.html#typing.Literal) [`"high"`, `"low"`], [`Range_Extrema_Value_Type`](#ansys.grantami.core._mi_value_classes.Range_Extrema_Value_Type)] +* Single [`Range_Extrema_Value_Type`](#ansys.grantami.core._mi_value_classes.Range_Extrema_Value_Type) for ranges with identical low and high values. + + + +### Range_Extrema_Value_Type + +alias of [`SupportsFloat`](https://docs.python.org/3/library/typing.html#typing.SupportsFloat) | [`ValueWithPrecision`](#ansys.grantami.core.mi_meta_classes.ValueWithPrecision) | [`None`](https://docs.python.org/3/library/constants.html#None) + + + +### *class* ValueWithPrecision(value, number_of_digits) + +Represents a float value with a specific precision defined as a number of decimal digits. + +Upon import the value is rounded at the specified number of digits. This class helps compute the number of +significant figures in a value. + +* **Parameters:** + * **value** ([*float*](https://docs.python.org/3/library/functions.html#float) *or* [*int*](https://docs.python.org/3/library/functions.html#int)) – Float value. + * **number_of_digits** ([*int*](https://docs.python.org/3/library/functions.html#int)) – Number of significant decimal places. +* **Raises:** + [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – If the value and precision would result in more than 15 significant figures or fewer than 1 significant figure. + +### Notes + +Up to 15 significant figures are supported. + + + +#### *property* as_decimal *: [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal)* + +Return a [`Decimal`](https://docs.python.org/3/library/decimal.html#decimal.Decimal) representation of the floating point value with the configured precision. + +* **Return type:** + [decimal.Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal) + +### Examples + +```pycon +>>> ValueWithPrecision(value=5.4, number_of_digits=2).as_decimal +Decimal('5.40') +``` + +```pycon +>>> ValueWithPrecision(value=5.4, number_of_digits=4).as_decimal +Decimal('5.4000') +``` + +```pycon +>>> ValueWithPrecision(value=5.4, number_of_digits=0).as_decimal +Decimal('5') +``` + + + +#### *property* number_of_digits *: [int](https://docs.python.org/3/library/functions.html#int)* + +Number of significant decimal places. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* significant_figures *: [int](https://docs.python.org/3/library/functions.html#int)* + +Number of significant figures, computed from the floating point value and number of digits. + +Significant figures as defined in an MI system include the number of digits in the integral and decimal parts +of the value. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + +### Examples + +```pycon +>>> ValueWithPrecision(value=5.5, number_of_digits=2).significant_figures +3 +``` + +```pycon +>>> ValueWithPrecision(value=10.2, number_of_digits=2).significant_figures +4 +``` + + + +#### *property* value *: [float](https://docs.python.org/3/library/functions.html#float)* + +Floating point value. + +* **Return type:** + [float](https://docs.python.org/3/library/functions.html#float) + + + +### *class* TrailingZeroInformation + +Trailing zero information for an exported attribute value. + +* **Parameters:** + * **entered_value** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – String representation of the imported floating-point value. + * **entered_unit** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – Unit symbol of the entered value. + * **significant_figures** ([*int*](https://docs.python.org/3/library/functions.html#int)) – Number of significant figures in the entered value. + +### Notes + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`ValueWithPrecision`](#ansys.grantami.core.mi_meta_classes.ValueWithPrecision) to create values with precision information. + + + +#### *property* as_decimal *: [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal)* + +Return a [`Decimal`](https://docs.python.org/3/library/decimal.html#decimal.Decimal) representation of the value. + +* **Return type:** + [decimal.Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal) + +### Examples + +2 m, measured to a precision of 1 mm: + +```pycon +>>> trailing_zero_information = TrailingZeroInformation("2", "m", 4) +>>> trailing_zero_information.as_decimal +Decimal('2.000') +``` + + + +#### *property* entered_unit *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Unit symbol in which the value with trailing zero information was imported. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* entered_value *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +String representation of the floating point value. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* number_of_digits *: [int](https://docs.python.org/3/library/functions.html#int)* + +Number of digits, computed from the entered value and significant figures. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* significant_figures *: [int](https://docs.python.org/3/library/functions.html#int)* + +Number of significant digits in the value, including trailing zeros. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + + + +## Functional attribute values + + + +### *class* SeriesPoint(\*, x, is_estimated=None, decoration=GraphDecoration.LINES, y, parameters=) + +Data that represents the value of a point series functional attribute. + +This class is a frozen [`dataclass`](https://docs.python.org/3/library/dataclasses.html#module-dataclasses). + +* **Parameters:** + * **x** ([*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple) *[*[*float*](https://docs.python.org/3/library/functions.html#float) *,* *...* *]* *|* [*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple) *[*[*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* *...* *]*) – Tuple of x-axis parameter values. + * **y** ([*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple) *[*[*float*](https://docs.python.org/3/library/functions.html#float) *,* *...* *]*) – Tuple of y-axis values. Must be the same length as the `x` parameter. + * **is_estimated** ([*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple) *[*[*bool*](https://docs.python.org/3/library/functions.html#bool) *,* *...* *]* *,* *optional*) – Whether points are estimated. Defaults to a tuple of [`False`](https://docs.python.org/3/library/constants.html#False) values. If provided, must be a tuple of + [`bool`](https://docs.python.org/3/library/functions.html#bool) values and must be the same length as the `x` and `y` parameters. + * **parameters** ([*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple) *[*[*SeriesParameterValue*](#ansys.grantami.core._mi_value_classes.SeriesParameterValue) *,* *...* *]* *,* *optional*) – Tuple of [`SeriesParameterValue`](#ansys.grantami.core._mi_value_classes.SeriesParameterValue) objects. + * **decoration** ([*GraphDecoration*](#ansys.grantami.core._mi_value_classes.GraphDecoration) *,* *optional*) – [`GraphDecoration`](#ansys.grantami.core._mi_value_classes.GraphDecoration) style. Defaults to [`GraphDecoration.LINES`](#ansys.grantami.core._mi_value_classes.GraphDecoration.LINES). + +### Examples + +Series with no extra parameters: + +```pycon +>>> series = SeriesPoint( +... x=(1.0, 2.0), +... y=(4.5, 5.5), +... ) +``` + +Series with additional parameters, all points marked as estimated, and using markers as the display type: + +```pycon +>>> series = SeriesPoint( +... x=(1.0, 2.0), +... y=(4.5, 5.5), +... is_estimated=(True, True), +... parameters=( +... SeriesParameterValue("Temperature", 25.0), +... SeriesParameterValue("Strain rate", 0.01), +... ), +... decoration=GraphDecoration.MARKERS, +... ) +``` + + + +#### *classmethod* from_data(x, y, is_estimated=None, parameters=None, decoration=None) + +Alternative constructor to create [`SeriesPoint`](#ansys.grantami.core._mi_value_classes.SeriesPoint) from more general data types. + +* **Parameters:** + * **x** (*Sequence* *[**SupportsFloat* *]* *|* *Sequence* *[*[*str*](https://docs.python.org/3/library/stdtypes.html#str) *]*) – Sequence of x-axis parameter values. + * **y** (*Sequence* *[**SupportsFloat* *]*) – Sequence of values for the y-axis. + * **is_estimated** (*Sequence* *[*[*bool*](https://docs.python.org/3/library/functions.html#bool) *]* *,* *optional*) – Whether values are estimated. Defaults to [`None`](https://docs.python.org/3/library/constants.html#None), which results in all points being marked as not + estimated. + * **parameters** (*Sequence* *[*[*SeriesParameterValue*](#ansys.grantami.core._mi_value_classes.SeriesParameterValue) *]* *,* *optional*) – Sequence of [`SeriesParameterValue`](#ansys.grantami.core._mi_value_classes.SeriesParameterValue) objects. + * **decoration** ([*GraphDecoration*](#ansys.grantami.core._mi_value_classes.GraphDecoration) *,* *optional*) – Graph decoration style. +* **Return type:** + [SeriesPoint](#ansys.grantami.core._mi_value_classes.SeriesPoint) + + + +#### decoration *: [GraphDecoration](#ansys.grantami.core._mi_value_classes.GraphDecoration)* *= 'Lines'* + +[`GraphDecoration`](#ansys.grantami.core._mi_value_classes.GraphDecoration) style. + + + +#### is_estimated *: [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)[[bool](https://docs.python.org/3/library/functions.html#bool), ...]* *= None* + +Whether points are estimated. Defaults to a tuple of [`False`](https://docs.python.org/3/library/constants.html#False) values. + + + +#### parameters *: [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)[[SeriesParameterValue](#ansys.grantami.core._mi_value_classes.SeriesParameterValue), ...]* + +Tuple of [`SeriesParameterValue`](#ansys.grantami.core._mi_value_classes.SeriesParameterValue) objects. + + + +#### *property* parameters_by_name *: mappingproxy[[str](https://docs.python.org/3/library/stdtypes.html#str), [str](https://docs.python.org/3/library/stdtypes.html#str) | [float](https://docs.python.org/3/library/functions.html#float)]* + +Returns a read-only mapping of parameter values by name. + +* **Return type:** + [`MappingProxyType`](https://docs.python.org/3/library/types.html#types.MappingProxyType) [str, str | float] + + + +#### x *: [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)[[float](https://docs.python.org/3/library/functions.html#float), ...] | [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)[[str](https://docs.python.org/3/library/stdtypes.html#str), ...]* + +Tuple of x-axis parameter values. + + + +#### y *: [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)[[float](https://docs.python.org/3/library/functions.html#float), ...]* + +Tuple of y-axis values. + + + +### *class* SeriesRange(\*, x, is_estimated=None, decoration=GraphDecoration.LINES, y_low, y_high, parameters=) + +Data that represents the value of a range series functional attribute. + +This class is a frozen [`dataclass`](https://docs.python.org/3/library/dataclasses.html#module-dataclasses). + +* **Parameters:** + * **x** ([*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple) *[*[*float*](https://docs.python.org/3/library/functions.html#float) *,* *...* *]* *|* [*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple) *[*[*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* *...* *]*) – Tuple of x-axis parameter values. + * **y_low** ([*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple) *[*[*float*](https://docs.python.org/3/library/functions.html#float) *,* *...* *]*) – Tuple of values for the y-axis lower bound. Must be the same length as the `x` parameter. + * **y_high** ([*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple) *[*[*float*](https://docs.python.org/3/library/functions.html#float) *,* *...* *]*) – Tuple of values for the y-axis upper bound. Must be the same length as the `x` parameter. + * **is_estimated** ([*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple) *[*[*bool*](https://docs.python.org/3/library/functions.html#bool) *,* *...* *]* *,* *optional*) – Whether points are estimated. Defaults to a tuple of [`False`](https://docs.python.org/3/library/constants.html#False) values. If provided, must be a tuple of + [`bool`](https://docs.python.org/3/library/functions.html#bool) values and must be the same length as the `x`, `y_low`, and `y_high` parameters. + * **parameters** ([*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple) *[*[*SeriesParameterValue*](#ansys.grantami.core._mi_value_classes.SeriesParameterValue) *,* *...* *]* *,* *optional*) – Tuple of [`SeriesParameterValue`](#ansys.grantami.core._mi_value_classes.SeriesParameterValue) objects. + * **decoration** ([*GraphDecoration*](#ansys.grantami.core._mi_value_classes.GraphDecoration) *,* *optional*) – [`GraphDecoration`](#ansys.grantami.core._mi_value_classes.GraphDecoration) style. Defaults to [`GraphDecoration.LINES`](#ansys.grantami.core._mi_value_classes.GraphDecoration.LINES). + +### Examples + +Series with no extra parameters: + +```pycon +>>> series = SeriesRange( +... x=(1.0, 2.0), +... y_low=(4.5, 5.5), +... y_high=(4.7, 5.8), +... ) +``` + +Series with additional parameters, all points marked as estimated, and using markers as the display type: + +```pycon +>>> series = SeriesRange( +... x=(1.0, 2.0), +... y_low=(4.5, 5.5), +... y_high=(4.7, 5.8), +... is_estimated=(True, True), +... parameters=( +... SeriesParameterValue("Temperature", 25.0), +... SeriesParameterValue("Strain rate", 0.01), +... ), +... decoration=GraphDecoration.LINES_AND_MARKERS, +... ) +``` + + + +#### *classmethod* from_data(x, y_low, y_high, is_estimated=None, parameters=None, decoration=None) + +Alternative constructor to create [`SeriesRange`](#ansys.grantami.core._mi_value_classes.SeriesRange) from more general data types. + +* **Parameters:** + * **x** (*Sequence* *[**SupportsFloat* *]* *|* *Sequence* *[*[*str*](https://docs.python.org/3/library/stdtypes.html#str) *]*) – Sequence of x-axis parameter values. + * **y_low** (*Sequence* *[**SupportsFloat* *]*) – Sequence of values for the y-axis lower bound. + * **y_high** (*Sequence* *[**SupportsFloat* *]*) – Sequence of values for the y-axis upper bound. + * **is_estimated** (*Sequence* *[*[*bool*](https://docs.python.org/3/library/functions.html#bool) *]* *,* *optional*) – Whether values are estimated. Defaults to [`None`](https://docs.python.org/3/library/constants.html#None), which results in all points being marked as not + estimated. + * **parameters** (*Sequence* *[*[*SeriesParameterValue*](#ansys.grantami.core._mi_value_classes.SeriesParameterValue) *]* *,* *optional*) – Sequence of [`SeriesParameterValue`](#ansys.grantami.core._mi_value_classes.SeriesParameterValue) objects. + * **decoration** ([*GraphDecoration*](#ansys.grantami.core._mi_value_classes.GraphDecoration) *,* *optional*) – Graph decoration style. +* **Return type:** + [SeriesRange](#ansys.grantami.core._mi_value_classes.SeriesRange) + + + +#### decoration *: [GraphDecoration](#ansys.grantami.core._mi_value_classes.GraphDecoration)* *= 'Lines'* + +[`GraphDecoration`](#ansys.grantami.core._mi_value_classes.GraphDecoration) style. + + + +#### is_estimated *: [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)[[bool](https://docs.python.org/3/library/functions.html#bool), ...]* *= None* + +Whether points are estimated. Defaults to a tuple of [`False`](https://docs.python.org/3/library/constants.html#False) values. + + + +#### parameters *: [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)[[SeriesParameterValue](#ansys.grantami.core._mi_value_classes.SeriesParameterValue), ...]* + +Tuple of [`SeriesParameterValue`](#ansys.grantami.core._mi_value_classes.SeriesParameterValue) objects. + + + +#### *property* parameters_by_name *: mappingproxy[[str](https://docs.python.org/3/library/stdtypes.html#str), [str](https://docs.python.org/3/library/stdtypes.html#str) | [float](https://docs.python.org/3/library/functions.html#float)]* + +Returns a read-only mapping of parameter values by name. + +* **Return type:** + [`MappingProxyType`](https://docs.python.org/3/library/types.html#types.MappingProxyType) [str, str | float] + + + +#### x *: [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)[[float](https://docs.python.org/3/library/functions.html#float), ...] | [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)[[str](https://docs.python.org/3/library/stdtypes.html#str), ...]* + +Tuple of x-axis parameter values. + + + +#### y_high *: [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)[[float](https://docs.python.org/3/library/functions.html#float), ...]* + +Tuple of values for the y-axis upper bound. + + + +#### y_low *: [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)[[float](https://docs.python.org/3/library/functions.html#float), ...]* + +Tuple of values for the y-axis lower bound. + + + +### *class* SeriesParameterValue(name, value) + +Parameter value for a functional series. + +The parameter value applies to the entire [`SeriesPoint`](#ansys.grantami.core._mi_value_classes.SeriesPoint) or [`SeriesRange`](#ansys.grantami.core._mi_value_classes.SeriesRange) it is assigned to. + +This class is a frozen [`dataclass`](https://docs.python.org/3/library/dataclasses.html#module-dataclasses). + +* **Parameters:** + * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – The name of the parameter. + * **value** ([*float*](https://docs.python.org/3/library/functions.html#float) *|* [*str*](https://docs.python.org/3/library/stdtypes.html#str)) – The value of the parameter. This must be a ‘float’ for numeric parameters, or a ‘str’ for discrete + parameters. + +### Examples + +```pycon +>>> parameter = SeriesParameterValue( +... name="Temperature", +... value=25.0, +... ) +``` + + + +#### *classmethod* from_data(name, value) + +Alternative constructor to create [`SeriesParameterValue`](#ansys.grantami.core._mi_value_classes.SeriesParameterValue) from more general data types. + +* **Parameters:** + * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – The name of the parameter. + * **value** (*SupportsFloat* *|* [*str*](https://docs.python.org/3/library/stdtypes.html#str)) – The value of the parameter. This must be a ‘float’-like for numeric parameters, or a ‘str’ for discrete + parameters. +* **Return type:** + [SeriesParameterValue](#ansys.grantami.core._mi_value_classes.SeriesParameterValue) + + + +#### name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +The name of the parameter. + + + +#### value *: [float](https://docs.python.org/3/library/functions.html#float) | [str](https://docs.python.org/3/library/stdtypes.html#str)* + +The value of the parameter. + +This must be a ‘float’ for numeric parameters, or a ‘str’ for discrete parameters. + + + +### *class* GridPoint(\*, x, is_estimated=None, decoration=GraphDecoration.LINES, y, parameters=) + +Multi-dimensional data that represents the value of a point grid functional attribute. + +This class is a frozen [`dataclass`](https://docs.python.org/3/library/dataclasses.html#module-dataclasses). + +* **Parameters:** + * **x** ([*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple) *[*[*float*](https://docs.python.org/3/library/functions.html#float) *,* *...* *]* *|* [*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple) *[*[*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* *...* *]*) – Tuple of x-axis parameter values. + * **y** ([*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple) *[*[*float*](https://docs.python.org/3/library/functions.html#float) *,* *...* *]*) – Tuple of y-axis values. Must be the same length as the `x` parameter. + * **is_estimated** ([*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple) *[*[*bool*](https://docs.python.org/3/library/functions.html#bool) *,* *...* *]* *,* *optional*) – Whether points are estimated. Defaults to a tuple of [`False`](https://docs.python.org/3/library/constants.html#False) values. If provided, must be a + tuple of [`bool`](https://docs.python.org/3/library/functions.html#bool) values and must be the same length as the `x` and `y` parameters. + * **parameters** ([*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple) *[*[*GridParameterValues*](#ansys.grantami.core._mi_value_classes.GridParameterValues) *,* *...* *]* *,* *optional*) – Tuple of [`GridParameterValues`](#ansys.grantami.core._mi_value_classes.GridParameterValues) objects. + * **decoration** ([*GraphDecoration*](#ansys.grantami.core._mi_value_classes.GraphDecoration) *,* *optional*) – [`GraphDecoration`](#ansys.grantami.core._mi_value_classes.GraphDecoration) style. Defaults to [`GraphDecoration.LINES`](#ansys.grantami.core._mi_value_classes.GraphDecoration.LINES). + +### Examples + +Grid with no parameters: + +```pycon +>>> grid = GridPoint( +... x=(1.0, 2.0), +... y=(4.5, 5.5), +... ) +``` + +Grid with additional parameters, all points marked as estimated, and using markers as the display type: + +```pycon +>>> grid = GridPoint( +... x=(1.0, 2.0, 1.0, 2.0), +... y=(4.5, 5.5, 4.3, 5.3), +... is_estimated=(True, True, True, True), +... parameters=( +... GridParameterValues("Temperature", (25.0, 25.0, 100.0, 100.0)), +... ), +... decoration=GraphDecoration.MARKERS, +... ) +``` + + + +#### \_\_add_\_(other) + +Returns a new grid object that concatenates both grids. + +Only grids that define values for the same parameters and use the same decoration style can be concatenated. + +* **Parameters:** + **other** ([*GridPoint*](#ansys.grantami.core._mi_value_classes.GridPoint)) – The other grid to concatenate with this grid. +* **Returns:** + New instance with merged data from both input grids. +* **Return type:** + [GridPoint](#ansys.grantami.core._mi_value_classes.GridPoint) + +### Examples + +```pycon +>>> grid_1 = GridPoint( +... x=(1.0, 2.0), +... y=(4.5, 5.5), +... parameters=(GridParameterValues("Temperature", (25.0, 25.0)),), +... ) +>>> grid_2 = GridPoint( +... x=(1.0, 2.0), +... y=(7.6, 8.6), +... parameters=(GridParameterValues("Temperature", (100.0, 100.0)),), +... ) +>>> grid_1 + grid_2 == GridPoint( +... x=(1.0, 2.0, 1.0, 2.0), +... y=(4.5, 5.5, 7.6, 8.6), +... parameters=(GridParameterValues("Temperature", (25.0, 25.0, 100.0, 100.0)),), +... ) +True +``` + + + +#### *classmethod* from_data(x, y, is_estimated=None, parameters=None, decoration=None) + +Alternative constructor to create [`GridPoint`](#ansys.grantami.core._mi_value_classes.GridPoint) from more general data types. + +* **Parameters:** + * **x** (*Sequence* *[**SupportsFloat* *]* *|* *Sequence* *[*[*str*](https://docs.python.org/3/library/stdtypes.html#str) *]*) – Sequence of x-axis parameter values. + * **y** (*Sequence* *[**SupportsFloat* *]*) – Sequence of values for the y-axis. + * **is_estimated** (*Sequence* *[*[*bool*](https://docs.python.org/3/library/functions.html#bool) *]* *,* *optional*) – Whether values are estimated. Defaults to [`None`](https://docs.python.org/3/library/constants.html#None), which results in all points being marked as not + estimated. + * **parameters** (*Sequence* *[*[*GridParameterValues*](#ansys.grantami.core._mi_value_classes.GridParameterValues) *]* *,* *optional*) – Sequence of [`GridParameterValues`](#ansys.grantami.core._mi_value_classes.GridParameterValues) objects. + * **decoration** ([*GraphDecoration*](#ansys.grantami.core._mi_value_classes.GraphDecoration) *,* *optional*) – Graph decoration style. + + + +#### decoration *: [GraphDecoration](#ansys.grantami.core._mi_value_classes.GraphDecoration)* *= 'Lines'* + +[`GraphDecoration`](#ansys.grantami.core._mi_value_classes.GraphDecoration) style. + + + +#### is_estimated *: [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)[[bool](https://docs.python.org/3/library/functions.html#bool), ...]* *= None* + +Whether points are estimated. Defaults to a tuple of [`False`](https://docs.python.org/3/library/constants.html#False) values. + + + +#### parameters *: [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)[[GridParameterValues](#ansys.grantami.core._mi_value_classes.GridParameterValues), ...]* + +Tuple of [`GridParameterValues`](#ansys.grantami.core._mi_value_classes.GridParameterValues) objects. + + + +#### *property* parameters_by_name *: mappingproxy[[str](https://docs.python.org/3/library/stdtypes.html#str), [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)[[str](https://docs.python.org/3/library/stdtypes.html#str), ...] | [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)[[float](https://docs.python.org/3/library/functions.html#float), ...]]* + +Returns a read-only mapping of parameter values by name. + +* **Return type:** + [`MappingProxyType`](https://docs.python.org/3/library/types.html#types.MappingProxyType) [str, tuple[str, …] | tuple[float, …]] + + + +#### x *: [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)[[float](https://docs.python.org/3/library/functions.html#float), ...] | [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)[[str](https://docs.python.org/3/library/stdtypes.html#str), ...]* + +Tuple of x-axis parameter values. + + + +#### y *: [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)[[float](https://docs.python.org/3/library/functions.html#float), ...]* + +Tuple of y-axis values. + + + +### *class* GridRange(\*, x, is_estimated=None, decoration=GraphDecoration.LINES, y_low, y_high, parameters=) + +Multi-dimensional data that represents the value of a range grid functional attribute. + +This class is a frozen [`dataclass`](https://docs.python.org/3/library/dataclasses.html#module-dataclasses). + +* **Parameters:** + * **x** ([*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple) *[*[*float*](https://docs.python.org/3/library/functions.html#float) *,* *...* *]* *|* [*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple) *[*[*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* *...* *]*) – Tuple of x-axis parameter values. + * **y_low** ([*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple) *[*[*float*](https://docs.python.org/3/library/functions.html#float) *,* *...* *]*) – Tuple of values for the y-axis lower bound. Must be the same length as the `x` parameter. + * **y_high** ([*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple) *[*[*float*](https://docs.python.org/3/library/functions.html#float) *,* *...* *]*) – Tuple of values for the y-axis upper bound. Must be the same length as the `x` parameter. + * **is_estimated** ([*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple) *[*[*bool*](https://docs.python.org/3/library/functions.html#bool) *,* *...* *]* *,* *optional*) – Whether points are estimated. Defaults to a tuple of [`False`](https://docs.python.org/3/library/constants.html#False) values. If provided, must be a tuple of + [`bool`](https://docs.python.org/3/library/functions.html#bool) values and must be the same length as the `x`, `y_low`, and ``y_high` parameters. + * **parameters** ([*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple) *[*[*GridParameterValues*](#ansys.grantami.core._mi_value_classes.GridParameterValues) *,* *...* *]* *,* *optional*) – Tuple of [`GridParameterValues`](#ansys.grantami.core._mi_value_classes.GridParameterValues) objects. + * **decoration** ([*GraphDecoration*](#ansys.grantami.core._mi_value_classes.GraphDecoration) *,* *optional*) – [`GraphDecoration`](#ansys.grantami.core._mi_value_classes.GraphDecoration) style. Defaults to [`GraphDecoration.LINES`](#ansys.grantami.core._mi_value_classes.GraphDecoration.LINES). + +### Examples + +Grid with no parameters: + +```pycon +>>> grid = GridRange( +... x=(1.0, 2.0), +... y_low=(4.5, 5.5), +... y_high=(4.55, 5.55), +... ) +``` + +Grid with additional parameters, all points marked as estimated, and using markers as the display type: + +```pycon +>>> grid = GridRange( +... x=(1.0, 2.0, 1.0, 2.0), +... y_low=(4.5, 5.5, 4.3, 5.3), +... y_high=(4.55, 5.55, 4.35, 5.35), +... is_estimated=(True, True, True, True), +... parameters=( +... GridParameterValues("Temperature", (25.0, 25.0, 100.0, 100.0)), +... ), +... decoration=GraphDecoration.MARKERS, +... ) +``` + + + +#### \_\_add_\_(other) + +Returns a new grid object that concatenates both grids. + +Only grids that define values for the same parameters and use the same decoration style can be concatenated. + +* **Parameters:** + **other** ([*GridRange*](#ansys.grantami.core._mi_value_classes.GridRange)) – The other grid to concatenate with this grid. +* **Returns:** + New instance with merged data from both input grids. +* **Return type:** + [GridRange](#ansys.grantami.core._mi_value_classes.GridRange) + +### Examples + +```pycon +>>> grid_1 = GridRange( +... x=(1.0, 2.0), +... y_low=(4.5, 5.5), +... y_high=(4.55, 5.55), +... parameters=(GridParameterValues("Temperature", (25.0, 25.0)),), +... ) +>>> grid_2 = GridRange( +... x=(1.0, 2.0), +... y_low=(7.6, 8.6), +... y_high=(7.65, 8.65), +... parameters=(GridParameterValues("Temperature", (100.0, 100.0)),), +... ) +>>> grid_1 + grid_2 == GridRange( +... x=(1.0, 2.0, 1.0, 2.0), +... y_low=(4.5, 5.5, 7.6, 8.6), +... y_high=(4.55, 5.55, 7.65, 8.65), +... parameters=(GridParameterValues("Temperature", (25.0, 25.0, 100.0, 100.0)),), +... ) +True +``` + + + +#### *classmethod* from_data(x, y_low, y_high, is_estimated=None, parameters=None, decoration=None) + +Alternative constructor to create [`GridRange`](#ansys.grantami.core._mi_value_classes.GridRange) from more general data types. + +* **Parameters:** + * **x** (*Sequence* *[**SupportsFloat* *]* *|* *Sequence* *[*[*str*](https://docs.python.org/3/library/stdtypes.html#str) *]*) – Sequence of x-axis parameter values. + * **y_low** (*Sequence* *[**SupportsFloat* *]*) – Sequence of values for the y-axis lower bound. + * **y_high** (*Sequence* *[**SupportsFloat* *]*) – Sequence of values for the y-axis upper bound. + * **is_estimated** (*Sequence* *[*[*bool*](https://docs.python.org/3/library/functions.html#bool) *]* *,* *optional*) – Whether values are estimated. Defaults to [`None`](https://docs.python.org/3/library/constants.html#None), which results in all points being marked as not + estimated. + * **parameters** (*Sequence* *[*[*GridParameterValues*](#ansys.grantami.core._mi_value_classes.GridParameterValues) *]* *,* *optional*) – Sequence of [`GridParameterValues`](#ansys.grantami.core._mi_value_classes.GridParameterValues) objects. + * **decoration** ([*GraphDecoration*](#ansys.grantami.core._mi_value_classes.GraphDecoration) *,* *optional*) – Graph decoration style. + + + +#### decoration *: [GraphDecoration](#ansys.grantami.core._mi_value_classes.GraphDecoration)* *= 'Lines'* + +[`GraphDecoration`](#ansys.grantami.core._mi_value_classes.GraphDecoration) style. + + + +#### is_estimated *: [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)[[bool](https://docs.python.org/3/library/functions.html#bool), ...]* *= None* + +Whether points are estimated. Defaults to a tuple of [`False`](https://docs.python.org/3/library/constants.html#False) values. + + + +#### parameters *: [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)[[GridParameterValues](#ansys.grantami.core._mi_value_classes.GridParameterValues), ...]* + +Tuple of [`GridParameterValues`](#ansys.grantami.core._mi_value_classes.GridParameterValues) objects. + + + +#### *property* parameters_by_name *: mappingproxy[[str](https://docs.python.org/3/library/stdtypes.html#str), [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)[[str](https://docs.python.org/3/library/stdtypes.html#str), ...] | [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)[[float](https://docs.python.org/3/library/functions.html#float), ...]]* + +Returns a read-only mapping of parameter values by name. + +* **Return type:** + [`MappingProxyType`](https://docs.python.org/3/library/types.html#types.MappingProxyType) [str, tuple[str, …] | tuple[float, …]] + + + +#### x *: [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)[[float](https://docs.python.org/3/library/functions.html#float), ...] | [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)[[str](https://docs.python.org/3/library/stdtypes.html#str), ...]* + +Tuple of x-axis parameter values. + + + +#### y_high *: [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)[[float](https://docs.python.org/3/library/functions.html#float), ...]* + +Tuple of values for the y-axis upper bound. + + + +#### y_low *: [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)[[float](https://docs.python.org/3/library/functions.html#float), ...]* + +Tuple of values for the y-axis lower bound. + + + +### *class* GridParameterValues(name, values) + +Parameter values for a functional grid. + +When assigned to [`GridPoint`](#ansys.grantami.core._mi_value_classes.GridPoint) or [`GridRange`](#ansys.grantami.core._mi_value_classes.GridRange), there must be as many parameter values as xy value +pairs in the grid. + +This class is a frozen [`dataclass`](https://docs.python.org/3/library/dataclasses.html#module-dataclasses). + +* **Parameters:** + * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – Name of the parameter. + * **values** ([*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple) *[*[*float*](https://docs.python.org/3/library/functions.html#float) *,* *...* *]* *|* [*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple) *[*[*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* *...* *]*) – Tuple of values for the parameter. [`float`](https://docs.python.org/3/library/functions.html#float) for numeric parameters, [`str`](https://docs.python.org/3/library/stdtypes.html#str) for discrete parameters. + +### Examples + +```pycon +>>> parameter = GridParameterValues( +... name="Temperature", +... values=(10.0, 20.0), +... ) +``` + + + +#### *classmethod* from_data(name, values) + +Alternative constructor to create [`GridParameterValues`](#ansys.grantami.core._mi_value_classes.GridParameterValues) from more general data types. + +* **Parameters:** + * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – The name of the parameter. + * **values** (*Sequence* *[**SupportsFloat* *]* *|* *Sequence* *[*[*str*](https://docs.python.org/3/library/stdtypes.html#str) *]*) – The value of the parameter. This must be a Sequence of ‘float’-like objects for numeric parameters, or a + Sequence of ‘str’ for discrete parameters. +* **Return type:** + [GridParameterValues](#ansys.grantami.core._mi_value_classes.GridParameterValues) + + + +#### name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Name of the parameter. + + + +#### values *: [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)[[float](https://docs.python.org/3/library/functions.html#float), ...] | [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)[[str](https://docs.python.org/3/library/stdtypes.html#str), ...]* + +Tuple of values for the parameter. + + + +### *class* GraphDecoration + + + +#### LINES *= 'Lines'* + + + +#### LINES_AND_MARKERS *= 'LinesAndMarkers'* + + + +#### MARKERS *= 'Markers'* + + + +### *class* FunctionalSeriesPointTableView + + + +#### *property* column_headers + +Column headers including units. + +* **Return type:** + [list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str)] + + + +#### *property* data_by_column *: [dict](https://docs.python.org/3/library/stdtypes.html#dict)[[str](https://docs.python.org/3/library/stdtypes.html#str), [list](https://docs.python.org/3/library/stdtypes.html#list)[[float](https://docs.python.org/3/library/functions.html#float)] | [list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str)], [list](https://docs.python.org/3/library/stdtypes.html#list)[[bool](https://docs.python.org/3/library/functions.html#bool)], [list](https://docs.python.org/3/library/stdtypes.html#list)[[None](https://docs.python.org/3/library/constants.html#None)]]* + +View of the attribute value in a dictionary format. + +This is a view of the attribute value data. Modifying the view has no effect on the underlying attribute value. + +* **Return type:** + [dict](https://docs.python.org/3/library/stdtypes.html#dict)[[str](https://docs.python.org/3/library/stdtypes.html#str), [list](https://docs.python.org/3/library/stdtypes.html#list)[[float](https://docs.python.org/3/library/functions.html#float)] or [list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str)] or [list](https://docs.python.org/3/library/stdtypes.html#list)[[bool](https://docs.python.org/3/library/functions.html#bool)] or [list](https://docs.python.org/3/library/stdtypes.html#list)[None]] + +### Examples + +For a functional attribute named `Stress-Strain (Ranged)`, with an X-axis of `Strain` and an additional +parameter `Temperature`: + +```pycon +>>> ranged_functional_attribute.value = ( +... SeriesRange( +... x=(1.0, 2.0, 3.0), +... y_low=(10.0, 20.0, 30.0), +... y_high=(11.0, 21.0, 31.0), +... parameters=(SeriesParameterValue("Temperature", 25.0),), +... is_estimated=(False, True, False), +... ), +... ) +>>> ranged_functional_attribute.table_view.data_by_column +{'Y min (Stress-Strain (Ranged) [MPa])': [10.0, 20.0, 30.0], +'Y max (Stress-Strain (Ranged) [MPa])': [11.0, 21.0, 31.0], +'Strain [% strain]': [1.0, 2.0, 3.0], +'Temperature [°C]': [25.0, 25.0, 25.0], +'Estimated point?': [False, True, False]} +``` + + + +#### *property* parameter_column_index *: [dict](https://docs.python.org/3/library/stdtypes.html#dict)[[str](https://docs.python.org/3/library/stdtypes.html#str), [int](https://docs.python.org/3/library/functions.html#int)]* + +Mapping of parameter names to index in the [`column_headers`](#ansys.grantami.core.mi_attribute_value_classes.FunctionalSeriesPointTableView.column_headers). + +* **Return type:** + [dict](https://docs.python.org/3/library/stdtypes.html#dict)[[str](https://docs.python.org/3/library/stdtypes.html#str), [int](https://docs.python.org/3/library/functions.html#int)] + + + +#### *property* table_view *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str) | [float](https://docs.python.org/3/library/functions.html#float) | [bool](https://docs.python.org/3/library/functions.html#bool) | [None](https://docs.python.org/3/library/constants.html#None)]]* + +Value returned by [`AttributeFunctionalSeriesPoint.value`](attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalSeriesPoint.value) in Scripting Toolkit versions earlier than 5.0. + +Modifying the view has no effect on the underlying attribute value. + +* **Return type:** + [list](https://docs.python.org/3/library/stdtypes.html#list)[[list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str) or [float](https://docs.python.org/3/library/functions.html#float) or [bool](https://docs.python.org/3/library/functions.html#bool) or None]] + +### Examples + +For a functional attribute named `Stress-Strain`, with an X-axis of `Strain` and an additional parameter +`Temperature`: + +```pycon +>>> functional_attribute: AttributeFunctionalSeriesPoint +>>> functional_attribute.value = ( +... SeriesPoint(x=(0.0, 1.0, 2.0), y=(900.0, 1210.0, 1250.0), parameters=(SeriesParameterValue("Temperature", 25.0),)), +... ) +>>> functional_attribute.table_view.table_view +[['Y min (Stress-Strain [MPa])', 'Y max (Stress-Strain [MPa])', 'Strain [% strain]', 'Temperature [°C]', 'Estimated point?'], +[900.0, 900.0, 0.0, 25.0, False], +[1210.0, 1210.0, 1.0, 25.0, False], +[1250.0, 1250.0, 2.0, 25.0, False]] +``` + + + +#### *property* table_view_with_series_number *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str) | [float](https://docs.python.org/3/library/functions.html#float) | [bool](https://docs.python.org/3/library/functions.html#bool) | [None](https://docs.python.org/3/library/constants.html#None) | [int](https://docs.python.org/3/library/functions.html#int)]]* + +Table view of the attribute value as a list of points, including the series number. + +Modifying the view has no effect on the underlying attribute value. + +* **Return type:** + [list](https://docs.python.org/3/library/stdtypes.html#list)[[list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str) or [float](https://docs.python.org/3/library/functions.html#float) or [bool](https://docs.python.org/3/library/functions.html#bool) or None or [int](https://docs.python.org/3/library/functions.html#int)]] + +### Examples + +For a functional attribute named `Stress-Strain`, with an X-axis of `Strain` and an additional parameter +`Temperature`: + +```pycon +>>> functional_attribute: AttributeFunctionalSeriesPoint +>>> functional_attribute.value = ( +... SeriesPoint(x=(0.0, 1.0, 2.0), y=(900.0, 1210.0, 1250.0), parameters=(SeriesParameterValue("Temperature", 25.0),)), +... ) +>>> functional_attribute.table_view.table_view_with_series_number +[['Y min (Stress-Strain [MPa])', 'Y max (Stress-Strain [MPa])', 'Strain [% strain]', 'Temperature [°C]', 'Estimated point?', 'Series number'], +[900.0, 900.0, 0.0, 25.0, False, 1], +[1210.0, 1210.0, 1.0, 25.0, False, 1], +[1250.0, 1250.0, 2.0, 25.0, False, 1]] +``` + + + +### *class* FunctionalSeriesRangeTableView + + + +#### *property* column_headers + +Column headers including units. + +* **Return type:** + [list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str)] + + + +#### *property* data_by_column *: [dict](https://docs.python.org/3/library/stdtypes.html#dict)[[str](https://docs.python.org/3/library/stdtypes.html#str), [list](https://docs.python.org/3/library/stdtypes.html#list)[[float](https://docs.python.org/3/library/functions.html#float)] | [list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str)], [list](https://docs.python.org/3/library/stdtypes.html#list)[[bool](https://docs.python.org/3/library/functions.html#bool)], [list](https://docs.python.org/3/library/stdtypes.html#list)[[None](https://docs.python.org/3/library/constants.html#None)]]* + +View of the attribute value in a dictionary format. + +This is a view of the attribute value data. Modifying the view has no effect on the underlying attribute value. + +* **Return type:** + [dict](https://docs.python.org/3/library/stdtypes.html#dict)[[str](https://docs.python.org/3/library/stdtypes.html#str), [list](https://docs.python.org/3/library/stdtypes.html#list)[[float](https://docs.python.org/3/library/functions.html#float)] or [list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str)] or [list](https://docs.python.org/3/library/stdtypes.html#list)[[bool](https://docs.python.org/3/library/functions.html#bool)] or [list](https://docs.python.org/3/library/stdtypes.html#list)[None]] + +### Examples + +For a functional attribute named `Stress-Strain (Ranged)`, with an X-axis of `Strain` and an additional +parameter `Temperature`: + +```pycon +>>> ranged_functional_attribute.value = ( +... SeriesRange( +... x=(1.0, 2.0, 3.0), +... y_low=(10.0, 20.0, 30.0), +... y_high=(11.0, 21.0, 31.0), +... parameters=(SeriesParameterValue("Temperature", 25.0),), +... is_estimated=(False, True, False), +... ), +... ) +>>> ranged_functional_attribute.table_view.data_by_column +{'Y min (Stress-Strain (Ranged) [MPa])': [10.0, 20.0, 30.0], +'Y max (Stress-Strain (Ranged) [MPa])': [11.0, 21.0, 31.0], +'Strain [% strain]': [1.0, 2.0, 3.0], +'Temperature [°C]': [25.0, 25.0, 25.0], +'Estimated point?': [False, True, False]} +``` + + + +#### *property* parameter_column_index *: [dict](https://docs.python.org/3/library/stdtypes.html#dict)[[str](https://docs.python.org/3/library/stdtypes.html#str), [int](https://docs.python.org/3/library/functions.html#int)]* + +Mapping of parameter names to index in the [`column_headers`](#ansys.grantami.core.mi_attribute_value_classes.FunctionalSeriesRangeTableView.column_headers). + +* **Return type:** + [dict](https://docs.python.org/3/library/stdtypes.html#dict)[[str](https://docs.python.org/3/library/stdtypes.html#str), [int](https://docs.python.org/3/library/functions.html#int)] + + + +#### *property* table_view *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str) | [float](https://docs.python.org/3/library/functions.html#float) | [bool](https://docs.python.org/3/library/functions.html#bool) | [None](https://docs.python.org/3/library/constants.html#None)]]* + +Value returned by [`AttributeFunctionalSeriesRange.value`](attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalSeriesRange.value) in Scripting Toolkit versions earlier than 5.0. + +Modifying the returned value has no effect on the attribute value. + +* **Return type:** + [list](https://docs.python.org/3/library/stdtypes.html#list)[[list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str) or [float](https://docs.python.org/3/library/functions.html#float) or [bool](https://docs.python.org/3/library/functions.html#bool) or None]] + +### Examples + +For a functional attribute named `Stress-Strain (Ranged)`, with an X-axis of `Strain` and an additional parameter +`Temperature`: + +```pycon +>>> ranged_functional_attribute: AttributeFunctionalSeriesRange +>>> ranged_functional_attribute.value = ( +... SeriesRange( +... x=(0.0, 1.0, 2.0), +... y_low=(900.0, 1210.0, 1250.0), +... y_high=(910.0, 1220.0, 1260.0), +... parameters=(SeriesParameterValue("Temperature", 25.0),) +... ), +... ) +>>> ranged_functional_attribute.table_view.table_view +[['Y min (Stress-Strain (Ranged) [MPa])', 'Y max (Stress-Strain (Ranged) [MPa])', 'Strain [% strain]', 'Temperature [°C]', 'Estimated point?'], +[900.0, 910.0, 0.0, 25.0, False], +[1210.0, 1220.0, 1.0, 25.0, False], +[1250.0, 1260.0, 2.0, 25.0, False]] +``` + + + +#### *property* table_view_with_series_number *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str) | [float](https://docs.python.org/3/library/functions.html#float) | [bool](https://docs.python.org/3/library/functions.html#bool) | [None](https://docs.python.org/3/library/constants.html#None) | [int](https://docs.python.org/3/library/functions.html#int)]]* + +Table view of the attribute value as a list of points, including the series number. + +Modifying the view has no effect on the underlying attribute value. + +* **Return type:** + [list](https://docs.python.org/3/library/stdtypes.html#list)[[list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str) or [float](https://docs.python.org/3/library/functions.html#float) or [bool](https://docs.python.org/3/library/functions.html#bool) or None or [int](https://docs.python.org/3/library/functions.html#int)]] + +### Examples + +For a functional attribute named `Stress-Strain (Ranged)`, with an X-axis of `Strain` and an additional +parameter `Temperature`: + +```pycon +>>> ranged_functional_attribute: AttributeFunctionalSeriesRange +>>> ranged_functional_attribute.value = ( +... SeriesRange( +... x=(0.0, 1.0, 2.0), +... y_low=(900.0, 1210.0, 1250.0), +... y_high=(910.0, 1220.0, 1260.0), +... parameters=(SeriesParameterValue("Temperature", 25.0),) +... ), +... ) +>>> ranged_functional_attribute.table_view.table_view_with_series_number +[['Y min (Stress-Strain (Ranged) [MPa])', 'Y max (Stress-Strain (Ranged) [MPa])', 'Strain [% strain]', 'Temperature [°C]', 'Estimated point?', 'Series number'], +[900.0, 910.0, 0.0, 25.0, False, 1], +[1210.0, 1220.0, 1.0, 25.0, False, 1], +[1250.0, 1260.0, 2.0, 25.0, False, 1]] +``` + + + +### *class* FunctionalGridPointTableView + + + +#### *property* column_headers + +Column headers including units. + +* **Return type:** + [list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str)] + + + +#### *property* data_by_column *: [dict](https://docs.python.org/3/library/stdtypes.html#dict)[[str](https://docs.python.org/3/library/stdtypes.html#str), [list](https://docs.python.org/3/library/stdtypes.html#list)[[float](https://docs.python.org/3/library/functions.html#float)] | [list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str)], [list](https://docs.python.org/3/library/stdtypes.html#list)[[bool](https://docs.python.org/3/library/functions.html#bool)], [list](https://docs.python.org/3/library/stdtypes.html#list)[[None](https://docs.python.org/3/library/constants.html#None)]]* + +View of the attribute value in a dictionary format. + +This is a view of the attribute value data. Modifying the view has no effect on the underlying attribute value. + +* **Return type:** + [dict](https://docs.python.org/3/library/stdtypes.html#dict)[[str](https://docs.python.org/3/library/stdtypes.html#str), [list](https://docs.python.org/3/library/stdtypes.html#list)[[float](https://docs.python.org/3/library/functions.html#float)] or [list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str)] or [list](https://docs.python.org/3/library/stdtypes.html#list)[[bool](https://docs.python.org/3/library/functions.html#bool)] or [list](https://docs.python.org/3/library/stdtypes.html#list)[None]] + +### Examples + +For a functional attribute named `Stress-Strain (Ranged)`, with an X-axis of `Strain` and an additional +parameter `Temperature`: + +```pycon +>>> ranged_functional_attribute.value = ( +... SeriesRange( +... x=(1.0, 2.0, 3.0), +... y_low=(10.0, 20.0, 30.0), +... y_high=(11.0, 21.0, 31.0), +... parameters=(SeriesParameterValue("Temperature", 25.0),), +... is_estimated=(False, True, False), +... ), +... ) +>>> ranged_functional_attribute.table_view.data_by_column +{'Y min (Stress-Strain (Ranged) [MPa])': [10.0, 20.0, 30.0], +'Y max (Stress-Strain (Ranged) [MPa])': [11.0, 21.0, 31.0], +'Strain [% strain]': [1.0, 2.0, 3.0], +'Temperature [°C]': [25.0, 25.0, 25.0], +'Estimated point?': [False, True, False]} +``` + + + +#### *property* parameter_column_index *: [dict](https://docs.python.org/3/library/stdtypes.html#dict)[[str](https://docs.python.org/3/library/stdtypes.html#str), [int](https://docs.python.org/3/library/functions.html#int)]* + +Mapping of parameter names to index in the [`column_headers`](#ansys.grantami.core.mi_attribute_value_classes.FunctionalGridPointTableView.column_headers). + +* **Return type:** + [dict](https://docs.python.org/3/library/stdtypes.html#dict)[[str](https://docs.python.org/3/library/stdtypes.html#str), [int](https://docs.python.org/3/library/functions.html#int)] + + + +#### *property* table_view *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str) | [float](https://docs.python.org/3/library/functions.html#float) | [bool](https://docs.python.org/3/library/functions.html#bool) | [None](https://docs.python.org/3/library/constants.html#None)]]* + +Value returned by [`AttributeFunctionalGridPoint.value`](attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalGridPoint.value) in Scripting Toolkit versions earlier than 5.0. + +Modifying the view has no effect on the underlying attribute value. + +* **Return type:** + [list](https://docs.python.org/3/library/stdtypes.html#list)[[list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str) or [float](https://docs.python.org/3/library/functions.html#float) or [bool](https://docs.python.org/3/library/functions.html#bool) or None]] + +### Examples + +For a functional attribute named `Stress-Strain`, with an X-axis of `Strain` and an additional parameter +`Temperature`: + +```pycon +>>> gridded_functional_attribute: AttributeFunctionalGridPoint +>>> gridded_functional_attribute.value = GridPoint( +... x=(0.0, 1.0, 2.0, 0.0, 1.0, 2.0), +... y=(900.0, 1210.0, 1250.0, 895.0, 1205.0, 1245.0), +... parameters=(GridParameterValues("Temperature", (25.0, 25.0, 25.0, 100.0, 100.0, 100.0)),) +... ) +>>> gridded_functional_attribute.table_view.table_view +[['Y min (Stress-Strain [MPa])', + 'Y max (Stress-Strain [MPa])', + 'Strain [% strain]', + 'Temperature [°C]', + 'Estimated point?'], +[900.0, 900.0, 0.0, 25.0, False], +[1210.0, 1210.0, 1.0, 25.0, False], +[1250.0, 1250.0, 2.0, 25.0, False], +[895.0, 895.0, 0.0, 100.0, False], +[1205.0, 1205.0, 1.0, 100.0, False], +[1245.0, 1245.0, 2.0, 100.0, False]] +``` + + + +### *class* FunctionalGridRangeTableView + + + +#### *property* column_headers + +Column headers including units. + +* **Return type:** + [list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str)] + + + +#### *property* data_by_column *: [dict](https://docs.python.org/3/library/stdtypes.html#dict)[[str](https://docs.python.org/3/library/stdtypes.html#str), [list](https://docs.python.org/3/library/stdtypes.html#list)[[float](https://docs.python.org/3/library/functions.html#float)] | [list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str)], [list](https://docs.python.org/3/library/stdtypes.html#list)[[bool](https://docs.python.org/3/library/functions.html#bool)], [list](https://docs.python.org/3/library/stdtypes.html#list)[[None](https://docs.python.org/3/library/constants.html#None)]]* + +View of the attribute value in a dictionary format. + +This is a view of the attribute value data. Modifying the view has no effect on the underlying attribute value. + +* **Return type:** + [dict](https://docs.python.org/3/library/stdtypes.html#dict)[[str](https://docs.python.org/3/library/stdtypes.html#str), [list](https://docs.python.org/3/library/stdtypes.html#list)[[float](https://docs.python.org/3/library/functions.html#float)] or [list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str)] or [list](https://docs.python.org/3/library/stdtypes.html#list)[[bool](https://docs.python.org/3/library/functions.html#bool)] or [list](https://docs.python.org/3/library/stdtypes.html#list)[None]] + +### Examples + +For a functional attribute named `Stress-Strain (Ranged)`, with an X-axis of `Strain` and an additional +parameter `Temperature`: + +```pycon +>>> ranged_functional_attribute.value = ( +... SeriesRange( +... x=(1.0, 2.0, 3.0), +... y_low=(10.0, 20.0, 30.0), +... y_high=(11.0, 21.0, 31.0), +... parameters=(SeriesParameterValue("Temperature", 25.0),), +... is_estimated=(False, True, False), +... ), +... ) +>>> ranged_functional_attribute.table_view.data_by_column +{'Y min (Stress-Strain (Ranged) [MPa])': [10.0, 20.0, 30.0], +'Y max (Stress-Strain (Ranged) [MPa])': [11.0, 21.0, 31.0], +'Strain [% strain]': [1.0, 2.0, 3.0], +'Temperature [°C]': [25.0, 25.0, 25.0], +'Estimated point?': [False, True, False]} +``` + + + +#### *property* parameter_column_index *: [dict](https://docs.python.org/3/library/stdtypes.html#dict)[[str](https://docs.python.org/3/library/stdtypes.html#str), [int](https://docs.python.org/3/library/functions.html#int)]* + +Mapping of parameter names to index in the [`column_headers`](#ansys.grantami.core.mi_attribute_value_classes.FunctionalGridRangeTableView.column_headers). + +* **Return type:** + [dict](https://docs.python.org/3/library/stdtypes.html#dict)[[str](https://docs.python.org/3/library/stdtypes.html#str), [int](https://docs.python.org/3/library/functions.html#int)] + + + +#### *property* table_view *: [list](https://docs.python.org/3/library/stdtypes.html#list)[[list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str) | [float](https://docs.python.org/3/library/functions.html#float) | [bool](https://docs.python.org/3/library/functions.html#bool) | [None](https://docs.python.org/3/library/constants.html#None)]]* + +Value returned by [`AttributeFunctionalGridRange.value`](attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalGridRange.value) by pre-v5.0 Scripting Toolkit versions. + +Modifying the view has no effect on the underlying attribute value. + +* **Return type:** + [list](https://docs.python.org/3/library/stdtypes.html#list)[[list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str) or [float](https://docs.python.org/3/library/functions.html#float) or [bool](https://docs.python.org/3/library/functions.html#bool) or None]] + +### Examples + +For a functional attribute named `Stress-Strain (Ranged)`, with an X-axis of `Strain` and an additional parameter +`Temperature`: + +```pycon +>>> gridded_ranged_functional_attribute: AttributeFunctionalGridRange +>>> gridded_ranged_functional_attribute.value = GridRange( +... x=(0.0, 1.0, 2.0, 0.0, 1.0, 2.0), +... y_low=(900.0, 1210.0, 1250.0, 895.0, 1205.0, 1245.0), +... y_high=(910.0, 1220.0, 1260.0, 905.0, 1215.0, 1255.0), +... parameters=(GridParameterValues("Temperature", (25.0, 25.0, 25.0, 100.0, 100.0, 100.0)),) +... ) +>>> gridded_ranged_functional_attribute.table_view.table_view +[['Y min (Stress-Strain (Ranged) [MPa])', + 'Y max (Stress-Strain (Ranged) [MPa])', + 'Strain [% strain]', + 'Temperature [°C]', + 'Estimated point?'], +[900.0, 910.0, 0.0, 25.0, False], +[1210.0, 1220.0, 1.0, 25.0, False], +[1250.0, 1260.0, 2.0, 25.0, False], +[895.0, 905.0, 0.0, 100.0, False], +[1205.0, 1215.0, 1.0, 100.0, False], +[1245.0, 1255.0, 2.0, 100.0, False]] +``` + + + + + +## Miscellaneous attribute values + + + + + +### *class* UnsupportedType + +Represents a data type that is unsupported. No information about the value of the Attribute or the +Tabular Cell is available. Properties of this object cannot +be edited. diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/streamlined_api/table.md b/2026R1/scripting-toolkit-dev-portal-26-r1/streamlined_api/table.md new file mode 100644 index 0000000000..8556173ad2 --- /dev/null +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/streamlined_api/table.md @@ -0,0 +1,897 @@ +# Table + + + + + +### *class* Table + +Represents an MI table, and provides access to records (particularly searching on record properties), +exporters and attribute definitions. + +### Notes + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`Database.get_table()`](database.md#ansys.grantami.core.mi_tree_classes.Database.get_table) or [`Database.get_table_by_guid()`](database.md#ansys.grantami.core.mi_tree_classes.Database.get_table_by_guid) to access an instance of this class. + + + +#### add_subsets(values) + +Adds single or multiple subsets to the list of subsets currently applied to the [`Table`](#ansys.grantami.core.mi_tree_classes.Table) object. + +* **Parameters:** + **values** ([*set*](https://docs.python.org/3/library/stdtypes.html#set) *[*[*str*](https://docs.python.org/3/library/stdtypes.html#str) *] or* [*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple) *[*[*str*](https://docs.python.org/3/library/stdtypes.html#str) *] or* [*list*](https://docs.python.org/3/library/stdtypes.html#list) *[*[*str*](https://docs.python.org/3/library/stdtypes.html#str) *]*) – Subset name(s) to add. + +### Notes + +Makes a Service Layer call if the available subsets have not already been fetched. + + + +#### 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 each [`Record.children`](record.md#ansys.grantami.core.mi_record_classes.Record.children) property. + +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. + +* **Parameters:** + * **include_folders** ([*bool*](https://docs.python.org/3/library/functions.html#bool) *,* *default: False*) – Whether to include folders in the results. + * **include_generics** ([*bool*](https://docs.python.org/3/library/functions.html#bool) *,* *default: True*) – Whether to include generics in the results. + * **filter_by_subset** ([*bool*](https://docs.python.org/3/library/functions.html#bool) *,* *default: True*) – Whether to filter records by subset. + * **subset_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* *optional*) – Name of the subset to use for filtering. If not specified, uses the currently applied subset. +* **Return type:** + list[[`Record`](record.md#ansys.grantami.core.mi_record_classes.Record)] +* **Raises:** + [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – If more than one subset is applied to the table when `filter_by_subset` is [`True`](https://docs.python.org/3/library/constants.html#True) and `subset_name` + is not provided. + +### Notes + +Makes a Service Layer call. + + + +#### bulk_fetch(records, attributes=None, batch_size=100, parallelize=False, max_num_threads=6, include_binary_data=False) + +Populate attribute and pseudo-attribute values for multiple records in a single operation. + +Populates data values for all named [`AttributeDefinition`](attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinition) and [`PseudoAttributeDefinition`](attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.PseudoAttributeDefinition) objects in +the specified [`Record`](record.md#ansys.grantami.core.mi_record_classes.Record) objects. Attribute values for requested `attributes` are added to +[`Record.attributes`](record.md#ansys.grantami.core.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`](attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinition) +in `attributes`. [`AttributeDefinition`](attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinition) of meta-attributes can be obtained from the parent attribute +[`AttributeDefinition.meta_attributes`](attribute-definitions.md#ansys.grantami.core.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). + +#### Versionchanged +Changed in version 4.2: Argument `parallelise` was renamed to `parallelize`. + +* **Parameters:** + * **records** (list[[`Record`](record.md#ansys.grantami.core.mi_record_classes.Record)]) – List of records to fetch data for. + * **attributes** (list[[`AttributeDefinition`](attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinition) or [`PseudoAttributeDefinition`](attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.PseudoAttributeDefinition) or str], optional) – List of attributes to fetch. Set to [`None`](https://docs.python.org/3/library/constants.html#None) to export all record data. + * **batch_size** ([*int*](https://docs.python.org/3/library/functions.html#int) *,* *default: 100*) – Number of records to process in each batch. + * **parallelize** ([*bool*](https://docs.python.org/3/library/functions.html#bool) *,* *default: False*) – Whether to parallelize the fetch operation. + * **max_num_threads** ([*int*](https://docs.python.org/3/library/functions.html#int) *,* *default: 6*) – Maximum number of threads to use when parallelizing. + * **include_binary_data** ([*bool*](https://docs.python.org/3/library/functions.html#bool) *,* *default: False*) – Whether to include binary data in the fetch. +* **Raises:** + [**InvalidRecordStateError**](exceptions.md#ansys.grantami.core.mi_meta_classes.InvalidRecordStateError) – If one or more records have not been pushed to the server. + +### Notes + +Makes Service Layer calls to fetch attribute data in batches. + +Providing a list of attributes by name or by [`AttributeDefinition`](attribute-definitions.md#ansys.grantami.core.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`](attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeValue.meta_attributes) dictionary will contain empty meta-attribute values. + +If `include_binary_data` is set to [`False`](https://docs.python.org/3/library/constants.html#False) (default), the export will not fetch the binary data +for the requested File and Picture attributes and tabular columns. Instead, the export will export URLs +(see [`BinaryType.url`](supporting.md#ansys.grantami.core.mi_attribute_value_classes.BinaryType.url) for more information about using the URL to access the data). URLs should be used +for large files and pictures, or if the binary data itself is not required. However, as no data is fetched, +accessing the `binary_data` property and `save()` method will raise a `ValueError`. + +On-demand access to attribute values without using [`Table.bulk_fetch()`](#ansys.grantami.core.mi_tree_classes.Table.bulk_fetch) always fetches binary data. + +To summarize how the file and picture data can be accessed: + +* `include_binary_data = False` (default): The [`BinaryType.url`](supporting.md#ansys.grantami.core.mi_attribute_value_classes.BinaryType.url) property is populated. +* `include_binary_data = True`: The [`BinaryType.binary_data`](supporting.md#ansys.grantami.core.mi_attribute_value_classes.BinaryType.binary_data) property, and + [`AttributeFile.save()`](attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeFile.save) and [`AttributePicture.save()`](attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributePicture.save) methods are both available to access and save + the binary data. The [`BinaryType.url`](supporting.md#ansys.grantami.core.mi_attribute_value_classes.BinaryType.url) property is empty and returns [`None`](https://docs.python.org/3/library/constants.html#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 +`parallelize` should not be set to [`True`](https://docs.python.org/3/library/constants.html#True) when using long-running sessions authenticated via OIDC. See +[OIDC and parallel operation](../release_notes/known_issues.md#oidc-known-issue) for more details. + +If `include_binary_data` is set to [`False`](https://docs.python.org/3/library/constants.html#False): + +* [`BinaryType.binary_data`](supporting.md#ansys.grantami.core.mi_attribute_value_classes.BinaryType.binary_data) and [`BinaryType.save()`](supporting.md#ansys.grantami.core.mi_attribute_value_classes.BinaryType.save) raise a `ValueError`. +* Calling [`AttributeTabular.enable_destructive_editing()`](attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeTabular.enable_destructive_editing) on a tabular attribute value with unexported + binary data emits a [`UserWarning`](https://docs.python.org/3/library/exceptions.html#UserWarning). +* Proceeding to make destructive changes on a tabular attribute which unexported binary data raises a + [`UnexportedBinaryDataError`](exceptions.md#ansys.grantami.core.mi_meta_classes.UnexportedBinaryDataError) on re-import. +* Modifying the [`LocalFileValue.file_name`](tabular.md#ansys.grantami.core._mi_tabular_value_classes.LocalFileValue.file_name) or [`LocalFileValue.description`](tabular.md#ansys.grantami.core._mi_tabular_value_classes.LocalFileValue.description) properties for a cell + with unexported binary without adding new binary data raises a `ValueError` on re-import. + +### Examples + +The following code snippet shows how to include meta-attributes and pseudo-attributes in a `bulk_fetch` +request: + +```python +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) +``` + + + +#### bulk_fetch_all_record_versions(records, batch_size=100, parallelize=False, max_num_threads=6) + +Fetches all record versions for all provided records. + +Populates the [`Record.all_versions`](record.md#ansys.grantami.core.mi_record_classes.Record.all_versions), [`Record.release_state`](record.md#ansys.grantami.core.mi_record_classes.Record.release_state), and [`Record.record_history`](record.md#ansys.grantami.core.mi_record_classes.Record.record_history) +properties of the specified [`Record`](record.md#ansys.grantami.core.mi_record_classes.Record) objects. + +* **Parameters:** + * **records** (list[[`Record`](record.md#ansys.grantami.core.mi_record_classes.Record)]) – List of records to fetch versions for. + * **batch_size** ([*int*](https://docs.python.org/3/library/functions.html#int) *,* *default: 100*) – Number of records to process in each batch. + * **parallelize** ([*bool*](https://docs.python.org/3/library/functions.html#bool) *,* *default: False*) – Whether to parallelize the fetch operation. + * **max_num_threads** ([*int*](https://docs.python.org/3/library/functions.html#int) *,* *default: 6*) – Maximum number of threads to use when parallelizing. + +#### WARNING +`parallelize` should not be set to [`True`](https://docs.python.org/3/library/constants.html#True) when using long-running sessions authenticated via OIDC. See +[OIDC and parallel operation](../release_notes/known_issues.md#oidc-known-issue) for more details. + +#### SEE ALSO +[`Session.bulk_fetch_release_states()`](session.md#ansys.grantami.core.mi.Session.bulk_fetch_release_states) +: Fetches [`Record.release_state`](record.md#ansys.grantami.core.mi_record_classes.Record.release_state) only. + +### Notes + +Makes Service Layer calls to fetch record versions in batches. + +This operation performs multiple requests per batch. As a result, the batch size should be considered a relative +scale factor to control performance vs load on the Granta MI server, and is not an exact statement of the +number of records included in each request. + + + +#### bulk_fetch_associated_records(records, target_table, link_direction='Both', attribute_path=None, batch_size=100, parallelize=False, max_num_threads=6) + +Fetches records associated with the specified [`Record`](record.md#ansys.grantami.core.mi_record_classes.Record) objects from a target [`Table`](#ansys.grantami.core.mi_tree_classes.Table). + +Returns a list of dictionaries containing the source record and associated records for each [`Record`](record.md#ansys.grantami.core.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`](attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinitionTabular) objects in `attribute_path` to follow only those tabular links. + +#### Versionchanged +Changed in version 4.2: Argument `parallelise` was renamed to `parallelize`. + +* **Parameters:** + * **records** (list[[`Record`](record.md#ansys.grantami.core.mi_record_classes.Record)]) – List of source records. + * **target_table** ([`Table`](#ansys.grantami.core.mi_tree_classes.Table)) – Target table to fetch associated records from. + * **link_direction** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* *default: "Both"*) – Direction of links to follow: `Both`, `Forward`, or `Reverse`. + * **attribute_path** (list[[`AttributeDefinitionTabular`](attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinitionTabular)], optional) – List of tabular attributes to follow. + * **batch_size** ([*int*](https://docs.python.org/3/library/functions.html#int) *,* *default: 100*) – Number of records to process in each batch. + * **parallelize** ([*bool*](https://docs.python.org/3/library/functions.html#bool) *,* *default: False*) – Whether to parallelize the fetch operation. + * **max_num_threads** ([*int*](https://docs.python.org/3/library/functions.html#int) *,* *default: 6*) – Maximum number of threads to use when parallelizing. +* **Return type:** + list[dict[str, [`Record`](record.md#ansys.grantami.core.mi_record_classes.Record) | list[[`Record`](record.md#ansys.grantami.core.mi_record_classes.Record)]]] +* **Raises:** + [**InvalidRecordStateError**](exceptions.md#ansys.grantami.core.mi_meta_classes.InvalidRecordStateError) – If one or more records have not been pushed to the server. + +#### WARNING +`parallelize` should not be set to [`True`](https://docs.python.org/3/library/constants.html#True) when using long-running sessions authenticated via OIDC. See +[OIDC and parallel operation](../release_notes/known_issues.md#oidc-known-issue) for more details. + +### Notes + +Makes Service Layer calls to fetch associated records in batches. + + + +#### bulk_fetch_data_revision_history(records, batch_size=100, parallelize=False, max_num_threads=6) + +Fetches the data revision history for all attributes of the provided records. + +Populates the [`Record.data_revision_history`](record.md#ansys.grantami.core.mi_record_classes.Record.data_revision_history) property. + +#### Versionchanged +Changed in version 4.2: Argument `parallelise` was renamed to `parallelize`. + +* **Parameters:** + * **records** (list[[`Record`](record.md#ansys.grantami.core.mi_record_classes.Record)]) – List of records to fetch data revision history for. + * **batch_size** ([*int*](https://docs.python.org/3/library/functions.html#int) *,* *default: 100*) – Number of records to process in each batch. + * **parallelize** ([*bool*](https://docs.python.org/3/library/functions.html#bool) *,* *default: False*) – Whether to parallelize the fetch operation. + * **max_num_threads** ([*int*](https://docs.python.org/3/library/functions.html#int) *,* *default: 6*) – Maximum number of threads to use when parallelizing. +* **Raises:** + [**InvalidRecordStateError**](exceptions.md#ansys.grantami.core.mi_meta_classes.InvalidRecordStateError) – If one or more records have not been pushed to the server. + +#### WARNING +`parallelize` should not be set to [`True`](https://docs.python.org/3/library/constants.html#True) when using long-running sessions authenticated via OIDC. See +[OIDC and parallel operation](../release_notes/known_issues.md#oidc-known-issue) for more details. + +### Notes + +Makes Service Layer calls to fetch data revision history in batches. + + + +#### bulk_link_fetch(records, link_groups=None, batch_size=100, parallelize=False, max_num_threads=6, filter_subsets=True) + +Fetches and populates record link groups for the specified [`Record`](record.md#ansys.grantami.core.mi_record_classes.Record) objects. + +#### Versionchanged +Changed in version 4.2: Argument `parallelise` was renamed to `parallelize`. + +* **Parameters:** + * **records** (list[[`Record`](record.md#ansys.grantami.core.mi_record_classes.Record)]) – List of records to fetch links for. + * **link_groups** ([*list*](https://docs.python.org/3/library/stdtypes.html#list) *[*[*str*](https://docs.python.org/3/library/stdtypes.html#str) *]* *,* *optional*) – List of link group names to fetch. Set to [`None`](https://docs.python.org/3/library/constants.html#None) to fetch all. + * **batch_size** ([*int*](https://docs.python.org/3/library/functions.html#int) *,* *default: 100*) – Number of records to process in each batch. + * **parallelize** ([*bool*](https://docs.python.org/3/library/functions.html#bool) *,* *default: False*) – Whether to parallelize the fetch operation. + * **max_num_threads** ([*int*](https://docs.python.org/3/library/functions.html#int) *,* *default: 6*) – Maximum number of threads to use when parallelizing. + * **filter_subsets** ([*bool*](https://docs.python.org/3/library/functions.html#bool) *,* *default: True*) – Whether to filter by subsets. If [`True`](https://docs.python.org/3/library/constants.html#True), only linked records in the default subset of their table are + returned. If [`False`](https://docs.python.org/3/library/constants.html#False), linked records are returned from all subsets. +* **Raises:** + [**InvalidRecordStateError**](exceptions.md#ansys.grantami.core.mi_meta_classes.InvalidRecordStateError) – If one or more records have not been pushed to the server. + +#### WARNING +`parallelize` should not be set to [`True`](https://docs.python.org/3/library/constants.html#True) when using long-running sessions authenticated via OIDC. See +[OIDC and parallel operation](../release_notes/known_issues.md#oidc-known-issue) for more details. + +### Notes + +Makes Service Layer calls to fetch links in batches. + + + +#### create_empty_attribute_value(definition) + +Create an empty [`AttributeValue`](attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeValue) instance for an attribute. + +This can subsequently be assigned to a record for import. + +* **Parameters:** + **definition** ([`AttributeDefinition`](attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinition)) – Attribute definition object. +* **Return type:** + [`AttributeValue`](attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeValue) + + + +#### create_record(name, parent=None, short_name=None, attributes=None, folder=False, subsets=None, release_record=False, color=RecordColor.InheritFromParent) + +Creates a new [`Record`](record.md#ansys.grantami.core.mi_record_classes.Record) object in the [`Table`](#ansys.grantami.core.mi_tree_classes.Table). + +The record will not exist in Granta MI or be assignable as a parent until it is pushed to the server. + +* **Parameters:** + * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – Long name of the record. + * **parent** ([`Record`](record.md#ansys.grantami.core.mi_record_classes.Record) or [`Table`](#ansys.grantami.core.mi_tree_classes.Table), optional) – Parent record or table. + * **short_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* *optional*) – Short name of the record. + * **attributes** (dict[str, [`AttributeValue`](attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeValue)], optional) – Dictionary of attribute values. + * **folder** ([*bool*](https://docs.python.org/3/library/functions.html#bool) *,* *default: False*) – If true, the record will be created as a folder. + * **subsets** ([*set*](https://docs.python.org/3/library/stdtypes.html#set) *[*[*str*](https://docs.python.org/3/library/stdtypes.html#str) *]* *,* *optional*) – List of subsets the record will belong to. If not specified, record will be added to the currently active + subset(s) on the table. + * **release_record** ([*bool*](https://docs.python.org/3/library/functions.html#bool) *,* *default: False*) – Whether the record will be released when pushed to the server. + * **color** ([`RecordColor`](constants.md#ansys.grantami.core.mi_constants.RecordColor), default: RecordColor.InheritFromParent) – Record color. If not specified, inherits from parent. +* **Return type:** + [`Record`](record.md#ansys.grantami.core.mi_record_classes.Record) + + + +#### get_attribute_definition(name=None, identity=None) + +Returns the [`AttributeDefinition`](attribute-definitions.md#ansys.grantami.core.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*](https://docs.python.org/3/library/stdtypes.html#str) *,* *optional*) – Name of the [`AttributeDefinition`](attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinition) object. + * **identity** ([*int*](https://docs.python.org/3/library/functions.html#int) *,* *optional*) – Attribute identifier. +* **Return type:** + [`AttributeDefinition`](attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinition) or list[[`AttributeDefinition`](attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinition)] + + + +#### 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) *,* *optional*) – The target FEA analysis package. For example: ‘NX 10.0’, ‘CATIA V5’. + * **model** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* *optional*) – 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) *,* *optional*) – A tag that identifies the applications for which an exporter is intended to be used. + For example, ‘MIMaterialsGateway’, ‘MIViewer’. +* **Return type:** + list[[`Exporter`](supporting.md#ansys.grantami.core.mi_exporters.Exporter)] + +### Notes + +Makes a Service Layer call on first request for each applicability tag. + + + +#### get_record_by_id(history_identity=None, hguid=None, vguid=None, version_number=None) + +Returns the [`Record`](record.md#ansys.grantami.core.mi_record_classes.Record) object with the following (sets of) references in priority order. + +1. `vguid` (record version 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*](https://docs.python.org/3/library/functions.html#int) *,* *optional*) – Record history identity. + * **hguid** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* *optional*) – Record history GUID: uniquely identifies record. + * **vguid** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* *optional*) – Record version GUID: uniquely identifies record version. + * **version_number** ([*int*](https://docs.python.org/3/library/functions.html#int) *,* *optional*) – Record version number. +* **Returns:** + Record object or [`None`](https://docs.python.org/3/library/constants.html#None) if not found. +* **Return type:** + [`Record`](record.md#ansys.grantami.core.mi_record_classes.Record) or [`None`](https://docs.python.org/3/library/constants.html#None) + +### Notes + +Makes a Service Layer call. + + + +#### get_record_by_lookup_value(attribute_name, lookup_value) + +Returns a [`Record`](record.md#ansys.grantami.core.mi_record_classes.Record) object specified by attribute name and an exact match for a short text string. + +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*](https://docs.python.org/3/library/stdtypes.html#str)) – Name of the attribute to search. + * **lookup_value** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – Short text string value to match. +* **Returns:** + Record object or [`None`](https://docs.python.org/3/library/constants.html#None) if not found. +* **Return type:** + [`Record`](record.md#ansys.grantami.core.mi_record_classes.Record) or [`None`](https://docs.python.org/3/library/constants.html#None) + +### Notes + +Makes a Service Layer call. + +In Granta MI 2025 R2 and later, if multiple matches are detected, no results are returned. In earlier Granta MI +versions, an exception is raised. + + + +#### get_records_by_ids(record_identifiers) + +Returns a [`Record`](record.md#ansys.grantami.core.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`](https://docs.python.org/3/library/constants.html#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 version 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*](https://docs.python.org/3/library/stdtypes.html#dict) *[*[*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* [*str*](https://docs.python.org/3/library/stdtypes.html#str) *|* [*int*](https://docs.python.org/3/library/functions.html#int) *]* *]*) – Sequence of dictionaries containing record identifiers. +* **Return type:** + list[[`Record`](record.md#ansys.grantami.core.mi_record_classes.Record) | [`None`](https://docs.python.org/3/library/constants.html#None)] + +### Notes + +Makes multiple Service Layer calls depending on number of identifiers provided. + + + +#### get_records_from_path(starting_node, tree_path, use_short_names=False) + +Return all records at the end of the provided 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`](https://docs.python.org/3/library/constants.html#None). To start the path under any other node in the tree, + specify a [`Record`](record.md#ansys.grantami.core.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`](https://docs.python.org/3/library/constants.html#None) e.g. + `['Thermoplastics', :obj:`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. + +* **Parameters:** + * **starting_node** ([`Record`](record.md#ansys.grantami.core.mi_record_classes.Record) or [`None`](https://docs.python.org/3/library/constants.html#None)) – Any Record in the table tree. To start the path at the root node of the table tree, set to [`None`](https://docs.python.org/3/library/constants.html#None). + * **tree_path** (list[str or [`None`](https://docs.python.org/3/library/constants.html#None)]) – A list of strings specifying the names of the records in the path. May include [`None`](https://docs.python.org/3/library/constants.html#None) as a wildcard. + * **use_short_names** ([*bool*](https://docs.python.org/3/library/functions.html#bool) *,* *default: False*) – Whether the strings in the path are the record short names. +* **Return type:** + list[[`Record`](record.md#ansys.grantami.core.mi_record_classes.Record)] +* **Raises:** + [**InvalidRecordStateError**](exceptions.md#ansys.grantami.core.mi_meta_classes.InvalidRecordStateError) – If the starting node has not been pushed to the server. + +### Notes + +Makes multiple Service Layer calls. + +### Examples + +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. + + + +#### path_from(starting_node, tree_path, color=RecordColor.InheritFromParent) + +Ensures that all the folders in a specified path are available, and creates any that do not already exist. + +In the case of a version-controlled table, folders are created in an unreleased state. + +* **Parameters:** + * **starting_node** ([`Record`](record.md#ansys.grantami.core.mi_record_classes.Record) or [`None`](https://docs.python.org/3/library/constants.html#None)) – Identifies the node under which the new path will start. Set to [`None`](https://docs.python.org/3/library/constants.html#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*](https://docs.python.org/3/library/stdtypes.html#list) *[*[*str*](https://docs.python.org/3/library/stdtypes.html#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. + * **color** ([`RecordColor`](constants.md#ansys.grantami.core.mi_constants.RecordColor), default: RecordColor.InheritFromParent) – Sets the color of all folders and records in the path. +* **Returns:** + The Record object representing the last folder in the path. +* **Return type:** + [`Record`](record.md#ansys.grantami.core.mi_record_classes.Record) +* **Raises:** + [**InvalidRecordStateError**](exceptions.md#ansys.grantami.core.mi_meta_classes.InvalidRecordStateError) – If one or more start nodes has not been pushed to the server. + +### Notes + +Makes a Service Layer call. + + + +#### paths_from(paths) + +Create multiple paths between specified start and end nodes in the table tree. + +See description of [`path_from()`](#ansys.grantami.core.mi_tree_classes.Table.path_from) for further details. + +* **Parameters:** + **paths** (list[dict[str, [`Record`](record.md#ansys.grantami.core.mi_record_classes.Record) | [`None`](https://docs.python.org/3/library/constants.html#None) | [`RecordColor`](constants.md#ansys.grantami.core.mi_constants.RecordColor) | list[str]]]) – List of path specifications. +* **Return type:** + list[tuple[dict, [`Record`](record.md#ansys.grantami.core.mi_record_classes.Record)]] +* **Raises:** + [**InvalidRecordStateError**](exceptions.md#ansys.grantami.core.mi_meta_classes.InvalidRecordStateError) – If one or more start nodes has not been pushed to the server. + +### Examples + +Paths are specified as a list of dictionaries with the following structure: + +```python +{'starting_node': Optional[Record], +'tree_path': ['list', 'of', 'folders'], +'color': 'color for all new nodes to be assigned'} +``` + +### Notes + +Makes a Service Layer call. + + + +#### 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`](https://docs.python.org/3/library/constants.html#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`](https://docs.python.org/3/library/constants.html#False) then records will be returned from all subsets. + +* **Parameters:** + * **filter_by_subset** ([*bool*](https://docs.python.org/3/library/functions.html#bool) *,* *default: True*) – Whether to filter records by subset. + * **subset_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* *optional*) – Name of the subset to use for filtering. +* **Raises:** + [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – If more than one subset is applied to the table when `filter_by_subset` is [`True`](https://docs.python.org/3/library/constants.html#True) and `subset_name` + is not provided. + +### Notes + +Makes a Service Layer call. + + + +#### refresh_attributes() + +Performs a Foundation API [`BrowseService.get_attribute_details()`](../foundation_api.md#ansys.grantami.backend.soap.BrowseService.BrowseService.get_attribute_details) request and creates a new set of +attributes. + +This method only updates the details of existing attributes. To update the list of available attributes, use +[`Database.refresh_tables()`](database.md#ansys.grantami.core.mi_tree_classes.Database.refresh_tables). + +### Notes + +Makes a Service Layer call. + + + +#### refresh_subsets() + +Fetches the list of subsets which can be applied to this table. + +### Notes + +Makes a Service Layer call. + + + +#### remove_subsets(values) + +Removes single or multiple subsets from the list of subsets currently associated with the [`Table`](#ansys.grantami.core.mi_tree_classes.Table) object. + +* **Parameters:** + **values** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *or* [*list*](https://docs.python.org/3/library/stdtypes.html#list) *[*[*str*](https://docs.python.org/3/library/stdtypes.html#str) *] or* [*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple) *[*[*str*](https://docs.python.org/3/library/stdtypes.html#str) *] or* [*set*](https://docs.python.org/3/library/stdtypes.html#set) *[*[*str*](https://docs.python.org/3/library/stdtypes.html#str) *]*) – Subset name(s) to remove. + + + +#### reset_display_unit(attribute) + +Resets the display unit for a `POIN` or `RNGE` attribute back to the unit system default. + +* **Parameters:** + **attribute** (str or [`AttributeDefinitionPoint`](attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinitionPoint) or [`AttributeDefinitionRange`](attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinitionRange)) – Attribute name or attribute definition object. + + + +#### 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`](record.md#ansys.grantami.core.mi_record_classes.Record) objects whose short or long names are an exact match for `name`. + +If `filter_by_subset` is [`True`](https://docs.python.org/3/library/constants.html#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`](https://docs.python.org/3/library/constants.html#False) then records will be returned from all subsets. + +This method is case-insensitive. + +* **Parameters:** + * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – Name to search for. + * **filter_by_subset** ([*bool*](https://docs.python.org/3/library/functions.html#bool) *,* *default: True*) – Whether to filter records by subset. + * **subset_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* *optional*) – Name of the subset to use for filtering. +* **Return type:** + list[[`Record`](record.md#ansys.grantami.core.mi_record_classes.Record)] +* **Raises:** + [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – If more than one subset is applied to the table when `filter_by_subset` is [`True`](https://docs.python.org/3/library/constants.html#True) and `subset_name` + is not provided. + +### Notes + +Use [`Database.search_for_records_by_name()`](database.md#ansys.grantami.core.mi_tree_classes.Database.search_for_records_by_name) to search across the whole database. + +Makes a Service Layer call. + + + +#### 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`](record.md#ansys.grantami.core.mi_record_classes.Record) objects. + +If `filter_by_subset` is [`True`](https://docs.python.org/3/library/constants.html#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`](https://docs.python.org/3/library/constants.html#False) then records will be returned from all subsets. + +* **Parameters:** + * **text** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – Text string to search for. + * **filter_by_subset** ([*bool*](https://docs.python.org/3/library/functions.html#bool) *,* *default: True*) – Whether to filter records by subset. + * **subset_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* *optional*) – Name of the subset to use for filtering. +* **Return type:** + list[[`Record`](record.md#ansys.grantami.core.mi_record_classes.Record)] +* **Raises:** + [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – If more than one subset is applied to the table when `filter_by_subset` is [`True`](https://docs.python.org/3/library/constants.html#True) and `subset_name` + is not provided. + +#### SEE ALSO +[`Database.search_for_records_by_text()`](database.md#ansys.grantami.core.mi_tree_classes.Database.search_for_records_by_text) +: Searches for records across the whole database. + +### Notes + +Makes a Service Layer call. + + + +#### 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()`](database.md#ansys.grantami.core.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. + +If `filter_by_subset` is [`True`](https://docs.python.org/3/library/constants.html#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`](https://docs.python.org/3/library/constants.html#False) then records will be returned from all subsets. + +* **Parameters:** + * **list_of_criteria** (list[[`SearchCriterion`](supporting.md#ansys.grantami.core.mi_meta_classes.SearchCriterion)]) – List of search criteria to apply. + * **silent** ([*bool*](https://docs.python.org/3/library/functions.html#bool) *,* *default: False*) – Whether to ignore errors caused by non-existent attributes. + * **filter_by_subset** ([*bool*](https://docs.python.org/3/library/functions.html#bool) *,* *default: True*) – Whether to filter records by subset. + * **subset_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* *optional*) – Name of the subset to use for filtering. +* **Returns:** + A list of Record objects that match the provided criteria. +* **Return type:** + list[[`Record`](record.md#ansys.grantami.core.mi_record_classes.Record)] +* **Raises:** + * [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – If more than one subset is applied to the table when `filter_by_subset` is [`True`](https://docs.python.org/3/library/constants.html#True) and `subset_name` + is not provided. + * [**KeyError**](https://docs.python.org/3/library/exceptions.html#KeyError) – If the search criteria include an attribute that does not exist in the table and `silent` is [`False`](https://docs.python.org/3/library/constants.html#False). + +### Notes + +Makes a Service Layer call. + +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. + + + +#### set_display_unit(attribute, unit_symbol) + +Sets the display unit for `POIN` and `RNGE` attributes (not used for import or FEA exporters). + +* **Parameters:** + * **attribute** (str or [`AttributeDefinitionPoint`](attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinitionPoint) or [`AttributeDefinitionRange`](attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinitionRange)) – Attribute name or attribute definition object. + * **unit_symbol** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – Unit symbol to set as the display unit. + +### Notes + +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`. + + + +#### *property* attributes *: [Dict](https://docs.python.org/3/library/typing.html#typing.Dict)[[str](https://docs.python.org/3/library/stdtypes.html#str), [AttributeDefinition](attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinition)]* + +All attributes included in the table schema, indexed by name. + +Meta-attributes are accessible through the `meta_attributes` property of their parent attribute. + +* **Return type:** + dict[str, [`AttributeDefinition`](attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinition)] + +### Notes + +Makes a Service Layer call if the layouts have not already been fetched. + + + +#### *property* children *: [List](https://docs.python.org/3/library/typing.html#typing.List)[[Record](record.md#ansys.grantami.core.mi_record_classes.Record)]* + +Return the children of the Table node. + +Analogous to [`Record.children`](record.md#ansys.grantami.core.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()`](#ansys.grantami.core.mi_tree_classes.Table.refetch_children) or +[`Table.all_records()`](#ansys.grantami.core.mi_tree_classes.Table.all_records), which apply subset filtering. If the [`Table`](#ansys.grantami.core.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()`](#ansys.grantami.core.mi_tree_classes.Table.refetch_children). The default subset filtering behavior is applied. + +* **Return type:** + list[[`Record`](record.md#ansys.grantami.core.mi_record_classes.Record)] +* **Raises:** + [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – If more than one subset is applied to the [`Table`](#ansys.grantami.core.mi_tree_classes.Table). + +### Notes + +Makes a Service Layer call if the children have not already been fetched. + + + +#### *property* database *: [Database](database.md#ansys.grantami.core.mi_tree_classes.Database)* + +[`Database`](database.md#ansys.grantami.core.mi_tree_classes.Database) in which the [`Table`](#ansys.grantami.core.mi_tree_classes.Table) is defined. + +* **Returns:** + Database object. +* **Return type:** + [`Database`](database.md#ansys.grantami.core.mi_tree_classes.Database) + + + +#### *property* db_key *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Parent database key. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* default_layout *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +Name of default layout for this [`Table`](#ansys.grantami.core.mi_tree_classes.Table). + +* **Return type:** + str or [`None`](https://docs.python.org/3/library/constants.html#None) + +### Notes + +Makes a Service Layer call if the layouts have not already been fetched. + + + +#### *property* default_subset *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +The default subset for this [`Table`](#ansys.grantami.core.mi_tree_classes.Table). + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + + + +#### *property* guid *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +GUID of the table. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* layouts *: [Dict](https://docs.python.org/3/library/typing.html#typing.Dict)[[str](https://docs.python.org/3/library/stdtypes.html#str), [TableLayout](supporting.md#ansys.grantami.core.mi_meta_classes.TableLayout)]* + +Fetch and view the layouts available in this table. + +* **Return type:** + dict[str, [`TableLayout`](supporting.md#ansys.grantami.core.mi_meta_classes.TableLayout)] + +### Notes + +Makes a Service Layer call if the layouts have not already been fetched. + + + +#### *property* mi *: [Session](session.md#ansys.grantami.core.mi.Session)* + +MI Session that was used to create or access the [`Table`](#ansys.grantami.core.mi_tree_classes.Table) object. + +Used for any Service Layer calls made by the [`Table`](#ansys.grantami.core.mi_tree_classes.Table). + +* **Returns:** + Session object. +* **Return type:** + [`Session`](session.md#ansys.grantami.core.mi.Session) + + + +#### *property* min_max_type *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +How table-wide minimum and maximum values of point, integer, range, and date-time attributes are calculated. + +* [`None`](https://docs.python.org/3/library/constants.html#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 refetches cache extrema information for all attributes in the table. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + +### Notes + +Makes a Service Layer call. + + + +#### *property* name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Name of the table. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + +#### *property* subsets *: [Set](https://docs.python.org/3/library/typing.html#typing.Set)[[str](https://docs.python.org/3/library/stdtypes.html#str)]* + +Subsets that are currently applied to the [`Table`](#ansys.grantami.core.mi_tree_classes.Table) object. + +Used for record creation, searching, and record fetching. + +* **Return type:** + [set](https://docs.python.org/3/library/stdtypes.html#set)[[str](https://docs.python.org/3/library/stdtypes.html#str)] + +#### WARNING +If using any Table method which returns a list of records, such as a search method or +[`Table.all_records()`](#ansys.grantami.core.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 by that method. + + + +#### *property* subsets_available *: [Set](https://docs.python.org/3/library/typing.html#typing.Set)[[str](https://docs.python.org/3/library/stdtypes.html#str)]* + +Subsets which can be applied to this table. + +* **Return type:** + [set](https://docs.python.org/3/library/stdtypes.html#set)[[str](https://docs.python.org/3/library/stdtypes.html#str)] + +### Notes + +Makes a Service Layer call if the subsets have not already been fetched. + + + +#### *property* unit_system *: [str](https://docs.python.org/3/library/stdtypes.html#str)* + +Unit system currently in use. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/streamlined_api/tabular.md b/2026R1/scripting-toolkit-dev-portal-26-r1/streamlined_api/tabular.md new file mode 100644 index 0000000000..f9155d7aab --- /dev/null +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/streamlined_api/tabular.md @@ -0,0 +1,1432 @@ +# Tabular attribute value items + + + + + + + +## Tabular row + + + + + +### *class* TabularRow + +Represents a single row in a tabular attribute. + +Provides access to the cells in the row, as well as the linking value and identifier of the row. + +### Notes + +Do not create instances of this class. Use [`AttributeTabular.rows`](attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeTabular.rows) to access existing rows and +[`AttributeTabular.append_row()`](attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeTabular.append_row) to create new rows. + + + +#### set_linking_value(value) + +Sets the linking value of the row. + +Set to [`None`](https://docs.python.org/3/library/constants.html#None) to clear the linking value. The row will no longer be linked to any records. + +* **Parameters:** + **value** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *or* *None*) – The new linking value for the row. +* **Raises:** + [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – If [`is_exported`](#ansys.grantami.core.mi_attribute_value_classes.TabularRow.is_exported) is [`True`](https://docs.python.org/3/library/constants.html#True) and destructive editing is not enabled. + +#### SEE ALSO +[`AttributeTabular.is_destructive_editing_allowed`](attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeTabular.is_destructive_editing_allowed) +: Whether destructive editing of the tabular attribute value is allowed. + + + +#### *property* cells *: [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)[[TabularCell](#ansys.grantami.core._mi_tabular_value_classes.TabularCell) | [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)[[TabularCell](#ansys.grantami.core._mi_tabular_value_classes.TabularCell), ...], ...]* + +The cells in the row. + +* **Return type:** + [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)[[TabularCell](#ansys.grantami.core._mi_tabular_value_classes.TabularCell)] + + + +#### *property* cells_by_column *: [Mapping](https://docs.python.org/3/library/typing.html#typing.Mapping)[[str](https://docs.python.org/3/library/stdtypes.html#str), [TabularCell](#ansys.grantami.core._mi_tabular_value_classes.TabularCell) | [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)[[TabularCell](#ansys.grantami.core._mi_tabular_value_classes.TabularCell), ...]]* + +The cells in the row, indexed by the column name. + +* **Returns:** + Mapping of column name to TabularCell. +* **Return type:** + Mapping[[str](https://docs.python.org/3/library/stdtypes.html#str), [TabularCell](#ansys.grantami.core._mi_tabular_value_classes.TabularCell)] + + + +#### *property* identity *: [int](https://docs.python.org/3/library/functions.html#int)* + +The identity of the row. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) + + + +#### *property* is_exported *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Whether the row represents an existing row in the database. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* linking_value *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +The linking value of the row. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + + + +## Linked tabular cells + + + + + +### *class* TabularCell + +Abstract base class for tabular cell value types. + +Extended by [`EditableTabularCell`](#ansys.grantami.core._mi_tabular_value_classes.EditableTabularCell). + +See the following concrete implementations: + +* [`ShortTextValue`](#ansys.grantami.core._mi_tabular_value_classes.ShortTextValue) +* [`LongTextValue`](#ansys.grantami.core._mi_tabular_value_classes.LongTextValue) +* [`LogicalValue`](#ansys.grantami.core._mi_tabular_value_classes.LogicalValue) +* [`IntegerValue`](#ansys.grantami.core._mi_tabular_value_classes.IntegerValue) +* [`DateValue`](#ansys.grantami.core._mi_tabular_value_classes.DateValue) +* [`PointValue`](#ansys.grantami.core._mi_tabular_value_classes.PointValue) +* [`RangeValue`](#ansys.grantami.core._mi_tabular_value_classes.RangeValue) +* [`HyperlinkValue`](#ansys.grantami.core._mi_tabular_value_classes.HyperlinkValue) +* [`DiscreteValue`](#ansys.grantami.core._mi_tabular_value_classes.DiscreteValue) +* [`PictureValue`](#ansys.grantami.core._mi_tabular_value_classes.PictureValue) +* [`FileValue`](#ansys.grantami.core._mi_tabular_value_classes.FileValue) +* [`IgnoredLocalTabularCell`](#ansys.grantami.core._mi_tabular_value_classes.IgnoredLocalTabularCell) +* [`UnavailableTabularCell`](#ansys.grantami.core._mi_tabular_value_classes.UnavailableTabularCell) + + + + + +### *class* ShortTextValue + +Represents a single short text value in a linked short text tabular cell. + +### Notes + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`TabularRow.cells`](#ansys.grantami.core.mi_attribute_value_classes.TabularRow.cells) or [`TabularRow.cells_by_column`](#ansys.grantami.core.mi_attribute_value_classes.TabularRow.cells_by_column) to access an instance of this class. + + + +#### *property* is_empty *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Whether the tabular cell is populated or not. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* value *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +Text value associated with this tabular cell. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + + + + + +### *class* LongTextValue + +Represents a single long text value in a linked long text tabular cell. + +### Notes + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`TabularRow.cells`](#ansys.grantami.core.mi_attribute_value_classes.TabularRow.cells) or [`TabularRow.cells_by_column`](#ansys.grantami.core.mi_attribute_value_classes.TabularRow.cells_by_column) to access an instance of this class. + + + +#### *property* is_empty *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Whether the tabular cell is populated or not. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* value *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +Text value associated with this tabular cell. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + + + + + +### *class* LogicalValue + +Represents a single logical value in a linked logical tabular cell. + +### Notes + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`TabularRow.cells`](#ansys.grantami.core.mi_attribute_value_classes.TabularRow.cells) or [`TabularRow.cells_by_column`](#ansys.grantami.core.mi_attribute_value_classes.TabularRow.cells_by_column) to access an instance of this class. + + + +#### *property* is_empty *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Whether the tabular cell is populated or not. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* value *: [bool](https://docs.python.org/3/library/functions.html#bool) | [None](https://docs.python.org/3/library/constants.html#None)* + +Logical value associated with this tabular cell. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) or None + + + + + +### *class* IntegerValue + +Represents a single integer value in a linked integer tabular cell. + +### Notes + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`TabularRow.cells`](#ansys.grantami.core.mi_attribute_value_classes.TabularRow.cells) or [`TabularRow.cells_by_column`](#ansys.grantami.core.mi_attribute_value_classes.TabularRow.cells_by_column) to access an instance of this class. + + + +#### *property* is_empty *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Whether the tabular cell is populated or not. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* value *: [int](https://docs.python.org/3/library/functions.html#int) | [None](https://docs.python.org/3/library/constants.html#None)* + +Integer value associated with this cell. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) or None + + + + + +### *class* DateValue + +Represents a single date value in a linked date tabular cell. + +### Notes + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`TabularRow.cells`](#ansys.grantami.core.mi_attribute_value_classes.TabularRow.cells) or [`TabularRow.cells_by_column`](#ansys.grantami.core.mi_attribute_value_classes.TabularRow.cells_by_column) to access an instance of this class. + + + +#### *property* is_empty *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Whether the tabular cell is populated or not. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* value *: [date](https://docs.python.org/3/library/datetime.html#datetime.date) | [None](https://docs.python.org/3/library/constants.html#None)* + +Date value associated with this tabular cell. + +* **Return type:** + [`datetime.date`](https://docs.python.org/3/library/datetime.html#datetime.date) or None + + + + + +### *class* PictureValue + +Represents a picture value in a linked picture tabular cell. + +### Notes + +Tabular Picture Cells only support a single binary data value, together with an optional URL and MIME file type. + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`TabularRow.cells`](#ansys.grantami.core.mi_attribute_value_classes.TabularRow.cells) or [`TabularRow.cells_by_column`](#ansys.grantami.core.mi_attribute_value_classes.TabularRow.cells_by_column) to access an instance of this class. + + + +#### save(path) + +Save binary data to disk. + +* **Parameters:** + **path** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *or* [*pathlib.Path*](https://docs.python.org/3/library/pathlib.html#pathlib.Path)) – File path where the binary data will be saved. +* **Raises:** + * [**TypeError**](https://docs.python.org/3/library/exceptions.html#TypeError) – If path is not a string or pathlib.Path. + * [**AssertionError**](https://docs.python.org/3/library/exceptions.html#AssertionError) – If the value is empty. + + + +#### *property* binary_data *: [bytes](https://docs.python.org/3/library/stdtypes.html#bytes) | [None](https://docs.python.org/3/library/constants.html#None)* + +Binary data associated with this tabular cell. + +* **Return type:** + [bytes](https://docs.python.org/3/library/stdtypes.html#bytes) or None +* **Raises:** + [**UnexportedBinaryDataError**](exceptions.md#ansys.grantami.core.mi_meta_classes.UnexportedBinaryDataError) – If binary data is available on the server but was not exported. + + + +#### *property* is_empty *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Whether the tabular cell is populated or not. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* mime_file_type *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +MIME (Multipurpose Internet Mail Extensions) file type. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + + + +#### *property* url *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +URL associated with this tabular cell. + +In a future version this property will raise an exception if the attribute is exported with +`include_binary_data = True`. See [Planned file and picture data changes](../release_notes/deprecations.md#planned-changes-file-picture) for more details. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + + + +#### *property* value *: [bytes](https://docs.python.org/3/library/stdtypes.html#bytes) | [None](https://docs.python.org/3/library/constants.html#None)* + +Binary data if present. + +In a future version this property will return the URL if the attribute is exported with +`include_binary_data = False`. See [Planned file and picture data changes](../release_notes/deprecations.md#planned-changes-file-picture) for more details. + +* **Return type:** + [bytes](https://docs.python.org/3/library/stdtypes.html#bytes) or None + + + + + +### *class* FileValue + +Represents a file data value in a linked file tabular cell. + +### Notes + +Tabular File Cells support a single binary data value and a file name, together with an optional description, +URL, and MIME file type. + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`TabularRow.cells`](#ansys.grantami.core.mi_attribute_value_classes.TabularRow.cells) or [`TabularRow.cells_by_column`](#ansys.grantami.core.mi_attribute_value_classes.TabularRow.cells_by_column) to access an instance of this class. + + + +#### save(path) + +Save binary data to disk. + +* **Parameters:** + **path** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *or* [*pathlib.Path*](https://docs.python.org/3/library/pathlib.html#pathlib.Path)) – File path where the binary data will be saved. +* **Raises:** + * [**TypeError**](https://docs.python.org/3/library/exceptions.html#TypeError) – If path is not a string or pathlib.Path. + * [**AssertionError**](https://docs.python.org/3/library/exceptions.html#AssertionError) – If the value is empty. + + + +#### *property* binary_data *: [bytes](https://docs.python.org/3/library/stdtypes.html#bytes) | [None](https://docs.python.org/3/library/constants.html#None)* + +Binary data associated with this tabular cell. + +* **Return type:** + [bytes](https://docs.python.org/3/library/stdtypes.html#bytes) or None +* **Raises:** + [**UnexportedBinaryDataError**](exceptions.md#ansys.grantami.core.mi_meta_classes.UnexportedBinaryDataError) – If binary data is available on the server but was not exported. + + + +#### *property* description *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +Description of the file. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + + + +#### *property* file_name *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +Name of the file, including the file extension. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + + + +#### *property* is_empty *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Whether the tabular cell is populated or not. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* mime_file_type *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +MIME (Multipurpose Internet Mail Extensions) file type. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + + + +#### *property* url *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +URL associated with this tabular cell. + +In a future version this property will raise an exception if the attribute is exported with +`include_binary_data = True`. See [Planned file and picture data changes](../release_notes/deprecations.md#planned-changes-file-picture) for more details. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + + + +#### *property* value *: [bytes](https://docs.python.org/3/library/stdtypes.html#bytes) | [None](https://docs.python.org/3/library/constants.html#None)* + +Binary data if present. + +In a future version this property will return the URL if the attribute is exported with +`include_binary_data = False`. See [Planned file and picture data changes](../release_notes/deprecations.md#planned-changes-file-picture) for more details. + +* **Return type:** + [bytes](https://docs.python.org/3/library/stdtypes.html#bytes) or None + + + + + +### *class* PointValue + +Represents a single point value in a linked point tabular cell. + +### Notes + +Tabular Point Cells only support a single value and an optional unit. + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`TabularRow.cells`](#ansys.grantami.core.mi_attribute_value_classes.TabularRow.cells) or [`TabularRow.cells_by_column`](#ansys.grantami.core.mi_attribute_value_classes.TabularRow.cells_by_column) to access an instance of this class. + + + +#### *property* is_empty *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Whether the tabular cell is populated or not. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* unit *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +Unit symbol of the tabular cell. + +* **Returns:** + Unit symbol, or [`None`](https://docs.python.org/3/library/constants.html#None) if the cell is dimensionless. +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + + + +#### *property* value *: [int](https://docs.python.org/3/library/functions.html#int) | [float](https://docs.python.org/3/library/functions.html#float) | [None](https://docs.python.org/3/library/constants.html#None)* + +Point value associated with this cell. + +* **Return type:** + [float](https://docs.python.org/3/library/functions.html#float) or None + + + + + +### *class* RangeValue + +Represents a range value in a linked range tabular cell. + +### Notes + +Tabular Range Cells support a low and high value, both of which can be inclusive or exclusive, together with an +optional unit. + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`TabularRow.cells`](#ansys.grantami.core.mi_attribute_value_classes.TabularRow.cells) or [`TabularRow.cells_by_column`](#ansys.grantami.core.mi_attribute_value_classes.TabularRow.cells_by_column) to access an instance of this class. + + + +#### *property* high *: [float](https://docs.python.org/3/library/functions.html#float) | [None](https://docs.python.org/3/library/constants.html#None)* + +High value of the range. + +* **Return type:** + [float](https://docs.python.org/3/library/functions.html#float) or None + + + +#### *property* high_value_is_inclusive *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Whether the high value is included in the range. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* is_empty *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Whether the tabular cell is populated or not. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* low *: [float](https://docs.python.org/3/library/functions.html#float) | [None](https://docs.python.org/3/library/constants.html#None)* + +Low value of the range. + +* **Return type:** + [float](https://docs.python.org/3/library/functions.html#float) or None + + + +#### *property* low_value_is_inclusive *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Whether the low value is included in the range. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* unit *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +Unit symbol of the tabular cell. + +* **Returns:** + Unit symbol, or [`None`](https://docs.python.org/3/library/constants.html#None) if the cell is dimensionless. +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + + + + + +### *class* DiscreteValue + +Represents a single discrete value in a linked discrete tabular cell. + +### Notes + +Tabular Discrete Cells only support a single value and an order, which is the index of the value in the list of +possible discrete values for the column. This does not imply that the associated discrete type is ordered. + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`TabularRow.cells`](#ansys.grantami.core.mi_attribute_value_classes.TabularRow.cells) or [`TabularRow.cells_by_column`](#ansys.grantami.core.mi_attribute_value_classes.TabularRow.cells_by_column) to access an instance of this class. + + + +#### *property* is_empty *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Whether the tabular cell is populated or not. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* order *: [int](https://docs.python.org/3/library/functions.html#int) | [None](https://docs.python.org/3/library/constants.html#None)* + +Position of the current discrete value in the discrete type. + +* **Returns:** + Position (1-indexed) in the discrete type. Relevant for ordered discrete types only. +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) or None + + + +#### *property* value *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +Discrete value associated with this tabular cell. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + + + + + +### *class* HyperlinkValue + +Represents a hyperlink value in a linked hyperlink tabular cell. + +### Notes + +Tabular Hyperlink Cells support a value, a display type, and a description. + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`TabularRow.cells`](#ansys.grantami.core.mi_attribute_value_classes.TabularRow.cells) or [`TabularRow.cells_by_column`](#ansys.grantami.core.mi_attribute_value_classes.TabularRow.cells_by_column) to access an instance of this class. + + + +#### *property* hyperlink_description *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +Text which displays instead of the URL in MI applications. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + + + +#### *property* hyperlink_display *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +How the hyperlink should be opened 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). + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + + + +#### *property* is_empty *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Whether the tabular cell is populated or not. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* value *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +URL of the hyperlink. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + + + +## Local tabular cells + + + + + +### *class* EditableTabularCell + +Abstract base class for editable tabular cell value types. + +See the following concrete implementations: + +* [`LocalShortTextValue`](#ansys.grantami.core._mi_tabular_value_classes.LocalShortTextValue) +* [`LocalLongTextValue`](#ansys.grantami.core._mi_tabular_value_classes.LocalLongTextValue) +* [`LocalLogicalValue`](#ansys.grantami.core._mi_tabular_value_classes.LocalLogicalValue) +* [`LocalIntegerValue`](#ansys.grantami.core._mi_tabular_value_classes.LocalIntegerValue) +* [`LocalDateValue`](#ansys.grantami.core._mi_tabular_value_classes.LocalDateValue) +* [`LocalPointValue`](#ansys.grantami.core._mi_tabular_value_classes.LocalPointValue) +* [`LocalRangeValue`](#ansys.grantami.core._mi_tabular_value_classes.LocalRangeValue) +* [`LocalHyperlinkValue`](#ansys.grantami.core._mi_tabular_value_classes.LocalHyperlinkValue) +* [`LocalDiscreteValue`](#ansys.grantami.core._mi_tabular_value_classes.LocalDiscreteValue) +* [`LocalPictureValue`](#ansys.grantami.core._mi_tabular_value_classes.LocalPictureValue) +* [`LocalFileValue`](#ansys.grantami.core._mi_tabular_value_classes.LocalFileValue) + + + + + +### *class* LocalShortTextValue + +Represents a single short text value in a local short text tabular cell. + +### Notes + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`TabularRow.cells`](#ansys.grantami.core.mi_attribute_value_classes.TabularRow.cells) or [`TabularRow.cells_by_column`](#ansys.grantami.core.mi_attribute_value_classes.TabularRow.cells_by_column) to access an instance of this class. + + + +#### clear() + +Clear the `value` property. + + + +#### *property* is_empty *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Whether the tabular cell is populated or not. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* value *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +Text value associated with this tabular cell. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + + + + + +### *class* LocalLongTextValue + +Represents a single long text value in a local long text tabular cell. + +### Notes + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`TabularRow.cells`](#ansys.grantami.core.mi_attribute_value_classes.TabularRow.cells) or [`TabularRow.cells_by_column`](#ansys.grantami.core.mi_attribute_value_classes.TabularRow.cells_by_column) to access an instance of this class. + + + +#### clear() + +Clear the `value` property. + + + +#### *property* is_empty *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Whether the tabular cell is populated or not. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* value *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +Text value associated with this tabular cell. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + + + + + +### *class* LocalLogicalValue + +Represents a single logical value in a local logical tabular cell. + +### Notes + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`TabularRow.cells`](#ansys.grantami.core.mi_attribute_value_classes.TabularRow.cells) or [`TabularRow.cells_by_column`](#ansys.grantami.core.mi_attribute_value_classes.TabularRow.cells_by_column) to access an instance of this class. + + + +#### clear() + +Clear the `value` property. + + + +#### *property* is_empty *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Whether the tabular cell is populated or not. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* value *: [bool](https://docs.python.org/3/library/functions.html#bool) | [None](https://docs.python.org/3/library/constants.html#None)* + +Logical value associated with this tabular cell. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) or None + + + + + +### *class* LocalIntegerValue + +Represents a single integer value in a local integer tabular cell. + +### Notes + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`TabularRow.cells`](#ansys.grantami.core.mi_attribute_value_classes.TabularRow.cells) or [`TabularRow.cells_by_column`](#ansys.grantami.core.mi_attribute_value_classes.TabularRow.cells_by_column) to access an instance of this class. + + + +#### clear() + +Clear the `value` property. + + + +#### *property* is_empty *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Whether the tabular cell is populated or not. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* value *: [int](https://docs.python.org/3/library/functions.html#int) | [None](https://docs.python.org/3/library/constants.html#None)* + +Integer value associated with this cell. + +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) or None + + + + + +### *class* LocalDateValue + +Represents a single date value in a local date tabular cell. + +### Notes + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`TabularRow.cells`](#ansys.grantami.core.mi_attribute_value_classes.TabularRow.cells) or [`TabularRow.cells_by_column`](#ansys.grantami.core.mi_attribute_value_classes.TabularRow.cells_by_column) to access an instance of this class. + + + +#### clear() + +Clear the `value` property. + + + +#### *property* is_empty *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Whether the tabular cell is populated or not. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* value *: [date](https://docs.python.org/3/library/datetime.html#datetime.date) | [None](https://docs.python.org/3/library/constants.html#None)* + +Date value associated with this tabular cell. + +* **Return type:** + [`datetime.date`](https://docs.python.org/3/library/datetime.html#datetime.date) or None + + + + + +### *class* LocalPictureValue + +Represents a picture value in a local picture tabular cell. + +### Notes + +Tabular Picture Cells only support a single binary data value, together with an optional URL and MIME file type. + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`TabularRow.cells`](#ansys.grantami.core.mi_attribute_value_classes.TabularRow.cells) or [`TabularRow.cells_by_column`](#ansys.grantami.core.mi_attribute_value_classes.TabularRow.cells_by_column) to access an instance of this class. + + + +#### clear() + +Clear the `binary_data`, `url`, and `mime_file_type` properties. + + + +#### load(path) + +Load an image file into this PictureValue object. + +* **Parameters:** + **path** ([*pathlib.Path*](https://docs.python.org/3/library/pathlib.html#pathlib.Path) *or* [*str*](https://docs.python.org/3/library/stdtypes.html#str)) – Path to the image file to load. Relative paths are permitted. Takes the form + `C:\Users\username\Pictures\image.jpg` or `/home/username/Pictures/image.jpg`. +* **Raises:** + [**TypeError**](https://docs.python.org/3/library/exceptions.html#TypeError) – If path is not a pathlib.Path or string. + + + +#### save(path) + +Save binary data to disk. + +* **Parameters:** + **path** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *or* [*pathlib.Path*](https://docs.python.org/3/library/pathlib.html#pathlib.Path)) – File path where the binary data will be saved. +* **Raises:** + * [**TypeError**](https://docs.python.org/3/library/exceptions.html#TypeError) – If path is not a string or pathlib.Path. + * [**AssertionError**](https://docs.python.org/3/library/exceptions.html#AssertionError) – If the value is empty. + + + +#### *property* binary_data *: [bytes](https://docs.python.org/3/library/stdtypes.html#bytes) | [None](https://docs.python.org/3/library/constants.html#None)* + +Binary data associated with this tabular cell. + +* **Return type:** + [bytes](https://docs.python.org/3/library/stdtypes.html#bytes) or None +* **Raises:** + [**UnexportedBinaryDataError**](exceptions.md#ansys.grantami.core.mi_meta_classes.UnexportedBinaryDataError) – If binary data is available on the server but was not exported. + + + +#### *property* is_empty *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Whether the tabular cell is populated or not. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* mime_file_type *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +MIME (Multipurpose Internet Mail Extensions) file type. + +If this object is populated via export, the `mime_file_type` property returns the MIME file type stored in +Granta MI. + +If this object is populated via [`load()`](#ansys.grantami.core._mi_tabular_value_classes.LocalPictureValue.load), or setting [`binary_data`](#ansys.grantami.core._mi_tabular_value_classes.LocalPictureValue.binary_data) or [`value`](#ansys.grantami.core._mi_tabular_value_classes.LocalPictureValue.value), the +`mime_file_type` property is populated using the `filetype` library. If `filetype` cannot determine the +MIME file type, the `mime_file_type` property is set to [`None`](https://docs.python.org/3/library/constants.html#None) and Granta MI determines the MIME file +type during import. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + +### Notes + +The [filetype PyPI page](https://pypi.org/project/filetype) lists supported MIME types. + + + +#### *property* url *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +URL associated with this tabular cell. + +In a future version this property will raise an exception if the attribute is exported with +`include_binary_data = True`. See [Planned file and picture data changes](../release_notes/deprecations.md#planned-changes-file-picture) for more details. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + + + +#### *property* value *: [bytes](https://docs.python.org/3/library/stdtypes.html#bytes) | [None](https://docs.python.org/3/library/constants.html#None)* + +Binary data if present. + +In a future version this property will return the URL if the attribute is exported with +`include_binary_data = False`. See [Planned file and picture data changes](../release_notes/deprecations.md#planned-changes-file-picture) for more details. + +* **Return type:** + [bytes](https://docs.python.org/3/library/stdtypes.html#bytes) or None + + + + + +### *class* LocalFileValue + +Represents a file data value in a local tabular cell. + +### Notes + +Tabular File Cells support a single binary data value and a file name, together with an optional description, URL, +and MIME file type. + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`TabularRow.cells`](#ansys.grantami.core.mi_attribute_value_classes.TabularRow.cells) or [`TabularRow.cells_by_column`](#ansys.grantami.core.mi_attribute_value_classes.TabularRow.cells_by_column) to access an instance of this class. + + + +#### clear() + +Clear the `binary_data`, `url`, `mime_file_type`, `file_name`, and `description` properties. + + + +#### load(path) + +Load a file into this FileValue object. + +* **Parameters:** + **path** ([*pathlib.Path*](https://docs.python.org/3/library/pathlib.html#pathlib.Path) *or* [*str*](https://docs.python.org/3/library/stdtypes.html#str)) – Path to the file to load. Relative paths are permitted. Takes the form + `C:\Users\username\Documents\file.pdf` or `/home/username/Documents/file.pdf`. +* **Raises:** + [**TypeError**](https://docs.python.org/3/library/exceptions.html#TypeError) – If path is not a pathlib.Path or string. + + + +#### save(path) + +Save binary data to disk. + +* **Parameters:** + **path** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *or* [*pathlib.Path*](https://docs.python.org/3/library/pathlib.html#pathlib.Path)) – File path where the binary data will be saved. +* **Raises:** + * [**TypeError**](https://docs.python.org/3/library/exceptions.html#TypeError) – If path is not a string or pathlib.Path. + * [**AssertionError**](https://docs.python.org/3/library/exceptions.html#AssertionError) – If the value is empty. + + + +#### *property* binary_data *: [bytes](https://docs.python.org/3/library/stdtypes.html#bytes) | [None](https://docs.python.org/3/library/constants.html#None)* + +Binary data associated with this tabular cell. + +* **Return type:** + [bytes](https://docs.python.org/3/library/stdtypes.html#bytes) or None +* **Raises:** + [**UnexportedBinaryDataError**](exceptions.md#ansys.grantami.core.mi_meta_classes.UnexportedBinaryDataError) – If binary data is available on the server but was not exported. + + + +#### *property* description *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +Description of the file. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + + + +#### *property* file_name *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +Name of the file, including the file extension. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + + + +#### *property* is_empty *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Whether the tabular cell is populated or not. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* mime_file_type *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +MIME (Multipurpose Internet Mail Extensions) file type. + +If this object is populated via export, the `mime_file_type` property returns the MIME file type stored in +Granta MI. + +If this object is populated via [`load()`](#ansys.grantami.core._mi_tabular_value_classes.LocalFileValue.load), or setting [`binary_data`](#ansys.grantami.core._mi_tabular_value_classes.LocalFileValue.binary_data) or [`value`](#ansys.grantami.core._mi_tabular_value_classes.LocalFileValue.value), the +`mime_file_type` property is populated using the `filetype` library. If `filetype` cannot determine the +MIME file type, the `mime_file_type` property is set to [`None`](https://docs.python.org/3/library/constants.html#None) and Granta MI determines the MIME file +type during import. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + +### Notes + +The [filetype PyPI page](https://pypi.org/project/filetype) lists supported MIME types. + + + +#### *property* url *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +URL associated with this tabular cell. + +In a future version this property will raise an exception if the attribute is exported with +`include_binary_data = True`. See [Planned file and picture data changes](../release_notes/deprecations.md#planned-changes-file-picture) for more details. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + + + +#### *property* value *: [bytes](https://docs.python.org/3/library/stdtypes.html#bytes) | [None](https://docs.python.org/3/library/constants.html#None)* + +Binary data if present. + +In a future version this property will return the URL if the attribute is exported with +`include_binary_data = False`. See [Planned file and picture data changes](../release_notes/deprecations.md#planned-changes-file-picture) for more details. + +* **Return type:** + [bytes](https://docs.python.org/3/library/stdtypes.html#bytes) or None + + + + + +### *class* LocalPointValue + +Represents a single point value in a local point tabular cell. + +### Notes + +Tabular Point Cells only support a single value and an optional unit. This class also exposes the default unit based +on the column definition. + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`TabularRow.cells`](#ansys.grantami.core.mi_attribute_value_classes.TabularRow.cells) or [`TabularRow.cells_by_column`](#ansys.grantami.core.mi_attribute_value_classes.TabularRow.cells_by_column) to access an instance of this class. + + + +#### clear() + +Clear the `value` property. + +Revert the `unit` property its default value. + + + +#### *property* default_unit *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +Default unit symbol of the tabular cell. + +* **Returns:** + Default unit symbol as defined by the column, or [`None`](https://docs.python.org/3/library/constants.html#None) if the column is dimensionless. +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + + + +#### *property* is_empty *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Whether the tabular cell is populated or not. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* unit *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +Unit symbol of the tabular cell. + +* **Returns:** + Unit symbol, or [`None`](https://docs.python.org/3/library/constants.html#None) if the cell is dimensionless. +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + + + +#### *property* value *: [int](https://docs.python.org/3/library/functions.html#int) | [float](https://docs.python.org/3/library/functions.html#float) | [None](https://docs.python.org/3/library/constants.html#None)* + +Point value associated with this cell. + +* **Return type:** + [float](https://docs.python.org/3/library/functions.html#float) or None + + + + + +### *class* LocalRangeValue + +Represents a range value in a local range tabular cell. + +### Notes + +Tabular Range Cells support a low and high value, both of which can be inclusive or exclusive, together with an +optional unit. This class also exposes the default unit based on the column definition. + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`TabularRow.cells`](#ansys.grantami.core.mi_attribute_value_classes.TabularRow.cells) or [`TabularRow.cells_by_column`](#ansys.grantami.core.mi_attribute_value_classes.TabularRow.cells_by_column) to access an instance of this class. + + + +#### clear() + +Clear the `low` and `high` properties. + +Revert `low_value_is_inclusive`, `high_value_is_inclusive`, and `unit` properties to their default values. + + + +#### *property* default_unit *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +Default unit symbol of the tabular cell. + +* **Returns:** + Default unit symbol as defined on the column, or [`None`](https://docs.python.org/3/library/constants.html#None) if the column is dimensionless. +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + + + +#### *property* high *: [float](https://docs.python.org/3/library/functions.html#float) | [None](https://docs.python.org/3/library/constants.html#None)* + +High value of the range. + +* **Return type:** + [float](https://docs.python.org/3/library/functions.html#float) or None + + + +#### *property* high_value_is_inclusive *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Whether the high value is included in the range. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* is_empty *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Whether the tabular cell is populated or not. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* low *: [float](https://docs.python.org/3/library/functions.html#float) | [None](https://docs.python.org/3/library/constants.html#None)* + +Low value of the range. + +* **Return type:** + [float](https://docs.python.org/3/library/functions.html#float) or None + + + +#### *property* low_value_is_inclusive *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Whether the low value is included in the range. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* unit *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +Unit symbol of the tabular cell. + +* **Returns:** + Unit symbol, or [`None`](https://docs.python.org/3/library/constants.html#None) if the cell is dimensionless. +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + + + + + +### *class* LocalDiscreteValue + +Represents a single discrete value in a local discrete tabular cell. + +### Notes + +Tabular Discrete Cells only support a single value and an order, which is the index of the value in the list of +possible discrete values for the column. This does not imply that the associated discrete type is ordered. This +class also exposes the possible discrete values based on the column definition. + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`TabularRow.cells`](#ansys.grantami.core.mi_attribute_value_classes.TabularRow.cells) or [`TabularRow.cells_by_column`](#ansys.grantami.core.mi_attribute_value_classes.TabularRow.cells_by_column) to access an instance of this class. + + + +#### clear() + +Clear the `value` property. + + + +#### *property* is_empty *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Whether the tabular cell is populated or not. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* order *: [int](https://docs.python.org/3/library/functions.html#int) | [None](https://docs.python.org/3/library/constants.html#None)* + +Position of the current discrete value in the discrete type. + +* **Returns:** + Position (1-indexed) in the discrete type. Relevant for ordered discrete types only. +* **Return type:** + [int](https://docs.python.org/3/library/functions.html#int) or None + + + +#### *property* possible_discrete_values *: [FrozenSet](https://docs.python.org/3/library/typing.html#typing.FrozenSet)[[str](https://docs.python.org/3/library/stdtypes.html#str)]* + +Set of the tabular cell’s possible discrete data values. + +* **Return type:** + FrozenSet[[str](https://docs.python.org/3/library/stdtypes.html#str)] + + + +#### *property* value *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +Discrete value associated with this tabular cell. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + + + + + +### *class* LocalHyperlinkValue + +Represents a hyperlink value in a local hyperlink tabular cell. + +### Notes + +Tabular Hyperlink Cells support a value, a display text, and a description. + +Do not create instances of this class; it represents a pre-existing database structure. Use +[`TabularRow.cells`](#ansys.grantami.core.mi_attribute_value_classes.TabularRow.cells) or [`TabularRow.cells_by_column`](#ansys.grantami.core.mi_attribute_value_classes.TabularRow.cells_by_column) to access an instance of this class. + + + +#### clear() + +Clear the `value`, `hyperlink_display`, and `hyperlink_description` properties. + + + +#### *property* hyperlink_description *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +Text which displays instead of the URL in MI applications. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + + + +#### *property* hyperlink_display *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +How the hyperlink should be opened 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). + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + + + +#### *property* is_empty *: [bool](https://docs.python.org/3/library/functions.html#bool)* + +Whether the tabular cell is populated or not. + +* **Return type:** + [bool](https://docs.python.org/3/library/functions.html#bool) + + + +#### *property* value *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* + +URL of the hyperlink. + +* **Return type:** + [str](https://docs.python.org/3/library/stdtypes.html#str) or None + + + +## Miscellaneous tabular cells + + + +### *class* IgnoredLocalTabularCell + +Represents a tabular cell that has been marked as ignored. + +### Notes + +Do not create instances of this class; it represents a pre-existing database structure. Instances of this class +are returned by [`TabularRow.cells`](#ansys.grantami.core.mi_attribute_value_classes.TabularRow.cells) or [`TabularRow.cells_by_column`](#ansys.grantami.core.mi_attribute_value_classes.TabularRow.cells_by_column) for ignored local columns. + +#### SEE ALSO +[`AttributeDefinitionTabular.columns_to_process`](attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinitionTabular.columns_to_process) +: Specify ignored columns before data export. + + + +### *class* UnavailableTabularCell + +Represents a cell that was not available for export. + +### Notes + +This cell type is used when the presence of data could not be determined definitively, +for example due to a missing target database. + +Do not create instances of this class; it represents a pre-existing database structure. Instances of this class +are returned by [`TabularRow.cells`](#ansys.grantami.core.mi_attribute_value_classes.TabularRow.cells) or [`TabularRow.cells_by_column`](#ansys.grantami.core.mi_attribute_value_classes.TabularRow.cells_by_column) for unavailable columns. diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/toc.yml b/2026R1/scripting-toolkit-dev-portal-26-r1/toc.yml index 1b25fe7b9f..87a14a3af4 100644 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/toc.yml +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/toc.yml @@ -10,14 +10,20 @@ - name: User guide href: user_guide/index.md items: - - name: Streamlined API structure - href: user_guide/streamlined_api.md + - name: Package overview + href: user_guide/package_overview.md - name: Versioning href: user_guide/versioning.md - - name: Performance optimization - href: user_guide/performance_optimization.md + - name: Streamlined API structure + href: user_guide/streamlined_api_structure.md - name: Authentication href: user_guide/authentication.md + - name: Performance optimization + href: user_guide/performance_optimization.md + - name: Logging + href: user_guide/logging.md + - name: Exceptions + href: user_guide/exceptions.md - name: MI Scripting Toolkit and PyAnsys href: user_guide/pyansys.md - name: Example notebooks @@ -34,26 +40,26 @@ href: samples/streamlined/03_Search_MI.md - name: Fetch attribute data in bulk href: samples/streamlined/04_Fetch_Attribute_Data_in_Bulk.md - - name: Edit data - href: samples/streamlined/05_Edit_Data.md - name: Create and delete records in bulk - href: samples/streamlined/06_Create_Records.md - - name: Import functional data - href: samples/streamlined/07_Import_Functional_Data.md - - name: Create functional data - href: samples/streamlined/08_Create_Functional_Data.md - - name: Edit tabular data - href: samples/streamlined/09_Edit_Tabular_Data.md - - name: Edit pseudo-attributes - href: samples/streamlined/10_Edit_Pseudo-attributes.md - - name: Add files, pictures, and hyperlinks - href: samples/streamlined/11_Add_Files_Pictures_and_Hyperlinks.md - - name: Add point and range data - href: samples/streamlined/12_Add_Point_Range_Data.md - - name: Add date, integer and logical data - href: samples/streamlined/13_Add_Date_Integer_and_Logical_Data.md - - name: Create and edit tabular data - href: samples/streamlined/14_Create_and_Edit_Tabular_Data.md + href: samples/streamlined/05_Create_Records.md + - name: Text data + href: samples/streamlined/06_Edit_Text_Data.md + - name: Point and range data + href: samples/streamlined/07_Edit_Point_Range_Data.md + - name: Date, integer and logical data + href: samples/streamlined/08_Edit_Data_Integer_and_Logical_Data.md + - name: Files, pictures, and hyperlinks + href: samples/streamlined/09_Edit_Files_Pictures_and_Hyperlinks.md + - name: Float functional data + href: samples/streamlined/10_Edit_Float_Functional_Data.md + - name: Local tabular data + href: samples/streamlined/11_Edit_Local_Tabular_Data.md + - name: Linked tabular data + href: samples/streamlined/12_Edit_Linked_Tabular_Data.md + - name: Pseudo-attributes + href: samples/streamlined/13_Edit_Pseudo-attributes.md + - name: Data with precision + href: samples/streamlined/14_Data_with_Precision.md - name: Export data for FEA href: samples/streamlined/15_Use_Exporters_for_FEA_Export.md - name: Link records @@ -94,7 +100,31 @@ href: samples/data-analytics/12_Preparing_data_for_Power_BI.md - name: Data validation using Scripting Toolkit href: samples/data-analytics/13_Data_validation.md -- name: API reference + - name: Foundation API notebooks + items: + - name: Exporting data + href: samples/foundation/01_Exporting_data.md + - name: Exporting data using the Engineering Data Service + href: samples/foundation/02_Exporting_data_using_EngineeringDataService.md + - name: Text search + href: samples/foundation/03_Text_Search.md + - name: Deleting records + href: samples/foundation/04_Deleting_records.md + - name: Functional data and importing data + href: samples/foundation/05_Functional_data_and_importing_data.md + - name: Importing and exporting tabular data + href: samples/foundation/06_Importing_and_exporting_tabular_data.md + - name: Modified date + href: samples/foundation/07_Modified_date.md + - name: Inspecting record link groups + href: samples/foundation/08_Inspecting_Record_Link_Groups.md + - name: Modifying record link groups + href: samples/foundation/09_Modifying_Record_Link_Groups.md + - name: Resolve references + href: samples/foundation/10_Resolve_references.md + - name: Get unit conversions + href: samples/foundation/11_Get_unit_conversions.md +- name: Streamlined API reference href: api/index.md items: - name: Session @@ -111,44 +141,28 @@ href: api/attribute-values.md - name: Schema and supporting items href: api/supporting.md - - name: Bulk operators - href: api/bulk-operators.md - - name: Helpers + - name: Tabular attribute value items + href: api/tabular.md + - name: Helper functions href: api/helpers.md - name: Constants href: api/constants.md - name: Exceptions href: api/exceptions.md -- name: Changelog - href: changelog.md -- name: Foundation API - href: foundation/index.md +- name: Release notes + href: index.md items: - - name: Example notebooks - items: - - name: Exporting data - href: samples/foundation/01_Exporting_data.md - - name: Exporting data using the Engineering Data Service - href: samples/foundation/02_Exporting_data_using_EngineeringDataService.md - - name: Text search - href: samples/foundation/03_Text_Search.md - - name: Deleting records - href: samples/foundation/04_Deleting_records.md - - name: Functional data and importing data - href: samples/foundation/05_Functional_data_and_importing_data.md - - name: Importing and exporting tabular data - href: samples/foundation/06_Importing_and_exporting_tabular_data.md - - name: Modified date - href: samples/foundation/07_Modified_date.md - - name: Inspecting record link groups - href: samples/foundation/08_Inspecting_Record_Link_Groups.md - - name: Modifying record link groups - href: samples/foundation/09_Modifying_Record_Link_Groups.md - - name: Resolve references - href: samples/foundation/10_Resolve_references.md - - name: Get unit conversions - href: samples/foundation/11_Get_unit_conversions.md - - name: API reference - href: foundation/api.md + - name: What's new in 5.0 + href: whats_new.md + - name: Enhancements and bug fixes + href: bug_fixes_and_enhancements.md + - name: Upgrading from earlier versions + href: breaking_changes.md + - name: Planned changes and deprecations + href: deprecations.md + - name: Known issues + href: known_issues.md +- name: Foundation API reference + href: foundation_api.md - name: Copyright and Trademark Information href: copyright.md diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/user_guide/authentication.md b/2026R1/scripting-toolkit-dev-portal-26-r1/user_guide/authentication.md index 5dbf460902..bc2da4f181 100644 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/user_guide/authentication.md +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/user_guide/authentication.md @@ -24,11 +24,10 @@ and in batch mode. ## Autologon -To use autologon (also known as Integrated Windows Authentication), specify `autologon=True` in the [`Session`](./../api/session.md#GRANTA_MIScriptingToolkit.granta.mi.Session) -constructor: +To use autologon (also known as Integrated Windows Authentication), use [`SessionBuilder.with_autologon()`](../streamlined_api/session.md#ansys.grantami.core.mi.SessionBuilder.with_autologon): ```pycon ->>> mi = mpy.Session("https://my.server.name/mi_servicelayer", autologon=True) +>>> mi = mpy.SessionBuilder("https://my.server.name/mi_servicelayer").with_autologon() ``` Autologon uses the user’s current login session to authenticate with Granta MI, and so the user’s credentials are not @@ -73,15 +72,16 @@ script, which in turn executes the Python script. ## Basic authentication -To connect with basic authentication, specify the username, password, and optional domain in the [`Session`](./../api/session.md#GRANTA_MIScriptingToolkit.granta.mi.Session) -constructor: +To connect with basic authentication, use [`SessionBuilder.with_credentials()`](../streamlined_api/session.md#ansys.grantami.core.mi.SessionBuilder.with_credentials) to specify the username, password, +and optional domain: ```pycon ->>> mi = mpy.Session( -... "https://my.server.name/mi_servicelayer", -... user_name="user", -... password="password", -... domain="domain", +>>> mi = mpy.SessionBuilder( +... service_layer_url="https://my.server.name/mi_servicelayer", +... ).with_credentials( +... username="user", +... password="password", +... domain="domain", ... ) ``` @@ -109,11 +109,12 @@ below: >>> password = getpass.getpass() ->>> mi = mpy.Session( -... "https://my.server.name/mi_servicelayer", -... user_name="user", -... password=password, -... domain="domain", +>>> mi = mpy.SessionBuilder( +... service_layer_url="https://my.server.name/mi_servicelayer", +... ).with_credentials( +... username="user", +... password=password, +... domain="domain", ... ) ``` @@ -126,7 +127,7 @@ other options in this section should be used instead. ### Environment variables Credentials can be injected into the script using environment variables. The [`os`](https://docs.python.org/3/library/os.html#module-os) standard library module provides -access to environment variables, and can be used with the [`Session`](./../api/session.md#GRANTA_MIScriptingToolkit.granta.mi.Session) constructor as follows: +access to environment variables, and can be used with [`SessionBuilder.with_credentials()`](../streamlined_api/session.md#ansys.grantami.core.mi.SessionBuilder.with_credentials) as follows: ```pycon >>> import os @@ -135,11 +136,12 @@ access to environment variables, and can be used with the [`Session`](./../api/s >>> password = os.getenv("MI_PASSWORD") >>> domain = os.getenv("MI_DOMAIN") ->>> mi = mpy.Session( -... "https://my.server.name/mi_servicelayer", -... user_name=user_name, -... password=password, -... domain=domain, +>>> mi = mpy.SessionBuilder( +... service_layer_url="https://my.server.name/mi_servicelayer", +... ).with_credentials( +... username=user_name, +... password=password, +... domain=domain, ... ) ``` @@ -253,8 +255,9 @@ Python: >>> keyring.set_password("my-python-script", "granta-admin-user", "my_secret_password") ``` -In general, credentials should always retrieved programmatically and provided directly to the [`Session`](./../api/session.md#GRANTA_MIScriptingToolkit.granta.mi.Session) -constructor without them ever being visible on screen. To access a credential programmatically, use the following: +In general, credentials should always be retrieved programmatically and provided directly to +[`SessionBuilder.with_credentials()`](../streamlined_api/session.md#ansys.grantami.core.mi.SessionBuilder.with_credentials) without being visible on screen. To access a credential programmatically, use +the following: ```pycon >>> my_password = keyring.get_password("my-python-script", "granta-admin-user") @@ -300,17 +303,27 @@ supported OIDC IdPs and for configuration and setup documentation, refer to Gran Configuration on [Ansys help](https://ansyshelp.ansys.com/). #### NOTE -To use OIDC with MI Scripting Toolkit you must install the `[oidc]` extra. See [Getting started](./../getting_started/index.md) for more details. +To use OIDC with MI Scripting Toolkit you must install the `[oidc]` extra. See [Getting started](../getting_started/index.md) for more details. ### Interactive mode -To use OIDC authentication interactively, specify `oidc=True` in the [`Session`](./../api/session.md#GRANTA_MIScriptingToolkit.granta.mi.Session) constructor. The following -example loads the default web browser and redirects the user to their OIDC Identity Provider (IdP) login screen: +To use OIDC authentication interactively, use [`SessionBuilder.with_oidc()`](../streamlined_api/session.md#ansys.grantami.core.mi.SessionBuilder.with_oidc) to obtain a [`OIDCSessionBuilder`](../streamlined_api/session.md#ansys.grantami.core.mi.OIDCSessionBuilder) +object, and then use [`OIDCSessionBuilder.with_authorization_code_flow()`](../streamlined_api/session.md#ansys.grantami.core.mi.OIDCSessionBuilder.with_authorization_code_flow). + +The following example loads the default web browser and redirects the user to their OIDC Identity Provider (IdP) login +screen: + +```pycon +>>> mi = mpy.SessionBuilder('https://my.server.name/mi_servicelayer').with_oidc().with_authorization_code_flow() +``` + +If a browser is not available, use [`OIDCSessionBuilder.with_device_code_flow()`](../streamlined_api/session.md#ansys.grantami.core.mi.OIDCSessionBuilder.with_device_code_flow) instead. The following example +displays a URL and code which are used to authenticate instead: ```pycon ->>> mi = mpy.Session('https://my.server.name/mi_servicelayer', oidc=True) +>>> mi = mpy.SessionBuilder('https://my.server.name/mi_servicelayer').with_oidc().with_device_code_flow() ``` @@ -320,8 +333,8 @@ example loads the default web browser and redirects the user to their OIDC Ident In most cases, following a successful interactive authentication, the IdP returns both an access token and a refresh token: -* Access token: Short lifetime, not transferable, not accessible on the [`Session`](./../api/session.md#GRANTA_MIScriptingToolkit.granta.mi.Session) object. -* Refresh token: Long lifetime, transferable between scripts, accessible via the [`Session.refresh_token`](./../api/session.md#GRANTA_MIScriptingToolkit.granta.mi.Session.refresh_token) +* Access token: Short lifetime, not transferable, not accessible on the [`Session`](../streamlined_api/session.md#ansys.grantami.core.mi.Session) object. +* Refresh token: Long lifetime, transferable between scripts, accessible via the [`Session.refresh_token`](../streamlined_api/session.md#ansys.grantami.core.mi.Session.refresh_token) property. #### WARNING @@ -330,11 +343,11 @@ Refresh tokens are bearer tokens that grant access to the Granta MI server, and For unattended use, the refresh token can be stored securely in the OS credential manager and used to login automatically. This approach uses the `keyring` library, see the [Keyring](https://pypi.org/project/keyring/) section above for more details. -Tokens can be securely persisted with the [`Session.persist_oidc_token()`](./../api/session.md#GRANTA_MIScriptingToolkit.granta.mi.Session.persist_oidc_token) method: +Tokens can be securely persisted with the [`Session.persist_oidc_token()`](../streamlined_api/session.md#ansys.grantami.core.mi.Session.persist_oidc_token) method: ```pycon # Connect to Granta MI interactively ->>> mi = mpy.Session('https://my.server.name/mi_servicelayer', oidc=True) +>>> mi = mpy.SessionBuilder('https://my.server.name/mi_servicelayer').with_oidc().with_authorization_code_flow() # Store the refresh token in the credential store using keyring >>> mi.persist_oidc_token() @@ -343,5 +356,5 @@ Tokens can be securely persisted with the [`Session.persist_oidc_token()`](./../ Tokens can then be retrieved from the store and used to create a new Session object with no user interaction: ```pycon ->>> mi = mpy.Session("https://my.server.name/mi_servicelayer", oidc=True, use_stored_token=True) +>>> mi = mpy.SessionBuilder("https://my.server.name/mi_servicelayer").with_oidc().with_stored_token() ``` diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/user_guide/exceptions.md b/2026R1/scripting-toolkit-dev-portal-26-r1/user_guide/exceptions.md new file mode 100644 index 0000000000..a463643ea3 --- /dev/null +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/user_guide/exceptions.md @@ -0,0 +1,190 @@ +# Exceptions + + + + + +## Introduction + +This page describes the different types of exceptions which may be encountered when working with MI Scripting Toolkit. The sources +of exceptions can be grouped into four categories: + +* Client errors: Exceptions raised as a result of an unexpected state in the script execution. These may be raised by + Python itself, or by the Streamlined or Foundation layers to indicate incorrect use of the library. +* Server response errors: Exceptions raised as a result of a fault response returned by the Granta MI application + server. +* Server connection errors. +* Timeout errors. + +These four different sources of exceptions are described separately in this page. + + + +## Client errors + +Python client exceptions are generally not caused by the Granta MI application server, but instead by the inability of +the client to correctly handle an encountered state. + +Client exceptions fall into the following groups: + +* Built-in Python exceptions: Python has a number of built-in exceptions documented + [here](https://docs.python.org/3/library/exceptions.html). +* Streamlined layer exceptions: Custom exceptions related to Granta MI-specific errors, for example + [`UnsupportedLinkGroupError`](../streamlined_api/exceptions.md#ansys.grantami.core.mi_meta_classes.UnsupportedLinkGroupError). These are documented in the [Exceptions](../streamlined_api/exceptions.md) section of the + Streamlined API reference. +* [`GRANTA_Exception`](../foundation_api.md#ansys.grantami.backend.soap.GRANTA_Exceptions.GRANTA_Exception): Raised when failing to instantiate or modify a foundation layer object. The message + includes details of the name and expected type of the attribute or property which caused the failure. + +Whenever a client error is encountered, first determine where the exception originated. To help with this, Python +displays a traceback which shows the source of the error and the state of the stack when the error occurred. + +* If the exception was raised by your code, the error is likely the result of a programming error. +* If the exception was raised by an MI Scripting Toolkit module, first check that any inputs provided to methods and functions are + valid according to the [Streamlined API reference](../streamlined_api/index.md). If you are unable to determine the cause of the issue, check + the [Ansys developer forum](https://discuss.ansys.com/categories/materials) or contact your ACE representative. + +#### NOTE +Client errors may still be dependent on a certain Granta MI server state. For example, a script that divides Young’s +modulus by density will raise a [`ZeroDivisionError`](https://docs.python.org/3/library/exceptions.html#ZeroDivisionError) if the density is 0. Whilst the Granta MI server must be +in a specific state to cause this failure, the problem still lies with the client. + + + +## Server response errors + +Exceptions which originate on the Granta MI server are always raised as [`GRANTA_ServiceLayerError`](../foundation_api.md#ansys.grantami.backend.soap.GRANTA_Exceptions.GRANTA_ServiceLayerError). This +exception class includes a message of the form: + +```text + failed with code and message: +``` + +* ``: The SOAP operation during which the exception occurred, for example DataImport_SetRecordAttributes +* ``: The numeric HTTP status code returned by the Granta MI server. +* ``: If available, a message from the server describing the fault. If not provided, then the name of the + numeric status code is provided instead. + +[`GRANTA_ServiceLayerError`](../foundation_api.md#ansys.grantami.backend.soap.GRANTA_Exceptions.GRANTA_ServiceLayerError) exceptions are raised when any Granta MI response is processed with a non-2xx status +code. + + + +### 500 Internal Server Error + +Most [`GRANTA_ServiceLayerError`](../foundation_api.md#ansys.grantami.backend.soap.GRANTA_Exceptions.GRANTA_ServiceLayerError) exceptions are raised as a result of a 500 response from the Granta MI +application server. For example, if a script attempts to create a record in a location which already contains a record +with the same name, the following exception is raised by MI Scripting Toolkit: + +```text +DataImport_SetRecordAttributes failed with code 500 and message: Commit failed: A record with this name cannot be +added here. +``` + +The message and the traceback should provide enough information to determine the cause of the error, but it is the +responsibility of the developer to define the appropriate solution. For example, in this case the developer should +decide if: + +* The error results in an unhandled condition, and should either be left to halt the execution of the script or should + be caught in a try/except block and reporting the error via some other means. +* The script can continue, for example by catching the exception in a try/except block and deleting the existing record. +* The script should be extended to first check for the existence of a conflicting record before attempting the import. + +If an unexpected error occurs on the server, the exception is instead raised with the message: + +```text + failed with code 500 and message: Internal Server Error. +``` + +In this case, an unexpected condition was encountered on the server for which a more specific error message does not +exist. Some possible steps to determine the cause of the failure are as follows: + +* Check the logs on the application server around the time of the failure. It may be required to temporarily set the log + level to DEBUG if there are no relevant entries at INFO level. +* Check the raw request and response SOAP messages, available in the [`GRANTA_ServiceLayerError.request_xml`](../foundation_api.md#ansys.grantami.backend.soap.GRANTA_Exceptions.GRANTA_ServiceLayerError.request_xml) and + [`GRANTA_ServiceLayerError.response_xml`](../foundation_api.md#ansys.grantami.backend.soap.GRANTA_Exceptions.GRANTA_ServiceLayerError.response_xml) properties on the exception object. + +It may be necessary to contact your ACE representative for assistance in diagnosing the fault. + + + +### Other status codes + +3xx response codes indicate a redirection of the request. In the case of MI Scripting Toolkit, this typically results from an +unsupported proxy configuration. + +4xx response codes indicate a client error. Since the foundation layer imposes very strict rules on messages that can be +sent to the server, a [`GRANTA_Exception`](../foundation_api.md#ansys.grantami.backend.soap.GRANTA_Exceptions.GRANTA_Exception) will often be raised before an invalid request is sent to the server. +If a [`GRANTA_ServiceLayerError`](../foundation_api.md#ansys.grantami.backend.soap.GRANTA_Exceptions.GRANTA_ServiceLayerError) is raised with a 4xx status code, check all inputs to the streamlined or +foundation API are valid, and check that they have been translated correctly into the +[`GRANTA_ServiceLayerError.request_xml`](../foundation_api.md#ansys.grantami.backend.soap.GRANTA_Exceptions.GRANTA_ServiceLayerError.request_xml). + +5xx response codes indicate a failure somewhere on one of the servers responsible for handling the request. In the use +of MI Scripting Toolkit, a 5xx response code other than 500 generally indicates a failure with server infrastructure other than the +Granta MI application itself. + + + +## Server connection errors + +If the client is unable to communicate with the Granta MI server, a [`GRANTA_Exception`](../foundation_api.md#ansys.grantami.backend.soap.GRANTA_Exceptions.GRANTA_Exception) is raised with the +message of the form: + +```text +Connection test failed: +``` + +The status message is either the text form of an HTTP status code, or a statement that a response was not received: + +* Connection test failed: Unauthorized: The server did not accept the provided authentication information. Check + that the credentials provided to [`SessionBuilder.with_credentials()`](../streamlined_api/session.md#ansys.grantami.core.mi.SessionBuilder.with_credentials) are valid and consistent with the Granta MI + server configuration. +* Connection test failed: Unknown error (eg, no response from GRANTA MI Service Layer at all): The server did not + respond to the connection request. Check that the URL is correct, and that the host machine can contact the server + via an alternative method, for example via a web browser or `curl`. + + + + + +## Timeout errors + +If the client does not receive a response from a request within the defined receive timeout, a +[`GRANTA_Exception`](../foundation_api.md#ansys.grantami.backend.soap.GRANTA_Exceptions.GRANTA_Exception) is raised with the message: + +```text +No response from server after 1 attempt. +``` + +Or if [`SessionConfiguration`](../streamlined_api/session.md#ansys.grantami.core.mi.SessionConfiguration) was used to specify `max_retries` greater than 0: + +```text +No response from server after attempts. +``` + +Where `` is the total number of failed attempts. Since no response was received within the time allowed, there is +no response code or message. + +Timeout errors are often encountered when using bulk operations, because the time taken for a bulk operation to complete +can be difficult to predict. In general, the time taken is dependent on: + +* The complexity of an individual element of the batch +* The number of operations included within the batch +* The number of parallel requests submitted to the server +* The performance of the server + +The default batch size and parallelization is chosen to attempt to ensure that all bulk operations will complete within +the default timeout, but due to the reasons described above, this cannot be guaranteed. For example, the +[`Session.bulk_delete_or_withdraw_records()`](../streamlined_api/session.md#ansys.grantami.core.mi.Session.bulk_delete_or_withdraw_records) method is used to delete all provided records and all the data +contained with them. If the records contain a large amount of complex data, the overall operation may take longer than +allowed by the default timeout. + +To resolve a timeout failure, either reduce the complexity of the request (for example by reducing the batch size), or +extend the timeout specified when creating the session. + +#### WARNING +Even though a [`GRANTA_Exception`](../foundation_api.md#ansys.grantami.backend.soap.GRANTA_Exceptions.GRANTA_Exception) is raised, the request may still be running on the server. In general, the +operation will continue until it has finished. + +Before resubmitting a request which has previously timed out, you should check that the operation has completed +before retrying, either by checking the state of the database in a web browser, via MI Scripting Toolkit, or by consulting the +application logs. diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/user_guide/index.md b/2026R1/scripting-toolkit-dev-portal-26-r1/user_guide/index.md index d994f8b2a4..3f453a2f34 100644 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/user_guide/index.md +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/user_guide/index.md @@ -2,55 +2,11 @@ - - -## Introduction - -MI Scripting Toolkit is a Python package that connects to your Granta MI application server (MI Server) via the Service Layer using -the SOAP API. The package consists of the Streamlined API, the Foundation API, and C++ libraries. - -This user guide focuses on the Streamlined API. It provides guidance and best practice on how to develop scripts and -applications that interact with Granta MI during their operation. - - - -### Streamlined API - -The Streamlined API is provided by the `granta` submodule and can be accessed as follows: - -```python -from GRANTA_MIScriptingToolkit import granta as mpy -mpy # Contains the Streamlined API -``` - -See the links below for more information about specific aspects of the Streamlined API. - -* [Streamlined API structure](streamlined_api.md): Learn more about how the Streamlined API is structured. -* [Versioning](versioning.md): Understand the Streamlined API versioning strategy. +* [Package overview](package_overview.md): A high-level overview of the MI Scripting Toolkit package structure. +* [Versioning](versioning.md): Understand the MI Scripting Toolkit versioning strategy. +* [Streamlined API structure](streamlined_api_structure.md): Learn more about the Streamlined API structure. * [Authentication](authentication.md): Learn more about the available authentication schemes and how to connect securely in interactive and batch operation. * [Performance optimization](performance_optimization.md): Understand how to use bulk operations to optimize script performance. * [Logging](logging.md): Use the Python logging library with Scripting Toolkit. * [MI Scripting Toolkit and PyAnsys](pyansys.md): How MI Scripting Toolkit and PyAnsys can be used together. - - - -### Foundation API - - - -The Foundation API provides a low-level wrapper around the base functionality provided by the Server Layer SOAP API. As -a result, a detailed knowledge of the Service Layer SOAP API is required, and care is needed around managing request -size to achieve satisfactory performance and stability. - -#### WARNING -The Foundation API is included for compatibility purposes only. The Streamlined API should be used for all new -solutions. - -#### WARNING -The Foundation API does not follow Semantic Versioning. Breaking changes may be introduced with any release and will -in general not be documented. - - - -Examples and API documentation for the Foundation API are provided [here](./../foundation/index.md). diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/user_guide/logging.md b/2026R1/scripting-toolkit-dev-portal-26-r1/user_guide/logging.md index 93a5cefb02..921d60a32a 100644 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/user_guide/logging.md +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/user_guide/logging.md @@ -30,7 +30,7 @@ logging in general, see the Python documentation: ## Creating a logger The `GDL` logger can be accessed in two ways. The first is via the -[`get_foundation_logger()`](./../api/helpers.md#GRANTA_MIScriptingToolkit.granta.mi_functions.get_foundation_logger) function: +[`get_foundation_logger()`](../streamlined_api/helpers.md#ansys.grantami.core.mi_functions.get_foundation_logger) function: ```default logger = mpy.get_foundation_logger() @@ -118,5 +118,8 @@ used to capture information from all Scripting Toolkit loggers and loggers creat The MI Scripting Toolkit underlying C libraries also perform their own additional logging separate to the Python logging. These logs can be found in the following locations: -* Windows: `%LOCALAPPDATA%\Granta Design\MIScriptingToolkit` -* Linux: `~/.appdata/Granta Design/MIScriptingToolkit` +* Windows: `%LOCALAPPDATA%\Granta\Granta MI\ScriptingToolkit` +* Linux: `~/.appdata/Granta/Granta MI/ScriptingToolkit` + +#### Versionchanged +Changed in version 4.2: Log location changed diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/user_guide/package_overview.md b/2026R1/scripting-toolkit-dev-portal-26-r1/user_guide/package_overview.md new file mode 100644 index 0000000000..7b9c234cdf --- /dev/null +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/user_guide/package_overview.md @@ -0,0 +1,84 @@ +# Package overview + + + +MI Scripting Toolkit is a Granta MI component that facilitates Python-based automation and integration with Granta MI servers. It +allows access to common Granta MI functions such as searching for records, reading and writing data, and managing links +between records. + +MI Scripting Toolkit provides two separate Python interfaces. + +* The Foundation API provides a low-level wrapper around the base functionality provided by the Service Layer SOAP API, + and is provided by the `ansys.grantami.backend.soap` package as a collection of Python and binary files. +* The Streamlined API is an abstraction on top of the Foundation API, and is provided by the `ansys.grantami.core` + package as a set of Python modules. + +Both packages are required to use MI Scripting Toolkit, and both are installed automatically when following the +[Getting started](../getting_started/index.md) guide. However, the Streamlined API should be used exclusively unless there is a +specific need to use the Foundation API directly. This document provides an overview of both APIs, and guidance on +when to use each. + + + +## Streamlined API + +The Streamlined API is provided by the `ansys.grantami.core` package, and is accessed as follows: + +```python +>>> import ansys.grantami.core as mpy +mpy # Contains the Streamlined API +``` + +#### Versionchanged +Changed in version 5.0: The Streamlined API is now provided as a package called `ansys.grantami.core`. + +The Streamlined API provides a high-level interface to Granta MI, designed to be easy to use and to provide good +performance out of the box. It abstracts away many of the complexities of the underlying Service Layer SOAP API by +pre-emptively fetching information from the server and performing client-side validation to accelerate development. +It aims to enable development to all Python users, even those without detailed experience of working with web APIs. + +Additional Streamlined API information: + +* [Streamlined API structure](streamlined_api_structure.md): Overview of the API structure. +* [Streamlined API reference](../streamlined_api/index.md): All the classes and functions that make up the interface. +* [Example notebooks](../examples/index.md): Examples for the Streamlined API, including both API-specific usage and examples of typical + use-case. + + + + + +## Foundation API + +The Foundation API is provided by the `ansys.grantami.backend.soap` package, and is accessed as follows: + +```python +>>> import ansys.grantami.backend.soap as gdl +gdl # Contains the Foundation API +``` + +#### Versionchanged +Changed in version 5.0: The Foundation API is provided as a separate package called `ansys.grantami.backend.soap`. It is a dependency of +`ansys.grantami.core` and is installed automatically during MI Scripting Toolkit installation. It may be installed separately +if required. + +The Foundation API provides a low-level wrapper around the base functionality provided by the Server Layer SOAP API. As +a result, a detailed knowledge of both the Service Layer SOAP API and working with web APIs in general is required. Care +is needed around managing request size and sequencing to achieve satisfactory performance and stability. + +However, this granularity can be a benefit if it is used correctly. For example, the Foundation API may be appropriate +in the following situations: + +* Making changes in bulk without consideration to the current state of the data. For example, deleting all data in a + certain attribute regardless if it is populated or not. +* When full control is needed over the requests made to the server to optimize performance for a specific use case. +* When needing to access functionality that is not yet exposed in the Streamlined API. + +#### WARNING +Only use the Foundation API after consultation with your ACE representative to confirm that it is necessary for your +use case. + +Additional Foundation API information: + +* [Foundation API reference](../foundation_api.md): All the classes and functions that make up the interface. +* [Foundation API example notebooks](../examples/foundation_examples.md): Examples for the Foundation API. diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/user_guide/performance_optimization.md b/2026R1/scripting-toolkit-dev-portal-26-r1/user_guide/performance_optimization.md index a4fdc6f065..25a1b0fe21 100644 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/user_guide/performance_optimization.md +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/user_guide/performance_optimization.md @@ -33,11 +33,11 @@ becomes significant. The first steps in any MI Scripting Toolkit script are to connect to Granta MI and fetch a database and table. The three objects, and the fastest ways of acquiring them, are as follows: -1. [`Session`](./../api/session.md#GRANTA_MIScriptingToolkit.granta.mi.Session): [`Session`](./../api/session.md#GRANTA_MIScriptingToolkit.granta.mi.Session) is the fastest way to create a session. -2. [`Database`](./../api/database.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Database): [`Session.get_db()`](./../api/session.md#GRANTA_MIScriptingToolkit.granta.mi.Session.get_db) is the fastest way to fetch a database. -3. [`Table`](./../api/table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table): [`Database.get_table()`](./../api/database.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Database.get_table) is the fastest way to fetch a table. +1. [`Session`](../streamlined_api/session.md#ansys.grantami.core.mi.Session): [`SessionBuilder`](../streamlined_api/session.md#ansys.grantami.core.mi.SessionBuilder) is the fastest way to create a session. +2. [`Database`](../streamlined_api/database.md#ansys.grantami.core.mi_tree_classes.Database): [`Session.get_db()`](../streamlined_api/session.md#ansys.grantami.core.mi.Session.get_db) is the fastest way to fetch a database. +3. [`Table`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table): [`Database.get_table()`](../streamlined_api/database.md#ansys.grantami.core.mi_tree_classes.Database.get_table) is the fastest way to fetch a table. -However, [`Session.get_db()`](./../api/session.md#GRANTA_MIScriptingToolkit.granta.mi.Session.get_db) and [`Database.get_table()`](./../api/database.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Database.get_table) fetch *all* databases and *all* tables (for the +However, [`Session.get_db()`](../streamlined_api/session.md#ansys.grantami.core.mi.Session.get_db) and [`Database.get_table()`](../streamlined_api/database.md#ansys.grantami.core.mi_tree_classes.Database.get_table) fetch *all* databases and *all* tables (for the selected database) loaded on the server, cache the results, and then return the requested database or table. Because the results are cached, those calls to Granta MI are not repeated when the objects are accessed again. As a result, it is not necessary to pass references to database and tables between functions, as long as the session itself is shared. @@ -61,7 +61,7 @@ table = db.get_table("Design Data") There are many search methods in the Streamlined API that return records that match a user-defined attribute-based criterion or text-based criterion. However, there are some record properties that are not searchable, for example -queries based on details of the tree structure of a table. In this case, use [`Table.all_records()`](./../api/table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.all_records) to fetch all +queries based on details of the tree structure of a table. In this case, use [`Table.all_records()`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.all_records) to fetch all records in the table with the children of each record pre-cached. Then apply your own search filters to the record list using standard Python operations: @@ -73,18 +73,18 @@ recs = table.all_records(include_folders=True, include_generics=True) filtered_recs = [r for r in recs if len(r.children) > 3] ``` -This approach can be used to filter on the following [`Record`](./../api/record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) properties: +This approach can be used to filter on the following [`Record`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record) properties: -* [`name`](./../api/record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.name) -* [`short_name`](./../api/record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.short_name) -* [`color`](./../api/record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.color) -* [`type`](./../api/record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.type) -* [`history_guid`](./../api/record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.history_guid) -* [`record_guid`](./../api/record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.record_guid) -* [`parent`](./../api/record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.parent) -* [`children`](./../api/record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.children) +* [`name`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record.name) +* [`short_name`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record.short_name) +* [`color`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record.color) +* [`type`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record.type) +* [`history_guid`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record.history_guid) +* [`record_guid`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record.record_guid) +* [`parent`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record.parent) +* [`children`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record.children) -These properties are pre-populated on all [`Record`](./../api/record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) objects returned by the [`Table.all_records()`](./../api/table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.all_records) method. +These properties are pre-populated on all [`Record`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record) objects returned by the [`Table.all_records()`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.all_records) method. Other properties will require additional calls to Granta MI unless the appropriate ‘bulk fetch’ methods are used before the properties are accessed. See [Table bulk operations]() and [Session bulk operations]() for more information about these methods. @@ -95,9 +95,9 @@ these methods. To create records: -1. Use [`Table.path_from()`](./../api/table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.path_from) or [`Table.paths_from()`](./../api/table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.paths_from) to create the required tree structure if required. -2. Use [`Table.create_record()`](./../api/table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.create_record) to create record objects, and optionally add attribute values and links. -3. Import the records using [`Session.update()`](./../api/session.md#GRANTA_MIScriptingToolkit.granta.mi.Session.update). +1. Use [`Table.path_from()`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.path_from) or [`Table.paths_from()`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.paths_from) to create the required tree structure if required. +2. Use [`Table.create_record()`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.create_record) to create record objects, and optionally add attribute values and links. +3. Import the records using [`Session.update()`](../streamlined_api/session.md#ansys.grantami.core.mi.Session.update). @@ -110,11 +110,11 @@ ensure: separate requests. * that folder names are unique before creation or the operation will fail. -Using the dedicated method for creating a tree structure, [`Table.path_from()`](./../api/table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.path_from), overcomes these issues. All levels +Using the dedicated method for creating a tree structure, [`Table.path_from()`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.path_from), overcomes these issues. All levels of a hierarchy can be created in a single operation, and no exceptions or warnings are generated if a folder already exists with the same name. The record color can also be specified, which is applied to all records or folders created by the method. The method returns the last node specified in the path, allowing it to be provided as the `parent` -argument to the [`Table.create_record()`](./../api/table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.create_record) method. +argument to the [`Table.create_record()`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.create_record) method. Firstly, an example of creating a new folder structure. Create three new folders with the names “our”, “new”, and “path”: @@ -167,7 +167,7 @@ Fuchsia ### Step 2: Creating and populating records -The [`Table.create_record()`](./../api/table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.create_record) method creates a new record object in Python only, and does not push that record to the +The [`Table.create_record()`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.create_record) method creates a new record object in Python only, and does not push that record to the server. These records can therefore be modified, for example by adding attribute values: ```python @@ -188,7 +188,7 @@ for material_name in material_names: ### Step 3: Importing records and data -The [`Session.update()`](./../api/session.md#GRANTA_MIScriptingToolkit.granta.mi.Session.update) method is used to import changes to attribute values, and by default accepts multiple +The [`Session.update()`](../streamlined_api/session.md#ansys.grantami.core.mi.Session.update) method is used to import changes to attribute values, and by default accepts multiple records to update which are passed to Granta MI in an appropriately batched request: ```python @@ -196,10 +196,10 @@ records = mi.update(records) ``` However, after importing records, the default behavior also re-exports the updated records to ensure the -[`Record`](./../api/record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) objects reflect the latest state of the Granta MI server. +[`Record`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record) objects reflect the latest state of the Granta MI server. -This behavior can be suppressed by calling [`Session.update()`](./../api/session.md#GRANTA_MIScriptingToolkit.granta.mi.Session.update) with `refresh_attributes=False`. Then either export -only the required attributes with [`Table.bulk_fetch()`](./../api/table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.bulk_fetch) (see [Bulk fetching attributes]() section for more +This behavior can be suppressed by calling [`Session.update()`](../streamlined_api/session.md#ansys.grantami.core.mi.Session.update) with `refresh_attributes=False`. Then either export +only the required attributes with [`Table.bulk_fetch()`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.bulk_fetch) (see [Bulk fetching attributes]() section for more information): ```python @@ -207,7 +207,7 @@ records = mi.update(records, refresh_attributes=False) table.bulk_fetch(records, attributes=["Material name"]) ``` -Alternatively, omit the [`Table.bulk_fetch()`](./../api/table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.bulk_fetch) step entirely if the [`Record`](./../api/record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) objects are no longer required: +Alternatively, omit the [`Table.bulk_fetch()`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.bulk_fetch) step entirely if the [`Record`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record) objects are no longer required: ```python mi.update(records, refresh_attributes=False) @@ -217,13 +217,14 @@ mi.update(records, refresh_attributes=False) ## Table bulk operations -The following bulk operations are implemented on the [`Table`](./../api/table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table) object and are used to group requests to to improve +The following bulk operations are implemented on the [`Table`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table) object and are used to group requests to to improve script performance: -* [`Table.bulk_fetch()`](./../api/table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.bulk_fetch) -* [`Table.bulk_link_fetch()`](./../api/table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.bulk_link_fetch) -* [`Table.bulk_fetch_associated_records()`](./../api/table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.bulk_fetch_associated_records) -* [`Table.bulk_fetch_data_revision_history()`](./../api/table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.bulk_fetch_data_revision_history) +* [`Table.bulk_fetch()`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.bulk_fetch) +* [`Table.bulk_link_fetch()`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.bulk_link_fetch) +* [`Table.bulk_fetch_associated_records()`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.bulk_fetch_associated_records) +* [`Table.bulk_fetch_data_revision_history()`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.bulk_fetch_data_revision_history) +* [`Table.bulk_fetch_all_record_versions()`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.bulk_fetch_all_record_versions) The `bulk_fetch` and `bulk_link_fetch` methods are described in more detail in the following subsections. @@ -231,15 +232,15 @@ The `bulk_fetch` and `bulk_link_fetch` methods are described in more detail in t ### Bulk fetching attributes -Accessing [`Record.attributes`](./../api/record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.attributes) causes the Streamlined API to check to see if the `attributes` property has been +Accessing [`Record.attributes`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record.attributes) causes the Streamlined API to check to see if the `attributes` property has been populated yet. If not, it automatically populates it by exporting all the attributes for that record. This is inefficient if only specific attributes are needed. -Instead, the [`Table.bulk_fetch()`](./../api/table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.bulk_fetch) method should be used to ensure only the required attributes are fetched. Also, +Instead, the [`Table.bulk_fetch()`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.bulk_fetch) method should be used to ensure only the required attributes are fetched. Also, attributes can be requested for multiple records, which fetches the data in a smaller number of batched requests. #### NOTE -The [`Table.bulk_fetch()`](./../api/table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.bulk_fetch) method does not return a value. Instead, the appropriate properties in the provided +The [`Table.bulk_fetch()`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.bulk_fetch) method does not return a value. Instead, the appropriate properties in the provided records are updated in-place. This example shows how to fetch a single attribute value for all records in a table. In this case, the table contains @@ -251,15 +252,15 @@ This example shows how to fetch a single attribute value for all records in a ta 1000 ``` -The first code example shows accessing the [`Record.attributes`](./../api/record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.attributes) property directly. This example contains the +The first code example shows accessing the [`Record.attributes`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record.attributes) property directly. This example contains the fewest lines of code, but is the least efficient approach because all attributes are fetched for each record separately. ```python density_values = [r.attributes["Density"].value for r in records] ``` -To improve performance, use the [`Table.bulk_fetch()`](./../api/table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.bulk_fetch) method to fetch all attributes for all records in a smaller -number of requests before accessing the [`Record.attributes`](./../api/record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.attributes) dictionary. By default, [`Table.bulk_fetch()`](./../api/table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.bulk_fetch) +To improve performance, use the [`Table.bulk_fetch()`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.bulk_fetch) method to fetch all attributes for all records in a smaller +number of requests before accessing the [`Record.attributes`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record.attributes) dictionary. By default, [`Table.bulk_fetch()`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.bulk_fetch) groups records into batches of 100, and requests all attributes for those records. Performance is improved, but unused attributes are still being fetched: @@ -304,16 +305,16 @@ density_values = [r.attributes["Density"].value for r in records] ### Bulk fetching record links -Record link groups are accessed similarly to attributes. Accessing [`Record.links`](./../api/record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.links) causes the Streamlined API +Record link groups are accessed similarly to attributes. Accessing [`Record.links`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record.links) causes the Streamlined API to check if the `links` property has been populated yet. If not, it automatically exports all record link groups for the record. This is inefficient if only specific record link groups are needed. -Instead, the [`Table.bulk_link_fetch()`](./../api/table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.bulk_link_fetch) method should be used to ensure only the required record link groups are +Instead, the [`Table.bulk_link_fetch()`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.bulk_link_fetch) method should be used to ensure only the required record link groups are fetched. Also, record link groups can be requested for multiple records, which fetches the data in a smaller number of batched requests. #### NOTE -The [`Table.bulk_link_fetch()`](./../api/table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.bulk_link_fetch) method does not return a value. Instead, the appropriate properties in the +The [`Table.bulk_link_fetch()`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.bulk_link_fetch) method does not return a value. Instead, the appropriate properties in the provided records are updated in-place. This example shows how to fetch the links in a single record link group for all records in a table. In this case, the @@ -325,7 +326,7 @@ table contains 1,000 records. 1000 ``` -The first code example shows accessing the [`Record.links`](./../api/record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.links) property directly. This example contains +The first code example shows accessing the [`Record.links`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record.links) property directly. This example contains the fewest lines of code, but is the least efficient approach because all record link groups are fetched for each record separately: @@ -337,9 +338,9 @@ for record in records: linked_test_data_record_guids |= guids ``` -To improve performance, use the [`Table.bulk_link_fetch()`](./../api/table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.bulk_link_fetch) method to fetch all record links for all records in a -smaller number of requests before accessing the [`Record.links`](./../api/record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.links) dictionary. By default, -[`Table.bulk_link_fetch()`](./../api/table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.bulk_link_fetch) groups records into batches of 100, and requests all record link groups for those +To improve performance, use the [`Table.bulk_link_fetch()`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.bulk_link_fetch) method to fetch all record links for all records in a +smaller number of requests before accessing the [`Record.links`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record.links) dictionary. By default, +[`Table.bulk_link_fetch()`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table.bulk_link_fetch) groups records into batches of 100, and requests all record link groups for those records. Performance is improved, but unused record link groups are still being fetched: ```python @@ -392,24 +393,24 @@ for record in records: ## Session bulk operations -The following bulk operations are implemented on the [`Session`](./../api/session.md#GRANTA_MIScriptingToolkit.granta.mi.Session) object and are used to group requests to to +The following bulk operations are implemented on the [`Session`](../streamlined_api/session.md#ansys.grantami.core.mi.Session) object and are used to group requests to to improve script performance: -* [`Session.bulk_fetch_release_states()`](./../api/session.md#GRANTA_MIScriptingToolkit.granta.mi.Session.bulk_fetch_release_states) -* [`Session.bulk_delete_or_withdraw_records()`](./../api/session.md#GRANTA_MIScriptingToolkit.granta.mi.Session.bulk_delete_or_withdraw_records) +* [`Session.bulk_fetch_release_states()`](../streamlined_api/session.md#ansys.grantami.core.mi.Session.bulk_fetch_release_states) +* [`Session.bulk_delete_or_withdraw_records()`](../streamlined_api/session.md#ansys.grantami.core.mi.Session.bulk_delete_or_withdraw_records) ### Fetching release states -Accessing [`Record.release_state`](./../api/record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.release_state) causes the Streamlined API to check if the `release_state` property has been +Accessing [`Record.release_state`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record.release_state) causes the Streamlined API to check if the `release_state` property has been populated yet. If not, it automatically exports the release state and release history for the record. This is inefficient if the property is accessed for multiple records in a short space of time, for example within a loop or comprehension. -Instead, the [`Session.bulk_fetch_release_states()`](./../api/session.md#GRANTA_MIScriptingToolkit.granta.mi.Session.bulk_fetch_release_states) method should be used to request the revision information for +Instead, the [`Session.bulk_fetch_release_states()`](../streamlined_api/session.md#ansys.grantami.core.mi.Session.bulk_fetch_release_states) method should be used to request the revision information for multiple records in a smaller number of batched requests. Additionally, since the `bulk_fetch_release_states` method -is implemented on the [`Session`](./../api/session.md#GRANTA_MIScriptingToolkit.granta.mi.Session) object, release states can be fetched for records in multiple tables and +is implemented on the [`Session`](../streamlined_api/session.md#ansys.grantami.core.mi.Session) object, release states can be fetched for records in multiple tables and databases simultaneously. This method can also be parallelized and batched by using the appropriate arguments, see the API guide for more details. @@ -430,8 +431,8 @@ The first example fetches the release states for records individually, with one release_states = {r.name: r.release_state for r in records} ``` -To improve performance, fetch the release states in bulk first before accessing the [`Record.release_state`](./../api/record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.release_state) -property. By default, [`Session.bulk_fetch_release_states()`](./../api/session.md#GRANTA_MIScriptingToolkit.granta.mi.Session.bulk_fetch_release_states) groups records into batches of 100: +To improve performance, fetch the release states in bulk first before accessing the [`Record.release_state`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record.release_state) +property. By default, [`Session.bulk_fetch_release_states()`](../streamlined_api/session.md#ansys.grantami.core.mi.Session.bulk_fetch_release_states) groups records into batches of 100: ```python # 10 record version export requests, each to export record versions for 100 records, executed sequentially @@ -459,13 +460,13 @@ release_states = {r.name: r.release_state for r in records} ### Deleting records -Calling [`Record.delete_or_withdraw_record_on_server()`](./../api/record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.delete_or_withdraw_record_on_server) causes the Streamlined API to immediately delete or +Calling [`Record.delete_or_withdraw_record_on_server()`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record.delete_or_withdraw_record_on_server) causes the Streamlined API to immediately delete or withdraw the record on the server. This is inefficient if multiple records are deleted or withdrawn in a short space of time, for example within a loop or comprehension. -Instead, the [`Session.bulk_delete_or_withdraw_records()`](./../api/session.md#GRANTA_MIScriptingToolkit.granta.mi.Session.bulk_delete_or_withdraw_records) method should be used to delete or withdraw multiple +Instead, the [`Session.bulk_delete_or_withdraw_records()`](../streamlined_api/session.md#ansys.grantami.core.mi.Session.bulk_delete_or_withdraw_records) method should be used to delete or withdraw multiple records in smaller number of batched requests. Additionally, since the `bulk_delete_or_withdraw_records` method -is implemented on the [`Session`](./../api/session.md#GRANTA_MIScriptingToolkit.granta.mi.Session) object, records in multiple tables and databases can be deleted or withdrawn +is implemented on the [`Session`](../streamlined_api/session.md#ansys.grantami.core.mi.Session) object, records in multiple tables and databases can be deleted or withdrawn simultaneously. This method can also be parallelized and batched by using the appropriate arguments, see the API guide for more details. @@ -507,3 +508,33 @@ mi.bulk_delete_or_withdraw_records( max_num_threads=3, ) ``` + + + +## Batch sizes + +As described in the table and session bulk operations section on this page, MI Scripting Toolkit performance can be improved +significantly through the use of bulk operations. The performance increase is dependent on the chosen batch size and +degree of parallelism for bulk operations, captured in the `batch_size` and `max_num_threads` properties for bulk +methods respectively. There is an optimal value for both of these settings which depends on the operation type, the +schema structure [1](#id2), and the complexity of the operation. + +If `batch_size` is too small, then the overhead of sending and receiving requests and responses becomes significant, +which reduces performance. However, if `batch_size` is too large, the request may time out. Equally, if +`max_num_threads` is too small, then the server is under-utilized. However, if `max_num_threads` is too large, the +server may become saturated, slowing down performance for all users. + +To cope with large `batch_size` and `max_num_threads` values, the operation timeout can be increased through use of +the [`SessionConfiguration`](../streamlined_api/session.md#ansys.grantami.core.mi.SessionConfiguration) `timeout` parameter, but this can hamper development by increasing the time taken +to receive invalid or null responses also. Additionally, [timeout errors](exceptions.md#timeout-errors) have to be handled +carefully to avoid interacting with the database in an inconsistent state. + +The default `batch_size` value for each bulk operation is chosen as a starting point, with parallelization disabled by +default. These settings will result in improved performance when compared to making each request individually, but there +is still often significant scope for further performance improvement. A common approach is to measure the time taken to +complete a request as a function of `batch_size` and `max_num_threads` to find an optimal value. + +However, you should always leave some margin for error between the expected request duration and the allowed timeout to +account for variable server load and changes in both the schema structure and the amount of data stored in the database. + +* **[1]** Certain Granta MI attribute types take longer to export than others. For example, tabular data can take longer to export than other data types due to the need to resolve associated records and linked attribute values. In general, testing should be performed to understand how your particular database schema impacts the performance of associated scripts and tools. diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/user_guide/pyansys.md b/2026R1/scripting-toolkit-dev-portal-26-r1/user_guide/pyansys.md index 0655eb6ae0..97909e7059 100644 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/user_guide/pyansys.md +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/user_guide/pyansys.md @@ -26,8 +26,8 @@ packages as required. Example notebooks will also be provided to demonstrate the There are currently two notebooks that demonstrate this interoperability: -* [RecordLists and MI Scripting Toolkit](./../samples/streamlined/18_Record_Lists_Interoperability.md) -* [JobQueue and MI Scripting Toolkit](./../samples/streamlined/19_Job_Queue_Interoperability.md) +* [RecordLists and MI Scripting Toolkit](../samples/streamlined/18_Record_Lists_Interoperability.md) +* [JobQueue and MI Scripting Toolkit](../samples/streamlined/19_Job_Queue_Interoperability.md) More examples will be added as additional PyAnsys packages are released. diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/user_guide/streamlined_api.md b/2026R1/scripting-toolkit-dev-portal-26-r1/user_guide/streamlined_api.md deleted file mode 100644 index dc1cb16823..0000000000 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/user_guide/streamlined_api.md +++ /dev/null @@ -1,133 +0,0 @@ -# Streamlined API structure - - - -The Streamlined [Streamlined API reference](./../api/index.md) 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](./../api/session.md) section documents the [`Session`](./../api/session.md#GRANTA_MIScriptingToolkit.granta.mi.Session) class. The [`Session`](./../api/session.md#GRANTA_MIScriptingToolkit.granta.mi.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: - -* Get [`Database`](./../api/database.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Database) objects, which can be used to access [`Table`](./../api/table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table) and [`Record`](./../api/record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) objects. -* Perform text searches across all records on the server with the [`Session.search_for_records_by_text()`](./../api/session.md#GRANTA_MIScriptingToolkit.granta.mi.Session.search_for_records_by_text) and - [`Session.search_for_records_by_name()`](./../api/session.md#GRANTA_MIScriptingToolkit.granta.mi.Session.search_for_records_by_name) methods. -* Write changes to the Granta MI server with the [`Session.update()`](./../api/session.md#GRANTA_MIScriptingToolkit.granta.mi.Session.update) and [`Session.update_links()`](./../api/session.md#GRANTA_MIScriptingToolkit.granta.mi.Session.update_links) methods. - -This section also documents other classes which perform bulk activities across multiple records in different databases -and tables. - - - -## Database and table classes - -The [Database](./../api/database.md) section documents the [`Database`](./../api/database.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Database) class, which represents Granta MI databases. -[`Database`](./../api/database.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Database) objects are typically obtained by using the [`Session.get_db()`](./../api/session.md#GRANTA_MIScriptingToolkit.granta.mi.Session.get_db) method. - -The [Table](./../api/table.md) section documents [`Table`](./../api/table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table) class, which represents tables on the Granta MI server. -[`Table`](./../api/table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table) objects are typically obtained by using the [`Database.get_table()`](./../api/database.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Database.get_table) method. - -[`Database`](./../api/database.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Database) and [`Table`](./../api/table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table) objects are used to: - -* Get [`Record`](./../api/record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) objects from a [`Table`](./../api/table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table) object based on their location in the record tree. -* Get [`Record`](./../api/record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) objects from a [`Database`](./../api/database.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Database) or [`Table`](./../api/table.md#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table) object by text, record name, or attribute - value searching. -* Access schema information, such as [`mi_meta_classes.TableLayout`](./../api/supporting.md#GRANTA_MIScriptingToolkit.granta.mi_meta_classes.TableLayout) and - [`mi_meta_classes.LinkGroupDetails`](./../api/supporting.md#GRANTA_MIScriptingToolkit.granta.mi_meta_classes.LinkGroupDetails) objects. - - - -## Record classes - -The [Record](./../api/record.md) section documents the [`Record`](./../api/record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) class, which represents a record on the Granta MI server. -[`Record`](./../api/record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) objects are used to: - -* Access and modify data stored in attributes via the [`Record.attributes`](./../api/record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.attributes) dictionary. -* Access and modify properties of the record, such as [`Record.name`](./../api/record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.name) and [`Record.color`](./../api/record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.color) -* Access links via the [`Record.links`](./../api/record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.links) dictionary, and modify them with the [`Record.set_links()`](./../api/record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.set_links) method. -* Copy and move the record with the [`Record.copy_to()`](./../api/record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.copy_to) and [`Record.move_to()`](./../api/record.md#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.move_to) methods. - - - -## Attribute definition classes - -The [Attribute definitions](./../api/attribute-definitions.md) section documents the [`AttributeDefinition`](./../api/attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.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`](./../api/attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.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`](./../api/attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) class is subclassed according to the hierarchy described below: - -* [`AttributeDefinition`](./../api/attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) (no objects are direct instances of this type) - * [`AttributeDefinitionDatetime`](./../api/attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinitionDatetime) - * [`AttributeDefinitionDiscrete`](./../api/attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinitionDiscrete) - * [`AttributeDefinitionFile`](./../api/attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinitionFile) - * [`AttributeDefinitionHyperlink`](./../api/attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinitionHyperlink) - * [`AttributeDefinitionInteger`](./../api/attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinitionInteger) - * [`AttributeDefinitionLogical`](./../api/attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinitionLogical) - * [`AttributeDefinitionLongText`](./../api/attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinitionLongText) - * [`AttributeDefinitionPicture`](./../api/attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinitionPicture) - * [`AttributeDefinitionRange`](./../api/attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinitionRange) - * [`AttributeDefinitionShortText`](./../api/attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinitionShortText) - * [`AttributeDefinitionTabular`](./../api/attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinitionTabular) - * [`AttributeDefinitionMultiValue`](./../api/attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinitionMultiValue) (no objects are direct instances of this type) - * [`AttributeDefinitionFloatFunctional`](./../api/attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinitionFloatFunctional) - * [`AttributeDefinitionPoint`](./../api/attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinitionPoint) - * [`AttributeDefinitionUnsupported`](./../api/attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinitionUnsupported) (no objects are direct instances of this type) - * [`AttributeDefinitionDiscreteFunctional`](./../api/attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinitionDiscreteFunctional) - -This section also documents the [`PseudoAttributeDefinition`](./../api/attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.PseudoAttributeDefinition) class. Objects of this type can generally be used in -place of [`AttributeDefinition`](./../api/attribute-definitions.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) objects to search or export pseudo-attributes. - - - -## Attribute classes - -The [Attribute values](./../api/attribute-values.md) section documents the -[`AttributeValue`](./../api/attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.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`](./../api/attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeValue) class is subclassed according to -the hierarchy described below: - -* [`AttributeValue`](./../api/attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeValue): Base class for all attributes - * [`AttributeBinary`](./../api/attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeBinary): Parent class for binary attributes (no objects are direct instances of this type) - * [`AttributePicture`](./../api/attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributePicture): Picture data - * [`AttributeFile`](./../api/attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeFile): File data - * [`AttributeDate`](./../api/attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeDate): Datetime data - * [`AttributeDiscrete`](./../api/attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeDiscrete): Discrete data - * [`AttributeFunctional`](./../api/attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeFunctional): Parent class for float functional data (no objects are direct instances of this type) - * [`FunctionalSeries`](./../api/attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.FunctionalSeries): Float functional series data - * [`FunctionalGrid`](./../api/attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.FunctionalGrid): Float functional gridded data - * [`AttributeHyperlink`](./../api/attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeHyperlink): Hyperlink data - * [`AttributeInteger`](./../api/attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeInteger): Integer data - * [`AttributeLogical`](./../api/attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeLogical): Logical data - * [`AttributePoint`](./../api/attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributePoint): Point (optionally with parameter) data - * [`AttributeRange`](./../api/attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeRange): Range data - * [`AttributeTabular`](./../api/attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeTabular): Tabular data - * [`AttributeShortText`](./../api/attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeShortText): Short text data - * [`AttributeLongText`](./../api/attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeLongText): Long text data - * [`AttributeUnsupported`](./../api/attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeUnsupported): Unsupported data - * [`PseudoAttributeValue`](./../api/attribute-values.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.PseudoAttributeValue): Pseudo-attribute value class covering all pseudo-attribute types - - - -## Sub-attribute classes - -The [Schema and supporting items](./../api/supporting.md) section documents classes that are used by attribute objects but are not attributes -themselves. This includes: - -* The [`ParameterDefinition`](./../api/supporting.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.ParameterDefinition) section, which documents the classes used to describe parameters. -* The [`ObjectHistory`](./../api/supporting.md#GRANTA_MIScriptingToolkit.granta.mi_meta_classes.ObjectHistory), [`RecordVersionHistory`](./../api/supporting.md#GRANTA_MIScriptingToolkit.granta.mi_meta_classes.RecordVersionHistory), and [`DataRevisionHistory`](./../api/supporting.md#GRANTA_MIScriptingToolkit.granta.mi_meta_classes.DataRevisionHistory) classes, which are used - to describe revision information of certain items within a Granta MI database. -* The [`Hyperlink`](./../api/supporting.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.Hyperlink) class, which describes a Granta MI hyperlink attribute’s URL, target, and description. -* The [`BinaryType`](./../api/supporting.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.BinaryType), [`Picture`](./../api/supporting.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.Picture), and [`File`](./../api/supporting.md#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.File) classes, which contain binary data, and provide - methods or saving and loading that data to/from disk. diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/user_guide/streamlined_api_structure.md b/2026R1/scripting-toolkit-dev-portal-26-r1/user_guide/streamlined_api_structure.md new file mode 100644 index 0000000000..fbd95bd570 --- /dev/null +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/user_guide/streamlined_api_structure.md @@ -0,0 +1,250 @@ +# Streamlined API structure + + + + + +## [Session](../streamlined_api/session.md) + +Includes [`Session`](../streamlined_api/session.md#ansys.grantami.core.mi.Session) and [`SessionBuilder`](../streamlined_api/session.md#ansys.grantami.core.mi.SessionBuilder) classes. + +The [`SessionBuilder`](../streamlined_api/session.md#ansys.grantami.core.mi.SessionBuilder) class is used to specify Granta MI connection information, and returns a [`Session`](../streamlined_api/session.md#ansys.grantami.core.mi.Session) +object once the connection to the server is complete. + +The [`Session`](../streamlined_api/session.md#ansys.grantami.core.mi.Session) object acts as the root object from which most other Streamlined API objects are spawned, and is +typically used to: + +* Get [`Database`](../streamlined_api/database.md#ansys.grantami.core.mi_tree_classes.Database) objects, which can be used to access [`Table`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table) and [`Record`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record) objects. +* Perform text searches across all records on the server with the [`Session.search_for_records_by_text()`](../streamlined_api/session.md#ansys.grantami.core.mi.Session.search_for_records_by_text) and + [`Session.search_for_records_by_name()`](../streamlined_api/session.md#ansys.grantami.core.mi.Session.search_for_records_by_name) methods. +* Write changes to the Granta MI server with the [`Session.update()`](../streamlined_api/session.md#ansys.grantami.core.mi.Session.update) and [`Session.update_links()`](../streamlined_api/session.md#ansys.grantami.core.mi.Session.update_links) methods. +* Perform bulk activities across multiple records, optionally in different databases and tables. + + + +## [Database](../streamlined_api/database.md) and [Table](../streamlined_api/table.md) + +Includes the [`Database`](../streamlined_api/database.md#ansys.grantami.core.mi_tree_classes.Database) and [`Table`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table) classes. + +The [`Database`](../streamlined_api/database.md#ansys.grantami.core.mi_tree_classes.Database) class represents Granta MI databases. [`Database`](../streamlined_api/database.md#ansys.grantami.core.mi_tree_classes.Database) objects are typically obtained by using +the [`Session.get_db()`](../streamlined_api/session.md#ansys.grantami.core.mi.Session.get_db) method. + +The [`Table`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table) class represents Granta MI tables. [`Table`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table) objects are typically obtained by using the +[`Database.get_table()`](../streamlined_api/database.md#ansys.grantami.core.mi_tree_classes.Database.get_table) method. + +[`Database`](../streamlined_api/database.md#ansys.grantami.core.mi_tree_classes.Database) and [`Table`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table) objects are used to: + +* Get [`Record`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record) objects from a [`Table`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table) object based on their location in the record tree. +* Get [`Record`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record) objects from a [`Database`](../streamlined_api/database.md#ansys.grantami.core.mi_tree_classes.Database) or [`Table`](../streamlined_api/table.md#ansys.grantami.core.mi_tree_classes.Table) object by text, record name, or attribute + value searching. +* Access schema information, such as [`mi_meta_classes.TableLayout`](../streamlined_api/supporting.md#ansys.grantami.core.mi_meta_classes.TableLayout) and + [`mi_meta_classes.LinkGroupDetails`](../streamlined_api/supporting.md#ansys.grantami.core.mi_meta_classes.LinkGroupDetails) objects. + + + +## [Record](../streamlined_api/record.md) + +Includes the [`Record`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record) class. + +The [`Record`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record) class represents Granta MI records. + +[`Record`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record) objects are used to: + +* Access and modify data stored in attributes via the [`Record.attributes`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record.attributes) dictionary. +* Access and modify properties of the record, such as [`Record.name`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record.name) and [`Record.color`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record.color) +* Access links via the [`Record.links`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record.links) dictionary, and modify them with the [`Record.set_links()`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record.set_links) method. +* Copy and move the record with the [`Record.copy_to()`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record.copy_to) and [`Record.move_to()`](../streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record.move_to) methods. + + + +## [Attribute definitions](../streamlined_api/attribute-definitions.md) + +Includes the [`PseudoAttributeDefinition`](../streamlined_api/attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.PseudoAttributeDefinition) and [`AttributeDefinition`](../streamlined_api/attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinition) class, and all +[`AttributeDefinition`](../streamlined_api/attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinition) sub-classes. The [`AttributeDefinition`](../streamlined_api/attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinition) class is subclassed according to the +hierarchy described below: + +* [`AttributeDefinition`](../streamlined_api/attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinition) (no objects are direct instances of this type) + * [`AttributeDefinitionDate`](../streamlined_api/attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinitionDate) + * [`AttributeDefinitionDiscrete`](../streamlined_api/attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinitionDiscrete) + * [`AttributeDefinitionFile`](../streamlined_api/attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinitionFile) + * [`AttributeDefinitionHyperlink`](../streamlined_api/attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinitionHyperlink) + * [`AttributeDefinitionInteger`](../streamlined_api/attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinitionInteger) + * [`AttributeDefinitionLogical`](../streamlined_api/attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinitionLogical) + * [`AttributeDefinitionLongText`](../streamlined_api/attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinitionLongText) + * [`AttributeDefinitionPicture`](../streamlined_api/attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinitionPicture) + * [`AttributeDefinitionRange`](../streamlined_api/attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinitionRange) + * [`AttributeDefinitionShortText`](../streamlined_api/attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinitionShortText) + * [`AttributeDefinitionTabular`](../streamlined_api/attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinitionTabular) + * [`AttributeDefinitionMultiValue`](../streamlined_api/attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinitionMultiValue) (no objects are direct instances of this type) + * [`AttributeDefinitionFloatFunctional`](../streamlined_api/attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinitionFloatFunctional) + * [`AttributeDefinitionPoint`](../streamlined_api/attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinitionPoint) + * [`AttributeDefinitionUnsupported`](../streamlined_api/attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinitionUnsupported) (no objects are direct instances of this type) + * [`AttributeDefinitionDiscreteFunctional`](../streamlined_api/attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinitionDiscreteFunctional) + +These [`AttributeDefinition`](../streamlined_api/attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinition) 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`](../streamlined_api/attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinition) objects are used to access the attribute name, attribute unit, and additional schema-level +configuration based on the type of the attribute. + +[`PseudoAttributeDefinition`](../streamlined_api/attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.PseudoAttributeDefinition) objects can generally be used in place of [`AttributeDefinition`](../streamlined_api/attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinition) objects to +search or export pseudo-attributes. + + + +## [Attribute values](../streamlined_api/attribute-values.md) + +Includes the [`AttributeValue`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeValue) class and all sub-classes. The +[`AttributeValue`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeValue) class is subclassed according to the hierarchy +described below: + +* [`AttributeValue`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeValue): Base class for all attributes + * [`AttributeBinary`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeBinary): Parent class for binary attributes (no objects are direct instances of this type) + * [`AttributePicture`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributePicture): Picture data + * [`AttributeFile`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeFile): File data + * [`AttributeDate`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeDate): Datetime data + * [`AttributeDiscrete`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeDiscrete): Parent class for discrete attributes (no objects are direct instances of this type) + * [`AttributeDiscreteSingle`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeDiscreteSingle): Single-valued discrete data + * [`AttributeDiscreteMulti`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeDiscreteMulti): Multi-valued discrete data + * [`AttributeFunctionalSeriesPoint`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalSeriesPoint): Float functional series data + * [`AttributeFunctionalSeriesRange`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalSeriesRange): Ranged float functional series data + * [`AttributeFunctionalGridPoint`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalGridPoint): Float functional gridded data + * [`AttributeFunctionalGridRange`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeFunctionalGridRange): Ranged float functional gridded data + * [`AttributeHyperlink`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeHyperlink): Hyperlink data + * [`AttributeInteger`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeInteger): Integer data + * [`AttributeLogical`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeLogical): Logical data + * [`AttributePoint`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributePoint): Parent class for point attributes (no objects are direct instances of this type) + * [`AttributePointSingle`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributePointSingle): Single-valued point data + * [`AttributePointMulti`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributePointMulti): Multi-valued point data + * [`AttributeRange`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeRange): Range data + * [`AttributeTabular`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeTabular): [Tabular data](#tabular-attribute-values) + * [`AttributeShortText`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeShortText): Short text data + * [`AttributeLongText`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeLongText): Long text data + * [`AttributeUnsupported`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeUnsupported): Unsupported data + * [`PseudoAttributeValue`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.PseudoAttributeValue): Pseudo-attribute value class covering all pseudo-attribute types + +These [`AttributeValue`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeValue) 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). + + + +## [Schema and supporting items](../streamlined_api/supporting.md) + +Includes: + +* The [Schema](../streamlined_api/supporting.md#api-guide-misc-schema) section. Includes classes used to describe aspects of a database schema. +* The [Parameters](../streamlined_api/supporting.md#api-guide-misc-parameters) section. Includes classes used to describe parameters at all levels of the Granta + MI object hierarchy. +* The [Item history](../streamlined_api/supporting.md#api-guide-misc-object-history) section. Includes classes used to describe revision information of + items within a Granta MI database. +* The [`SearchCriterion`](../streamlined_api/supporting.md#ansys.grantami.core.mi_meta_classes.SearchCriterion) class. Used to specify search criteria when searching for records by pseudo-attribute + value. + +Also includes sections describing classes used with specific types of attribute values. These contain similar +information to the corresponding [`AttributeValue`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeValue) classes, but +are not directly associated with a record. + +* [Media attribute values](../streamlined_api/supporting.md#api-guide-misc-media-attribute-values): File and picture attribute values. +* [Numeric attribute values](../streamlined_api/supporting.md#api-guide-misc-numeric-attribute-values): Multi-valued point attributes and precision information. +* [Functional attribute values](../streamlined_api/supporting.md#api-guide-misc-functional-attribute-values): Float functional series and float functional grid attribute values. + + + + + +## [Tabular attribute value items](../streamlined_api/tabular.md) + + + +### Tabular rows + +A tabular attribute consists of zero or more rows, each represented by a +[`TabularRow`](../streamlined_api/tabular.md#ansys.grantami.core.mi_attribute_value_classes.TabularRow) object. This provides access to individual cells, either as a tuple via +the [`cells`](../streamlined_api/tabular.md#ansys.grantami.core.mi_attribute_value_classes.TabularRow.cells) property, or by using the +[`cells_by_column`](../streamlined_api/tabular.md#ansys.grantami.core.mi_attribute_value_classes.TabularRow.cells_by_column) property as a mapping from column names to cell values. + + + +### Tabular cells + +Cells within a tabular row are represented by specific cell value classes, depending on the type of data stored in the +cell. These classes include: + +* The [`ShortTextValue`](../streamlined_api/tabular.md#ansys.grantami.core._mi_tabular_value_classes.ShortTextValue) class, which describes a short text cell, and + includes the text value. +* The [`LongTextValue`](../streamlined_api/tabular.md#ansys.grantami.core._mi_tabular_value_classes.LongTextValue) class, which describes a long text cell, and + includes the text value. +* The [`LogicalValue`](../streamlined_api/tabular.md#ansys.grantami.core._mi_tabular_value_classes.LogicalValue) class, which describes a logical cell, and includes + the boolean value. +* The [`IntegerValue`](../streamlined_api/tabular.md#ansys.grantami.core._mi_tabular_value_classes.IntegerValue) class, which describes an integer cell, and includes + the integer value. +* The [`DateValue`](../streamlined_api/tabular.md#ansys.grantami.core._mi_tabular_value_classes.DateValue) class, which describes a date cell, and includes the + date value. +* The [`PictureValue`](../streamlined_api/tabular.md#ansys.grantami.core._mi_tabular_value_classes.PictureValue) class, which describes a binary data cell, and includes + the binary data, URL, and MIME file type. This class also enables saving the picture to a file. +* The [`FileValue`](../streamlined_api/tabular.md#ansys.grantami.core._mi_tabular_value_classes.FileValue) class, which describes a file cell, and includes + the binary data, URL, MIME file type, file name, and description. This class also enables saving the file. +* The [`PointValue`](../streamlined_api/tabular.md#ansys.grantami.core._mi_tabular_value_classes.PointValue) class, which describes a Point cell, and includes the + attribute’s value and associated unit. + Note that tabular cells can only contain a single point value, and are not associated with parameters. +* The [`RangeValue`](../streamlined_api/tabular.md#ansys.grantami.core._mi_tabular_value_classes.RangeValue) class, which describes a Range cell, and includes the + value, inclusivity, and associated unit. +* The [`DiscreteValue`](../streamlined_api/tabular.md#ansys.grantami.core._mi_tabular_value_classes.DiscreteValue) class, which describes a Discrete cell, and includes + the value and the order. +* The [`HyperlinkValue`](../streamlined_api/tabular.md#ansys.grantami.core._mi_tabular_value_classes.HyperlinkValue) class, which describes a Hyperlink cell, and + includes URL, target, and description. + +Each of these classes has a corresponding Local cell version which is mutable, this allows local cell data to be set. +Some of these local versions have additional properties to simplify working with them. These are: + +* The [`LocalShortTextValue`](../streamlined_api/tabular.md#ansys.grantami.core._mi_tabular_value_classes.LocalShortTextValue) class is a mutable short text cell which allows local cell data to be set. +* The [`LocalLongTextValue`](../streamlined_api/tabular.md#ansys.grantami.core._mi_tabular_value_classes.LocalLongTextValue) class is a mutable long text cell which allows local cell data to be set. +* The [`LocalLogicalValue`](../streamlined_api/tabular.md#ansys.grantami.core._mi_tabular_value_classes.LocalLogicalValue) class is a mutable logical cell which allows local cell data to be set. +* The [`LocalIntegerValue`](../streamlined_api/tabular.md#ansys.grantami.core._mi_tabular_value_classes.LocalIntegerValue) class is a mutable integer cell which allows local cell data to be set. +* The [`LocalDateValue`](../streamlined_api/tabular.md#ansys.grantami.core._mi_tabular_value_classes.LocalDateValue) class is a mutable date cell which allows local cell data to be set. +* The [`LocalPictureValue`](../streamlined_api/tabular.md#ansys.grantami.core._mi_tabular_value_classes.LocalPictureValue) class is a mutable binary data cell which allows local cell data to be set and + includes methods for loading binary data from files. +* The [`LocalFileValue`](../streamlined_api/tabular.md#ansys.grantami.core._mi_tabular_value_classes.LocalFileValue) class is a mutable file cell which allows local cell data to be set and + includes methods for loading file data with file name and description properties. +* The [`LocalPointValue`](../streamlined_api/tabular.md#ansys.grantami.core._mi_tabular_value_classes.LocalPointValue) class exposes the `default_unit` property, which returns the + default unit for the point value as defined for the column in the attribute definition. +* The [`LocalRangeValue`](../streamlined_api/tabular.md#ansys.grantami.core._mi_tabular_value_classes.LocalRangeValue) class exposes the `default_unit` property, which returns the + default unit for the range value as defined for the column in the attribute definition. +* The [`LocalDiscreteValue`](../streamlined_api/tabular.md#ansys.grantami.core._mi_tabular_value_classes.LocalDiscreteValue) class exposes the `possible_discrete_values` property, + which returns the possible discrete values for the column in the attribute definition. +* The [`LocalHyperlinkValue`](../streamlined_api/tabular.md#ansys.grantami.core._mi_tabular_value_classes.LocalHyperlinkValue) exposes no additional properties. + +Functional cells are not supported in tabular attributes, and are represented as [`UnsupportedType`](../streamlined_api/supporting.md#ansys.grantami.core.mi_attribute_value_classes.UnsupportedType) objects. +As an alternative, linked records for each row can be accessed [`AttributeTabular.linked_records`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeTabular.linked_records) and the +functional data can be exported for these records. + + + +### Destructive editing + +Since v5.0, Scripting Toolkit will always try to update tabular attribute values via an update operation, by only +updating the modified cells and leaving the tabular rows and unmodified cells in place. However, there are some tabular +data modifications which cannot be performed as an update operation, and instead the tabular value must be completely +re-created. This is referred to as ‘destructive editing’. + +Destructive editing should be avoided because: + +* This can be slow for attributes with File or Picture attributes, especially if many rows are present. +* Users of Data Updater will face conflicts when applying subsequent updates. + +The following actions cause destructive editing, because they can only be accomplished by re-creating the tabular +attribute value: + +* [`AttributeTabular.swap_rows()`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeTabular.swap_rows) +* [`TabularRow.set_linking_value()`](../streamlined_api/tabular.md#ansys.grantami.core.mi_attribute_value_classes.TabularRow.set_linking_value) for an exported row + +By default, using one of these methods will raise a [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError) to inform the user that a destructive action +has been performed. To allow the destructive action, first call the method +[`enable_destructive_editing()`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeTabular.enable_destructive_editing). See the API guide for more details, +including additional considerations when performing destructive editing with binary data. + +Destructive editing may also be forced for a tabular attribute by calling [`force_destructive_editing()`](../streamlined_api/attribute-values.md#ansys.grantami.core.mi_attribute_value_classes.AttributeTabular.force_destructive_editing) before +importing the data. diff --git a/2026R1/scripting-toolkit-dev-portal-26-r1/user_guide/versioning.md b/2026R1/scripting-toolkit-dev-portal-26-r1/user_guide/versioning.md index f11614b4fc..3a9101079f 100644 --- a/2026R1/scripting-toolkit-dev-portal-26-r1/user_guide/versioning.md +++ b/2026R1/scripting-toolkit-dev-portal-26-r1/user_guide/versioning.md @@ -2,10 +2,31 @@ -The Streamlined API has a stable interface and changes follow [Semantic Versioning](https://semver.org/) where-ever -possible. Outside of major releases, only backwards-compatible changes will be made. It is sometimes necessary to make -backwards-incompatible changes without a new major release, but the old will always be deprecated for at least -two versions before the changes are implemented. Deprecated behavior will be documented in the [API reference](./../api/index.md) and -will raise an `APIDeprecationWarning` when the behavior is encountered. + -Historical changes to the Streamlined API are documented in [Planned changes and deprecations](./../changelog.md#upgrading). +## Streamlined API + +The Streamlined API follows a versioning strategy similar to numpy’s [NEP 23 policy](https://numpy.org/neps/nep-0023-backwards-compatibility.html#nep23). Version numbers follow +the same MAJOR.MINOR.PATCH structure as with [Semantic Versioning](https://semver.org/), but whereas Semantic Versioning only +allows breaking changes with MAJOR releases, the Streamlined API may introduce breaking changes with MAJOR and MINOR +releases. + +However, these changes are always deprecated for at least two MINOR releases prior to being introduced. The deprecation +is communicated in the API documentation, the changelog, and where possible by issuing an `APIDeprecationWarning` at +runtime when the deprecated functionality is used. This versioning strategy is intended to give a tradeoff between +stability and being able to rapidly evolve the API to meet user needs within a rigid release schedule. + +[Planned changes and deprecations](../release_notes/deprecations.md#planned-changes) lists the latest planned breaking changes in upcoming releases of the Streamlined API. Historical +changes are documented in [Upgrading from earlier versions](../release_notes/breaking_changes.md#upgrading). + + + +## Foundation API + +The Foundation API does not follow Semantic Versioning, and breaking changes may be introduced with any Granta MI +release. + +The version number includes the interface version of the underlying Service Layer SOAP API that it targets, for example +version `23.10.0.170` is based on the SOAP API version 23/10. The third and fourth version number elements `0.170` +can be considered equivalent to MAJOR and MINOR elements in Semantic Versioning. Breaking changes will trigger a new +MAJOR version, while new functionality that does not break existing functionality will trigger a new MINOR version.