Skip to main content

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 to access instances of this class.

property database_from : str

Database key of the database the link group originates from.
  • Return type: str

property database_to : str

Database key of the database target by the link group.
  • Return type: str

property name : str

Name of the record link group.
  • Return type: str

property reverse_name : str

Name of the record link group in the return direction.
  • Return type: str

property table_from : str

Name of the table the link group comes from.
  • Return type: str

property table_to : str

Name of the table targeted by the link group.
  • Return type: str

property type : str

Whether the record link group is ‘static’, ‘crossDatabase’ or ‘dynamic’.
  • Return type: 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 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) – Name of the attribute.
  • Return type: list[str]

property attributes_by_category : Dict[str, List[str]]

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

property categories : List[str]

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

property layout : List[Dict[str, str | List[str] | Dict[str, str | List[str]]]]

JSON-style representation of the layout. Dictionary of link group lists, indexed by the layout category they are in.

property meta_attributes_by_attribute : Dict[str, List[str]]

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

property name : str

Layout name.
  • Return type: 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() 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]) – List of records to validate.
  • Returns: Whether the specified list of records can be exported with this exporter.
  • Return type: 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.

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]) – List of records to export.
    • stop_before (int or str , optional) – Either refers to the index of the transform step (int) or its name (str).
    • parameter_defs (dict[str, ExporterParameter], optional) – Dictionary of exporter parameters.
    • sig_figs (int , optional) – Number of significant figures for numerical data.
  • Returns: Contains data output by the exporter.
  • Return type: str
  • Raises: 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 or pathlib.Path) – 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.

property absolute_temperatures_optional : bool

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.

property default_bom : bytes | 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.
  • Return type: bytes or None

property default_encoding : str

Returns the default file encoding scheme as defined by the exporter configuration file.
  • Return type: str

Notes

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

property default_file_extension : str

Returns the default file extension as defined by the exporter configuration file.
  • Return type: str

property default_file_name : str

Returns the default file name for the last performed export. As defined by the exporter configuration file.
  • Return type: str

property description : str

The Exporter description.
  • Return type: str

property exporter_key : str

The unique key that is used to identify the exporter.
  • Return type: str

property model : str

The Finite-Element Material Model name.
  • Return type: 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

The name of the exporter, as defined in the .exp file.
  • Return type: str

property package : str

