12/05 Granta Base Types#
The models documented in this section are Python bindings for the Granta Base Types 12/05 XML schema. These are typically used to define references to attributes and records in a Granta MI database.
Tip
Use the BoM reference builders to ensure a valid combination of properties are provided for the classes in this module.
Classes on this page are available in the module ansys.grantami.bomanalytics.bom_types.gbt1205
.
Changed in version 2.3: The types documented on this page have moved from ansys.grantami.bomanalytics.bom_types
to
ansys.grantami.bomanalytics.bom_types.gbt1205
. They are still importable from the old location for
compatibility.
- class PseudoAttribute(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)#
Valid values for PseudoAttribute.
- classmethod from_string(value)#
Convert string representation of this object into an instance of this object.
- Parameters:
- value: str
String representation of this object.
- class PartialTableReference(table_identity=None, table_guid=None, table_name=None)#
A type that partially identifies a Table, but does not specify the MI Database. 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.
- table_identity: int | None = None#
The identity of the table, this is the fastest way to reference a table.
- class MIAttributeReference(db_key, attribute_identity=None, table_reference=None, attribute_name=None, pseudo=None, is_standard=None)#
A type that allows identification of a particular Attribute in an MI Database. This may be done directly by specifying the Identity of the Attribute, or indirectly by specifying a lookup that will match (only) the Attribute.
Note: in certain cases, an MIAttributeReference may match more than one Attribute in the MI Database; depending on the operation, this may be legal or may result in a Fault.
- table_reference: PartialTableReference | None = None#
A reference to the table hosting the attribute. Required if
attribute_name
is specified andis_standard
is not True.
- pseudo: PseudoAttribute | None = None#
The pseudo-attribute type if referring to a pseudo-attribute.
- class MIRecordReference(db_key, record_history_identity=None, record_version_number=None, record_guid=None, record_history_guid=None, lookup_attribute_reference=None, lookup_value=None, record_uid=None)#
A type that allows identification of a particular Record in an MI Database. This may be done directly by specifying the Identity or GUID of the Record, or indirectly by specifying a lookup that will match (only) the Record.
For input, you should provide exactly one of either identity, recordGUID, recordHistoryGUID or lookupValue. If more than one element identifying the record is given, only one is used; the descending order of priority is: identity, recordGUID, recordHistoryGUID, lookupValue. The Service Layer does not check that the several elements identifying the record are all referencing the same record, it just picks the highest-priority one and uses that.
- record_history_identity: int | None = None#
This is the best-performing and highest-priority way to reference a record; however, identities might not be suitable for long-term persistence.
- record_version_number: int | None = None#
If omitted, this means the latest version visible to the user.
- record_guid: str | None = None#
Identifies a particular version of a record by its GUID, this is a more persistent way to refer to a record.
- record_history_guid: str | None = None#
Identifies a record history, the latest visible version will be returned.
record_version_number
has no effect on references that userecord_history_guid
.
- lookup_attribute_reference: MIAttributeReference | None = None#
When provided in combination with
lookup_value
identifies a record by a unique short-text attribute. Specifies the attribute to be used for the lookup operation.