The Package defines the name of the target CAE analysis package.
  • Return type: 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[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() stop_before argument to selectively run transformation steps.

property unit_system : str | 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

property unit_systems : List[str]

All the unit-systems this exporter supports.

property use_absolute_temperatures : bool

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.

class ExporterTransform

Dictionary representing a transformation step defined for an Exporter. Provide the id or index to the Exporter.run_exporter() stop_before argument to selectively run transformation steps.

id : str

ID of the transform step.

index : 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[‘Linear’, ‘Log’] | None

Axis scale type for the parameter.

property data_type : Literal[‘Numeric’, ‘Discrete’]

Parameter data type.
  • Returns: One of ‘Numeric’ or ‘Discrete’.
  • Return type: str
  • Raises: NotImplementedError – If the parameter type is not supported.

property database_unit : str | None

Database unit symbol for the parameter.
  • Return type: str or None

property default_value : str | float

Default value of the parameter.

property history : ObjectHistory

Revision history of the parameter.

property history_of_default : ObjectHistory

Revision history of the parameter’s default value.

property id : int

Parameter identifier.
  • Return type: int

property interpolation_type : Literal[‘None’, ‘Linear’, ‘Cubic Spline’]

The interpolation type for the parameter.

property name : str

Parameter name.
  • Return type: str

property restricted : bool

Whether the parameter is restricted to specific values.

property unit : str | None

Unit symbol for the parameter.
  • Return type: str or None

Notes

This property is used to specify a unit in the following situations: This property does not impact data export. Attribute parameter values are always exported according to the Database.unit_system and Database.absolute_temperatures settings.

property values : List[str | float]

List of all possible values the parameter can take.

property values_histories : List[ObjectHistory]

Revision histories of each possible value of a parameter.

class DatabaseParameter

Bases: 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 to access instances of this class.

class AttributeParameter

Bases: DatabaseParameter Definition of a parameter as configured for an attribute. Inherited properties ParameterDefinition.default_value, ParameterDefinition.axis_scale_type, and 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 to access instances of this class.

property order : 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

property parent_attribute : AttributeDefinitionMultiValue

Attribute to which this parameter applies.

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 to access instances of this class.

property name : str

Parameter name.
  • Return type: str

property unit : str | 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.
  • Return type: str or None

class ExporterParameter

Bases: 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() to generate instances of this class.

clear_value_for_exporters()

Clear the value on the ExporterParameter instance and return it to the default value.

property value_for_exporters : str | float

Value on the 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.

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 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, to access instances of this class.

property axis_scale_type : Literal[‘Linear’, ‘Log’] | None

The scale type for the parameter.
  • Returns: If set to None, the value is inherited from the parameter definition associated with the parent attribute definition.
  • Return type: ScaleType or None
  • Raises:
    • TypeError – If providing a non-string value.
    • ValueError – If providing an invalid scale type.

SEE ALSO

effective_axis_scale_type : The effective value of this property, taking inheritance into account if the property is set to None.

property default_value : str | float | None

Default value for the parameter.
  • Returns: Parameter default value. If set to None, the value is inherited from the parameter definition associated with the parent attribute definition.
  • Return type: str or float or None
  • Raises:
    • TypeError – If providing a non-float value for a numeric parameter or a non-str value for a discrete parameter.
    • ValueError – If the string value is not in the allowed values list.

SEE ALSO

effective_default_value : The effective value of this property, taking inheritance into account if the property is set to None.

property effective_axis_scale_type : Literal[‘Linear’, ‘Log’] | None

Effective scale type, inherited from the attribute parameter if not defined on the datum. None for all discrete parameters.

property effective_default_value : str | float

Effective default value, inherited from the attribute parameter if not defined on the datum.

property effective_interpolation_type : Literal[‘None’, ‘Linear’, ‘Cubic Spline’]

Effective interpolation type, inherited from the attribute parameter if not defined on the datum.

property interpolation_type : Literal[‘None’, ‘Linear’, ‘Cubic Spline’] | None

The interpolation type for the parameter.
  • Returns: If set to None, the value is inherited from the parameter definition associated with the parent attribute definition.
  • Return type: InterpolationType or None
  • Raises:
    • TypeError – If providing a non-string value.
    • ValueError – If providing an invalid interpolation type.

SEE ALSO

effective_interpolation_type : The effective value of this property, taking inheritance into account if the property is set to None.

property name : str

Parameter name.
  • Return type: str

property unit : str | 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.
  • Return type: str or None

WARNING

The unit property affects both the default_value and the functional attribute parameter value for import. If the unit is modified, you must make sure that both the 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:

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

Date and time the database element was created.

property created_by : str

The username of the user who created the database element.
  • Return type: str

property date_created : str

Date the database element was created.
  • Return type: str

property last_modified_at : datetime

Date and time the database element was last modified.

property last_modified_by : str

The username of the last user to modify the database element.
  • Return type: str

property last_modified_date : str

Date the database element was last modified.
  • Return type: str

property update_count : int

The number of times the object has been updated.
  • Return type: 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 to access an instance of this class.

property created_at : datetime

Date and time the record version was created.

property created_by : str

The username of the user who created the record version.
  • Return type: str

property creation_notes : str

Notes associated with the creation of the record version.
  • Return type: str

property last_modification_notes : str

Notes associated with the last modification made to record version.
  • Return type: str

property last_modified_at : datetime

Date and time the record version was last modified.

property last_modified_by : str

The username of the user who last modified the record version.
  • Return type: str

property release_notes : str | None

Notes associated with the release of the record version.
  • Return type: str or None

property released_at : datetime | None

Date and time the record version was released.

property released_by : str | None

The username of the user who released the record version.
  • Return type: str or None

property superseded_at : datetime | None

Date and time the record version was superseded.

property superseded_by : str | None

The username of the user who superseded the record version.
  • Return type: str or None

property supersession_notes : str | None

Notes associated with the last operation that superseded the record version.
  • Return type: str or None

property withdrawal_notes : str | None

Notes associated with the withdrawal of the record version.
  • Return type: str or None

property withdrawn_at : datetime | None

Date and time the record version was withdrawn.

property withdrawn_by : str | None

The username of the user who withdrew the record version.
  • Return type: 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 to access an instance of this class.

property created_in_record_version : int

Version of the record when this datum was created.
  • Return type: int

property data_version_number : int

Data version number.
  • Return type: int

property history : ObjectHistory | None

Revision history of the attribute data, as an ObjectHistory object. Is None for empty attributes.

property is_meta : bool

Whether the attribute is a meta-attribute or not.

property is_meta_for : str | None

Name of the parent attribute, if a meta-attribute. Returns None otherwise.
  • Return type: str or None

property is_populated : bool

Whether the attribute is populated.

property meta_attributes : Dict[str, DataRevisionHistory]

Data revision history of meta-attributes associated with this attribute, indexed by meta-attribute name.

property name : str

Name of the attribute.
  • Return type: str

property retired_in_record_version : int

Version of the record when this datum was retired.
  • Return type: 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.
  • Parameters:
    • attribute (AttributeDefinition | 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 | bool | int | str | List [str ] | tuple [datetime.datetime , datetime.datetime ] | tuple [datetime.date , datetime.date ] | list [float ] | RecordColor | 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 | 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 values default to UTC if no timezone information is provided.

property attribute : AttributeDefinition | PseudoAttributeDefinition

AttributeDefinition or PseudoAttributeDefinition for the attribute used in this search criterion.

property operation : str

Operator used in this criterion, if provided.
  • Example: ‘EXISTS’ or ‘CONTAINS’
  • Return type: 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.

save(path)

Saves an object to file location path. Relative paths are permitted.
  • Parameters: path (str or pathlib.Path) – Path where the object should be saved.

property binary_data : bytes | None

The binary data for the file. Binary data can be set with a bytes object or file buffer.
  • Return type: bytes or None
  • Raises: ValueError – If binary data is available on the server but has not been exported.

property is_empty : bool

Checks whether the BinaryType object is populated by checking whether there is binary data in the object.

property mime_file_type : str | 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() or setting the 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 and Granta MI determines the MIME file type during import.
  • Return type: str or None

Notes

The filetype PyPI page lists supported MIME types.

property url : str | None

URL of the hosted file.
  • Returns: URL to the file stored in the parent Granta MI attribute, or None if the URL was not populated.
  • Return type: 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() 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.

property value : bytes | None

The binary data of the hosted file, if exported. None if the attribute was exported with include_binary_data = False.
  • Return type: bytes or None

class Picture(*, path=None)

Extended BinaryType class for Pictures in MI.
  • Parameters: path (str or 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() will raise a 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 or 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 or 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 class for Files in MI.
  • Parameters: path (Union [str , 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() will raise a 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 or 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 or 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 | 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 or None
  • Raises: TypeError – If providing a non-string value.

property file_name : str

Name of the file.
  • Return type: str

Numeric attribute values

class ParameterizedPointValue(value, parameters=<factory>)

Represents a point value with parameters in a multi-valued point attribute value.

Examples

Point with no parameters:
Point with parameters:
Point with precision information and parameters:

classmethod from_data(value, parameters=None)

Alternative constructor to create ParameterizedPointValue from more general data types.

parameters : tuple[PointParameterValue, …]

Tuple of PointParameterValue objects.

property parameters_by_name : mappingproxy[str, str | float]

Returns a read-only mapping of parameter values by name.

value : float | ValueWithPrecision

The point float value.

class PointParameterValue(name, value)

Parameter value for a point in a multi-valued point value.
  • Parameters:
    • name (str) – The name of the parameter.
    • value (float | str) – The value of the parameter. This must be a float for numeric parameters, or str for discrete parameters.

Examples

Numeric parameter:
Discrete parameter:

classmethod from_data(name, value)

Alternative constructor to create PointParameterValue from more general data types.
  • Parameters:
    • name (str) – The name of the parameter.
    • value (SupportsFloat | str) – The value of the parameter. This must be a ‘float’-like for numeric parameters, or a ‘str’ for discrete parameters.
  • Return type: PointParameterValue

name : str

The name of the parameter.

value : float | 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 | ValueWithPrecision | None) – The lower bound value. Use None for an open-ended range.
    • high (float | ValueWithPrecision | None) – The upper bound value. Use None for an open-ended range.
    • low_value_is_inclusive (bool , optional) – Whether the low value is included in the range. Defaults to True. This property should only be set if the low property has a value. If low is None, this property has no effect on imported data.
    • high_value_is_inclusive (bool , optional) – Whether the high value is included in the range. Defaults to True. This property should only be set if the high property has a value. If high is None, this property has no effect on imported data.

Examples

Range with default inclusiveness and values for the lower and upper bounds:
Range value using significant figures and specifying inclusiveness:
Open-ended range:

classmethod from_data(value, low_value_is_inclusive=True, high_value_is_inclusive=True)

Create a Range from data in various formats.
  • Parameters:
    • value (Range_Value_Type) – Low and high values.
    • low_value_is_inclusive (bool , optional) – Whether the low value is included in the range. Defaults to True.
    • high_value_is_inclusive (bool , optional) – Whether the high value is included in the range. Defaults to True.
  • Returns: The created Range object.
  • Return type: Range

Examples

From a dictionary with keys low and high:
From a tuple:
From a list of integers:
From a single float value:

property as_dict : dict[str, float | ValueWithPrecision | None]

Returns a dictionary representation of the range value with low and high keys.

high : float | ValueWithPrecision | None

The upper bound value.

high_value_is_inclusive : bool = True

Whether the high value is included in the range. This property should only be set if the high property has a value. If high is None, this property has no effect on imported data.

low : float | ValueWithPrecision | None

The lower bound value.

low_value_is_inclusive : bool = True

Whether the low value is included in the range. This property should only be set if the low property has a value. If low is None, this property has no effect on imported data.

Range_Value_Type

Valid values for use with Range.from_data(). Alias of:

Range_Extrema_Value_Type

alias of SupportsFloat | ValueWithPrecision | 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 or int) – Float value.
    • number_of_digits (int) – Number of significant decimal places.
  • Raises: 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

Return a Decimal representation of the floating point value with the configured precision.

Examples

property number_of_digits : int

Number of significant decimal places.
  • Return type: int

property significant_figures : 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

Examples

property value : float

Floating point value.

class TrailingZeroInformation

Trailing zero information for an exported attribute value.
  • Parameters:
    • entered_value (str) – String representation of the imported floating-point value.
    • entered_unit (str) – Unit symbol of the entered value.
    • significant_figures (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 to create values with precision information.

property as_decimal : Decimal

Return a Decimal representation of the value.

Examples

2 m, measured to a precision of 1 mm:

property entered_unit : str

Unit symbol in which the value with trailing zero information was imported.
  • Return type: str

property entered_value : str

String representation of the floating point value.
  • Return type: str

property number_of_digits : int

Number of digits, computed from the entered value and significant figures.
  • Return type: int

property significant_figures : int

Number of significant digits in the value, including trailing zeros.
  • Return type: int

Functional attribute values

class SeriesPoint(*, x, is_estimated=None, decoration=GraphDecoration.LINES, y, parameters=<factory>)

Data that represents the value of a point series functional attribute. This class is a frozen dataclass.

Examples

Series with no extra parameters:
Series with additional parameters, all points marked as estimated, and using markers as the display type:

classmethod from_data(x, y, is_estimated=None, parameters=None, decoration=None)

Alternative constructor to create SeriesPoint from more general data types.
  • Parameters:
    • x (Sequence *[*SupportsFloat ] | Sequence [str ]) – Sequence of x-axis parameter values.
    • y (Sequence *[*SupportsFloat ]) – Sequence of values for the y-axis.
    • is_estimated (Sequence [bool ] , optional) – Whether values are estimated. Defaults to None, which results in all points being marked as not estimated.
    • parameters (Sequence [SeriesParameterValue ] , optional) – Sequence of SeriesParameterValue objects.
    • decoration (GraphDecoration , optional) – Graph decoration style.
  • Return type: SeriesPoint

decoration : GraphDecoration = ‘Lines’

GraphDecoration style.

is_estimated : tuple[bool, …] = None

Whether points are estimated. Defaults to a tuple of False values.

parameters : tuple[SeriesParameterValue, …]

Tuple of SeriesParameterValue objects.

property parameters_by_name : mappingproxy[str, str | float]

Returns a read-only mapping of parameter values by name.

x : tuple[float, …] | tuple[str, …]

Tuple of x-axis parameter values.

y : tuple[float, …]

Tuple of y-axis values.

class SeriesRange(*, x, is_estimated=None, decoration=GraphDecoration.LINES, y_low, y_high, parameters=<factory>)

Data that represents the value of a range series functional attribute. This class is a frozen dataclass.
  • Parameters:
    • x (tuple [float , … ] | tuple [str , … ]) – Tuple of x-axis parameter values.
    • y_low (tuple [float , … ]) – Tuple of values for the y-axis lower bound. Must be the same length as the x parameter.
    • y_high (tuple [float , … ]) – Tuple of values for the y-axis upper bound. Must be the same length as the x parameter.
    • is_estimated (tuple [bool , … ] , optional) – Whether points are estimated. Defaults to a tuple of False values. If provided, must be a tuple of bool values and must be the same length as the x, y_low, and y_high parameters.
    • parameters (tuple [SeriesParameterValue , … ] , optional) – Tuple of SeriesParameterValue objects.
    • decoration (GraphDecoration , optional) – GraphDecoration style. Defaults to GraphDecoration.LINES.

Examples

Series with no extra parameters:
Series with additional parameters, all points marked as estimated, and using markers as the display type:

classmethod from_data(x, y_low, y_high, is_estimated=None, parameters=None, decoration=None)

Alternative constructor to create SeriesRange from more general data types.
  • Parameters:
    • x (Sequence *[*SupportsFloat ] | Sequence [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 ] , optional) – Whether values are estimated. Defaults to None, which results in all points being marked as not estimated.
    • parameters (Sequence [SeriesParameterValue ] , optional) – Sequence of SeriesParameterValue objects.
    • decoration (GraphDecoration , optional) – Graph decoration style.
  • Return type: SeriesRange

decoration : GraphDecoration = ‘Lines’

GraphDecoration style.

is_estimated : tuple[bool, …] = None

Whether points are estimated. Defaults to a tuple of False values.

parameters : tuple[SeriesParameterValue, …]

Tuple of SeriesParameterValue objects.

property parameters_by_name : mappingproxy[str, str | float]

Returns a read-only mapping of parameter values by name.

x : tuple[float, …] | tuple[str, …]

Tuple of x-axis parameter values.

y_high : tuple[float, …]

Tuple of values for the y-axis upper bound.

y_low : tuple[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 or SeriesRange it is assigned to. This class is a frozen dataclass.
  • Parameters:
    • name (str) – The name of the parameter.
    • value (float | str) – The value of the parameter. This must be a ‘float’ for numeric parameters, or a ‘str’ for discrete parameters.

Examples

classmethod from_data(name, value)

Alternative constructor to create SeriesParameterValue from more general data types.
  • Parameters:
    • name (str) – The name of the parameter.
    • value (SupportsFloat | str) – The value of the parameter. This must be a ‘float’-like for numeric parameters, or a ‘str’ for discrete parameters.
  • Return type: SeriesParameterValue

name : str

The name of the parameter.

value : float | 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=<factory>)

Multi-dimensional data that represents the value of a point grid functional attribute. This class is a frozen dataclass.

Examples

Grid with no parameters:
Grid with additional parameters, all points marked as estimated, and using markers as the display type:

__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) – The other grid to concatenate with this grid.
  • Returns: New instance with merged data from both input grids.
  • Return type: GridPoint

Examples

classmethod from_data(x, y, is_estimated=None, parameters=None, decoration=None)

Alternative constructor to create GridPoint from more general data types.
  • Parameters:
    • x (Sequence *[*SupportsFloat ] | Sequence [str ]) – Sequence of x-axis parameter values.
    • y (Sequence *[*SupportsFloat ]) – Sequence of values for the y-axis.
    • is_estimated (Sequence [bool ] , optional) – Whether values are estimated. Defaults to None, which results in all points being marked as not estimated.
    • parameters (Sequence [GridParameterValues ] , optional) – Sequence of GridParameterValues objects.
    • decoration (GraphDecoration , optional) – Graph decoration style.

decoration : GraphDecoration = ‘Lines’

GraphDecoration style.

is_estimated : tuple[bool, …] = None

Whether points are estimated. Defaults to a tuple of False values.

parameters : tuple[GridParameterValues, …]

Tuple of GridParameterValues objects.

property parameters_by_name : mappingproxy[str, tuple[str, …] | tuple[float, …]]

Returns a read-only mapping of parameter values by name.

x : tuple[float, …] | tuple[str, …]

Tuple of x-axis parameter values.

y : tuple[float, …]

Tuple of y-axis values.

class GridRange(*, x, is_estimated=None, decoration=GraphDecoration.LINES, y_low, y_high, parameters=<factory>)

Multi-dimensional data that represents the value of a range grid functional attribute. This class is a frozen dataclass.
  • Parameters:
    • x (tuple [float , … ] | tuple [str , … ]) – Tuple of x-axis parameter values.
    • y_low (tuple [float , … ]) – Tuple of values for the y-axis lower bound. Must be the same length as the x parameter.
    • y_high (tuple [float , … ]) – Tuple of values for the y-axis upper bound. Must be the same length as the x parameter.
    • is_estimated (tuple [bool , … ] , optional) – Whether points are estimated. Defaults to a tuple of False values. If provided, must be a tuple of bool values and must be the same length as the x, y_low, and “y_high` parameters.
    • parameters (tuple [GridParameterValues , … ] , optional) – Tuple of GridParameterValues objects.
    • decoration (GraphDecoration , optional) – GraphDecoration style. Defaults to GraphDecoration.LINES.

Examples

Grid with no parameters:
Grid with additional parameters, all points marked as estimated, and using markers as the display type:

__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) – The other grid to concatenate with this grid.
  • Returns: New instance with merged data from both input grids.
  • Return type: GridRange

Examples

classmethod from_data(x, y_low, y_high, is_estimated=None, parameters=None, decoration=None)

Alternative constructor to create GridRange from more general data types.
  • Parameters:
    • x (Sequence *[*SupportsFloat ] | Sequence [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 ] , optional) – Whether values are estimated. Defaults to None, which results in all points being marked as not estimated.
    • parameters (Sequence [GridParameterValues ] , optional) – Sequence of GridParameterValues objects.
    • decoration (GraphDecoration , optional) – Graph decoration style.

decoration : GraphDecoration = ‘Lines’

GraphDecoration style.

is_estimated : tuple[bool, …] = None

Whether points are estimated. Defaults to a tuple of False values.

parameters : tuple[GridParameterValues, …]

Tuple of GridParameterValues objects.

property parameters_by_name : mappingproxy[str, tuple[str, …] | tuple[float, …]]

Returns a read-only mapping of parameter values by name.

x : tuple[float, …] | tuple[str, …]

Tuple of x-axis parameter values.

y_high : tuple[float, …]

Tuple of values for the y-axis upper bound.

y_low : tuple[float, …]

Tuple of values for the y-axis lower bound.

class GridParameterValues(name, values)

Parameter values for a functional grid. When assigned to GridPoint or GridRange, there must be as many parameter values as xy value pairs in the grid. This class is a frozen dataclass.
  • Parameters:
    • name (str) – Name of the parameter.
    • values (tuple [float , … ] | tuple [str , … ]) – Tuple of values for the parameter. float for numeric parameters, str for discrete parameters.

Examples

classmethod from_data(name, values)

Alternative constructor to create GridParameterValues from more general data types.
  • Parameters:
    • name (str) – The name of the parameter.
    • values (Sequence *[*SupportsFloat ] | Sequence [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

name : str

Name of the parameter.

values : tuple[float, …] | tuple[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.

property data_by_column : dict[str, list[float] | list[str], list[bool], list[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.

Examples

For a functional attribute named Stress-Strain (Ranged), with an X-axis of Strain and an additional parameter Temperature:

property parameter_column_index : dict[str, int]

Mapping of parameter names to index in the column_headers.

property table_view : list[list[str | float | bool | None]]

Value returned by AttributeFunctionalSeriesPoint.value in Scripting Toolkit versions earlier than 5.0. Modifying the view has no effect on the underlying attribute value.

Examples

For a functional attribute named Stress-Strain, with an X-axis of Strain and an additional parameter Temperature:

property table_view_with_series_number : list[list[str | float | bool | None | 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.

Examples

For a functional attribute named Stress-Strain, with an X-axis of Strain and an additional parameter Temperature:

class FunctionalSeriesRangeTableView

property column_headers

Column headers including units.

property data_by_column : dict[str, list[float] | list[str], list[bool], list[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.

Examples

For a functional attribute named Stress-Strain (Ranged), with an X-axis of Strain and an additional parameter Temperature:

property parameter_column_index : dict[str, int]

Mapping of parameter names to index in the column_headers.

property table_view : list[list[str | float | bool | None]]

Value returned by AttributeFunctionalSeriesRange.value in Scripting Toolkit versions earlier than 5.0. Modifying the returned value has no effect on the attribute value.

Examples

For a functional attribute named Stress-Strain (Ranged), with an X-axis of Strain and an additional parameter Temperature:

property table_view_with_series_number : list[list[str | float | bool | None | 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.

Examples

For a functional attribute named Stress-Strain (Ranged), with an X-axis of Strain and an additional parameter Temperature:

class FunctionalGridPointTableView

property column_headers

Column headers including units.

property data_by_column : dict[str, list[float] | list[str], list[bool], list[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.

Examples

For a functional attribute named Stress-Strain (Ranged), with an X-axis of Strain and an additional parameter Temperature:

property parameter_column_index : dict[str, int]

Mapping of parameter names to index in the column_headers.

property table_view : list[list[str | float | bool | None]]

Value returned by AttributeFunctionalGridPoint.value in Scripting Toolkit versions earlier than 5.0. Modifying the view has no effect on the underlying attribute value.

Examples

For a functional attribute named Stress-Strain, with an X-axis of Strain and an additional parameter Temperature:

class FunctionalGridRangeTableView

property column_headers

Column headers including units.

property data_by_column : dict[str, list[float] | list[str], list[bool], list[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.

Examples

For a functional attribute named Stress-Strain (Ranged), with an X-axis of Strain and an additional parameter Temperature:

property parameter_column_index : dict[str, int]

Mapping of parameter names to index in the column_headers.

property table_view : list[list[str | float | bool | None]]

Value returned by AttributeFunctionalGridRange.value by pre-v5.0 Scripting Toolkit versions. Modifying the view has no effect on the underlying attribute value.

Examples

For a functional attribute named Stress-Strain (Ranged), with an X-axis of Strain and an additional parameter Temperature:

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.