diff --git a/2025R2/scripting-toolkit-dev-portal-25r2/changelog.md b/2025R2/scripting-toolkit-dev-portal-25r2/changelog.md index 108942540f..8e62bd9ae8 100644 --- a/2025R2/scripting-toolkit-dev-portal-25r2/changelog.md +++ b/2025R2/scripting-toolkit-dev-portal-25r2/changelog.md @@ -4,61 +4,31 @@ - + -## Release notes - -This section describes the key features introduced or improved in MI Scripting Toolkit 4.2. - - - -### Highlights - - - -#### Highlight 1 +## MI Scripting Toolkit 4.2 release notes -##### Enhancements - - - -##### Backwards incompatible API changes - - - -#### Highlight 2 +### Enhancements - - -##### Enhancements - - - -##### Backwards incompatible API changes - - - -### Streamlined API enhancements and bug fixes - - - -#### Enhancements - -* [`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). -* 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. * [`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 +### 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 @@ -68,47 +38,49 @@ This section describes the key features introduced or improved in MI Scripting T 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. -* 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). -* 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. -* [`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. -#### Examples +### Examples - +There have been no changes to example scripts in MI Scripting Toolkit 4.2. -### Foundation API enhancements and bug fixes + -* [`GetRecordAttributesByRefRequest.tabularDataSettings`](foundation/api.md#GRANTA_MIScriptingToolkit.GetRecordAttributesByRefRequest.GetRecordAttributesByRefRequest.tabularDataSettings) added to control how tabular attributes are exported. -* 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. +### Backwards incompatible API changes - +There are no known backwards-incompatible changes in MI Scripting Toolkit 4.2. -### Backwards incompatible API changes + - +### Foundation API changes -#### Streamlined API +* 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 +## 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: @@ -128,12 +100,6 @@ This section describes the key features introduced or improved in MI Scripting T - Picture - Point - Tabular -* 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. * 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 @@ -152,38 +118,37 @@ This section describes the key features introduced or improved in MI Scripting T This section describes deprecated functionality which will be removed or changed in a future release. - + -### Version 4.2 +### Functionality deprecated with version 4.2 | Deprecated functionality | Recommended replacement / future functionality | |-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| [`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.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. | -| [`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. | +| [`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. | -| [`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. | | [`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. | -| 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`. | -| Method [`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). | -| 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). | +| [`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. | - + -### Version 4.1 +### 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. | -| [`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) | | [`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) | @@ -195,6 +160,7 @@ This section describes deprecated functionality which will be removed or changed | 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). | @@ -203,6 +169,12 @@ This section describes deprecated functionality which will be removed or changed 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 @@ -330,12 +302,6 @@ Job Queue functionality, you should continue to use MI Scripting Toolkit v3.3. ### Upgrading from MI Scripting Toolkit for Python Version 2.X - - -#### Backwards-incompatible API changes - -Scripts written for MI Scripting Toolkit v2.x will need to be modified due to the following breaking changes: - #### New `store_password` option on the [`Session`](api/session.md#GRANTA_MIScriptingToolkit.granta.mi.Session) class diff --git a/2025R2/scripting-toolkit-dev-portal-25r2/copyright.md b/2025R2/scripting-toolkit-dev-portal-25r2/copyright.md index 6f123adea9..d0d309fed8 100644 --- a/2025R2/scripting-toolkit-dev-portal-25r2/copyright.md +++ b/2025R2/scripting-toolkit-dev-portal-25r2/copyright.md @@ -42,4 +42,4 @@ third-party software. If you are unable to access the Legal Notice, contact ANSY Published in the U.S.A. -[View third-party licenses](https://innovationspace.ansys.com/wp-content/uploads/granta/2025R1/miscriptingtoolkit/) +[View third-party licenses](https://innovationspace.ansys.com/wp-content/uploads/granta/2025R2/miscriptingtoolkit/) diff --git a/2025R2/scripting-toolkit-dev-portal-25r2/getting_started/pip.md b/2025R2/scripting-toolkit-dev-portal-25r2/getting_started/pip.md index 4bd7131c35..5ae42f95c0 100644 --- a/2025R2/scripting-toolkit-dev-portal-25r2/getting_started/pip.md +++ b/2025R2/scripting-toolkit-dev-portal-25r2/getting_started/pip.md @@ -83,25 +83,40 @@ To determine the full requirements at a particular point in time, install the Sc environment (see [https://docs.python.org/3/library/venv.html](https://docs.python.org/3/library/venv.html) for details), and then use `pip list` or `pip freeze` to display the installed packages. +These third-party packages are not provided with MI Scripting Toolkit, but **must** be installed before use. Follow the +installation instructions in [Installing and upgrading MI Scripting Toolkit](#installing-and-upgrading-pip) to automatically download compatible versions of these +packages from [PyPI](https://pypi.org/) and install them alongside MI Scripting Toolkit. To install MI Scripting Toolkit without access to PyPI, see +[Offline installation](#offline-installation-pip). + + + +### Installation preparation + +MI Scripting Toolkit is provided as a zip file, and is available from the Downloads page on the Ansys Customer Portal. All +instructions on this page assume a Windows environment, and that the zip file has been downloaded and unzipped to the +location `C:\Users\user\scripting_toolkit`. Replace this path as required for your environment. + +To install MI Scripting Toolkit in a Linux environment, replace the example Windows path with the appropriate Linux path. For +example, the path `C:\Users\user\scripting_toolkit\pip` in Windows would be equivalent to +`/home/user/scripting_toolkit/pip` on Linux. + + + ## Installing and upgrading MI Scripting Toolkit -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` on Linux, or `C:\Users\user\scripting_toolkit` on Windows. - -It is recommended to install MI Scripting Toolkit in a virtual environment. If you are installing MI Scripting Toolkit in an activated virtual -environment, enter the following (on Windows, replace the file path with `C:\Users\user\scripting_toolkit\pip`): +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=/home/user/scripting_toolkit/pip +$ pip install --upgrade granta_miscriptingtoolkit --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=/home/user/scripting_toolkit/pip +$ path/to/python -m pip install --upgrade granta_miscriptingtoolkit --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. @@ -121,13 +136,13 @@ To install an extra, include the extra name after the package name when installi MI Scripting Toolkit with the additional notebook dependencies: ```default -$ pip install --upgrade granta_miscriptingtoolkit[notebooks] --find-links=/home/user/scripting_toolkit/pip +$ pip install --upgrade granta_miscriptingtoolkit[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=/home/user/scripting_toolkit/pip +$ pip install --upgrade granta_miscriptingtoolkit[notebooks,oidc] --find-links="C:\Users\user\scripting_toolkit\pip" ``` The `[notebooks]` extra includes the following additional dependencies: @@ -178,3 +193,28 @@ Or if you are using a Python environment which is not available on the path: ```default $ path/to/python -m pip uninstall miscriptingtoolkit ``` + + + + + +## Offline installation + +To install MI Scripting Toolkit without access to PyPI, first download the required third-party dependencies using a Python +environment with PyPI access. Enter the following into the command line to download the wheels into the +`C:\Users\user\all_wheels` directory: + +```default +$ pip download GRANTA_MIScriptingToolkit --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" +``` + +These instructions describe how to download the required packages for the current platform only. To download packages +for a different platform, for example to download Linux wheels in a Windows environment, see the +[pip download](https://pip.pypa.io/en/stable/cli/pip_download/) documentation. diff --git a/2025R2/scripting-toolkit-dev-portal-25r2/index.md b/2025R2/scripting-toolkit-dev-portal-25r2/index.md index 33302c8f43..1eecca48e0 100644 --- a/2025R2/scripting-toolkit-dev-portal-25r2/index.md +++ b/2025R2/scripting-toolkit-dev-portal-25r2/index.md @@ -2,6 +2,8 @@ +MI Scripting Toolkit provides a clean and intuitive Python interface for working with Granta MI. + * [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 diff --git a/2025R2/scripting-toolkit-dev-portal-25r2/notebooks/index.md b/2025R2/scripting-toolkit-dev-portal-25r2/notebooks/index.md index 102002ef42..ced98f5c86 100644 --- a/2025R2/scripting-toolkit-dev-portal-25r2/notebooks/index.md +++ b/2025R2/scripting-toolkit-dev-portal-25r2/notebooks/index.md @@ -17,15 +17,8 @@ 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`. -Minor versions of these packages are typically compatible with a single version of Granta MI only, -so they are not provided as part of the `[notebooks]` extra described above. To easily identify the -correct package version for your version of Granta MI, the [PyGranta](https://pypi.org/project/pygranta/) meta-package can be used. For -example, installing `pygranta` v2024.2 will also install versions of `ansys-grantami-recordlists` -and `ansys-grantami-jobqueue` that are compatible with Granta MI 2024 R2. - -The [Package versions](https://grantami.docs.pyansys.com/version/dev/package_versions.html) -section of the PyGranta documentation describes which versions of packages are installed with each version of the -metapackage. +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/2025R2/scripting-toolkit-dev-portal-25r2/samples/data-analytics/04_Process_datasets_and_import.md b/2025R2/scripting-toolkit-dev-portal-25r2/samples/data-analytics/04_Process_datasets_and_import.md index f731659513..1b2096c567 100644 --- a/2025R2/scripting-toolkit-dev-portal-25r2/samples/data-analytics/04_Process_datasets_and_import.md +++ b/2025R2/scripting-toolkit-dev-portal-25r2/samples/data-analytics/04_Process_datasets_and_import.md @@ -414,11 +414,11 @@ yield_stress = y_0 + (-x_0) * (y_1 - y_0) / (x_1 - x_0) strain_at_yield = yield_stress / youngs_modulus + STRAIN_OFFSET yield_stress_MPa = yield_stress / 1e6 -print(f"0.2% offset yield stress: {yield_stress:.2f} MPa") +print(f"0.2% offset yield stress: {yield_stress_MPa:.2f} MPa") ``` *Previous cell output:* ```output -0.2% offset yield stress: 335555698.60 MPa +0.2% offset yield stress: 335.56 MPa ``` Plot the *0.2% offset yield stress* on the Stress-Strain plot. This time, plot the marker on both the full and inset axes, and annotate the inset. @@ -896,6 +896,6 @@ mi.update([record]) *Previous cell output:* ```output -[] +[] ``` diff --git a/2025R2/scripting-toolkit-dev-portal-25r2/samples/data-analytics/06_Calculate_statistics_for_records.md b/2025R2/scripting-toolkit-dev-portal-25r2/samples/data-analytics/06_Calculate_statistics_for_records.md index 848d36b666..3cc057f8d8 100644 --- a/2025R2/scripting-toolkit-dev-portal-25r2/samples/data-analytics/06_Calculate_statistics_for_records.md +++ b/2025R2/scripting-toolkit-dev-portal-25r2/samples/data-analytics/06_Calculate_statistics_for_records.md @@ -307,12 +307,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=85f8cea3-735d-4157-aea7-42aa5359108d' -Rollup completed for the specimen 'LBU14', view this record at 'http://my.server.name/mi/datasheet.aspx?dbKey=MI_Training&recordHistoryGuid=c928d243-c44f-45c0-ba73-312277c2c722' -Rollup completed for the specimen 'LBJ83', view this record at 'http://my.server.name/mi/datasheet.aspx?dbKey=MI_Training&recordHistoryGuid=f570eba1-7a0c-455e-b107-e7fda7f2c2f3' -Rollup completed for the specimen 'LBJ62', view this record at 'http://my.server.name/mi/datasheet.aspx?dbKey=MI_Training&recordHistoryGuid=04a7ee0e-392b-4d0e-a465-2f533422ee21' -Rollup completed for the specimen 'LBJ53', view this record at 'http://my.server.name/mi/datasheet.aspx?dbKey=MI_Training&recordHistoryGuid=1093c7f1-058e-4b69-ad6a-62d22d25210c' -Rollup completed for the specimen 'LBJ42', view this record at 'http://my.server.name/mi/datasheet.aspx?dbKey=MI_Training&recordHistoryGuid=8ce9868d-1e01-4877-b4ba-312e812a67c6' -Rollup completed for the specimen 'LBJ14', view this record at 'http://my.server.name/mi/datasheet.aspx?dbKey=MI_Training&recordHistoryGuid=4658930d-c9f9-4471-8baf-e6bf80b7d1e9' -Rollup completed for the specimen 'LBJ13', view this record at 'http://my.server.name/mi/datasheet.aspx?dbKey=MI_Training&recordHistoryGuid=778f3c0b-6842-4be9-92fe-3b3195fe1107' +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' ``` \ No newline at end of file diff --git a/2025R2/scripting-toolkit-dev-portal-25r2/samples/data-analytics/06_Calculate_statistics_for_records_files/06_Calculate_statistics_for_records_12_0.png b/2025R2/scripting-toolkit-dev-portal-25r2/samples/data-analytics/06_Calculate_statistics_for_records_files/06_Calculate_statistics_for_records_12_0.png index 94897b320f..cd0e21c8fd 100644 Binary files a/2025R2/scripting-toolkit-dev-portal-25r2/samples/data-analytics/06_Calculate_statistics_for_records_files/06_Calculate_statistics_for_records_12_0.png and b/2025R2/scripting-toolkit-dev-portal-25r2/samples/data-analytics/06_Calculate_statistics_for_records_files/06_Calculate_statistics_for_records_12_0.png differ diff --git a/2025R2/scripting-toolkit-dev-portal-25r2/samples/data-analytics/12_Preparing_data_for_Power_BI.md b/2025R2/scripting-toolkit-dev-portal-25r2/samples/data-analytics/12_Preparing_data_for_Power_BI.md index 97aa491f15..36d537cdd1 100644 --- a/2025R2/scripting-toolkit-dev-portal-25r2/samples/data-analytics/12_Preparing_data_for_Power_BI.md +++ b/2025R2/scripting-toolkit-dev-portal-25r2/samples/data-analytics/12_Preparing_data_for_Power_BI.md @@ -47,15 +47,15 @@ report, to avoid breaching organizational data confidentiality policies. 1. Create a new ``Python Script`` Source in Power BI via the ``Get Data`` button. - ![The list of data providers is filtered to show only Python, and "Python script" is selected.](assets/12_power-bi-python.PNG) + ![The list of data providers is filtered to show only Python, and "Python script" is selected.](assets/12_power-bi-python.png) 2. Copy the content of the script cell below into the ``Script`` input. - ![The "Script" input containing MI Scripting Toolkit Python code.](assets/12_power-bi-python-setup.PNG) + ![The "Script" input containing MI Scripting Toolkit Python code.](assets/12_power-bi-python-setup.png) 3. Update the connection URL and authentication method appropriately. 4. Click `OK` to validate the script definition. Power BI will execute the script and report errors, if any. 5. Select which DataFrames to import as datasets. Click the `Load` button to confirm. - ![A list of Pandas DataFrame objects are shown on the left, and a preview of the "tables" DataFrame is shown on the right.](assets/12_power-bi-dataframes-loading.PNG) + ![A list of Pandas DataFrame objects are shown on the left, and a preview of the "tables" DataFrame is shown on the right.](assets/12_power-bi-dataframes-loading.png) 6. Verify that column types and dataset relationships are correctly defined. 7. Build your report visualizations. diff --git a/2025R2/scripting-toolkit-dev-portal-25r2/samples/foundation/04_Deleting_records.md b/2025R2/scripting-toolkit-dev-portal-25r2/samples/foundation/04_Deleting_records.md index 73bae45465..5ebb71949c 100644 --- a/2025R2/scripting-toolkit-dev-portal-25r2/samples/foundation/04_Deleting_records.md +++ b/2025R2/scripting-toolkit-dev-portal-25r2/samples/foundation/04_Deleting_records.md @@ -43,7 +43,7 @@ print(f'Imported record "{imported_records[0].longName}" to table "{table_name}" ``` *Previous cell output:* ```output -Imported record "Scripting toolkit foundation layer example 04:Thu Apr 24 22:57:24 2025" to table "Tensile Test Data" +Imported record "Scripting toolkit foundation layer example 04:Mon May 12 16:19:46 2025" to table "Tensile Test Data" ``` Now let's delete it! @@ -58,5 +58,5 @@ print(f"Record {imported_records[0].longName} was deleted") ``` *Previous cell output:* ```output -Record Scripting toolkit foundation layer example 04:Thu Apr 24 22:57:24 2025 was deleted +Record Scripting toolkit foundation layer example 04:Mon May 12 16:19:46 2025 was deleted ``` \ No newline at end of file diff --git a/2025R2/scripting-toolkit-dev-portal-25r2/samples/foundation/05_Functional_data_and_importing_data.md b/2025R2/scripting-toolkit-dev-portal-25r2/samples/foundation/05_Functional_data_and_importing_data.md index 236c4dc300..51a19b4fd4 100644 --- a/2025R2/scripting-toolkit-dev-portal-25r2/samples/foundation/05_Functional_data_and_importing_data.md +++ b/2025R2/scripting-toolkit-dev-portal-25r2/samples/foundation/05_Functional_data_and_importing_data.md @@ -181,7 +181,7 @@ ax.legend() *Previous cell output:* ```output - + ``` @@ -276,5 +276,5 @@ for record in setRecordAttributesResponse.recordsImported: ``` *Previous cell output:* ```output -Imported record Scripting toolkit foundation layer example 05:Thu Apr 24 22:57:51 2025 to Granta MI database +Imported record Scripting toolkit foundation layer example 05:Mon May 12 16:20:13 2025 to Granta MI database ``` \ No newline at end of file diff --git a/2025R2/scripting-toolkit-dev-portal-25r2/samples/foundation/06_Importing_and_exporting_tabular_data.md b/2025R2/scripting-toolkit-dev-portal-25r2/samples/foundation/06_Importing_and_exporting_tabular_data.md index c1d1a61d90..fe7ed43474 100644 --- a/2025R2/scripting-toolkit-dev-portal-25r2/samples/foundation/06_Importing_and_exporting_tabular_data.md +++ b/2025R2/scripting-toolkit-dev-portal-25r2/samples/foundation/06_Importing_and_exporting_tabular_data.md @@ -206,7 +206,7 @@ print(recName) ``` *Previous cell output:* ```output -Scripting toolkit foundation layer example 06:Thu Apr 24 22:58:24 2025 +Scripting toolkit foundation layer example 06:Mon May 12 16:20:48 2025 ``` Import the record to a Granta MI database. @@ -287,5 +287,5 @@ print( ``` *Previous cell output:* ```output -Use MI Viewer to view Scripting toolkit foundation layer example 06:Thu Apr 24 22:58:24 2025 and check that the Order in 'Characterization of this material' is 1000 +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 ``` \ No newline at end of file diff --git a/2025R2/scripting-toolkit-dev-portal-25r2/samples/foundation/07_Modified_date.md b/2025R2/scripting-toolkit-dev-portal-25r2/samples/foundation/07_Modified_date.md index 384d135409..17006d7043 100644 --- a/2025R2/scripting-toolkit-dev-portal-25r2/samples/foundation/07_Modified_date.md +++ b/2025R2/scripting-toolkit-dev-portal-25r2/samples/foundation/07_Modified_date.md @@ -91,5 +91,5 @@ for record in exported_data: *Previous cell output:* ```output "Ansys Granta 1" imported the record on 2023-09-20T12:11:05.873 -The record was last modified on 2025-04-24T22:58:49.89 by "ANSYS\mi-sw-admin" +The record was last modified on 2025-05-12T16:21:14.687 by "ANSYS\mi-sw-admin" ``` \ No newline at end of file diff --git a/2025R2/scripting-toolkit-dev-portal-25r2/samples/foundation/09_Modifying_record_link_groups.md b/2025R2/scripting-toolkit-dev-portal-25r2/samples/foundation/09_Modifying_record_link_groups.md index 055198e741..7e564c4ddb 100644 --- a/2025R2/scripting-toolkit-dev-portal-25r2/samples/foundation/09_Modifying_record_link_groups.md +++ b/2025R2/scripting-toolkit-dev-portal-25r2/samples/foundation/09_Modifying_record_link_groups.md @@ -120,5 +120,5 @@ 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) -> 2fb527ec-9389-431c-9d34-cc3a71bef19f (Scripting toolkit foundation layer example 09:Thu Apr 24 22:59:30 2025) +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) ``` \ No newline at end of file diff --git a/2025R2/scripting-toolkit-dev-portal-25r2/samples/foundation/11_Get_unit_conversions.md b/2025R2/scripting-toolkit-dev-portal-25r2/samples/foundation/11_Get_unit_conversions.md index 6545a661ae..80c0dfbad5 100644 --- a/2025R2/scripting-toolkit-dev-portal-25r2/samples/foundation/11_Get_unit_conversions.md +++ b/2025R2/scripting-toolkit-dev-portal-25r2/samples/foundation/11_Get_unit_conversions.md @@ -72,212 +72,212 @@ 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/2025R2/scripting-toolkit-dev-portal-25r2/samples/streamlined/05_Edit_Data.md b/2025R2/scripting-toolkit-dev-portal-25r2/samples/streamlined/05_Edit_Data.md index 227b2f99f9..5753265cd0 100644 --- a/2025R2/scripting-toolkit-dev-portal-25r2/samples/streamlined/05_Edit_Data.md +++ b/2025R2/scripting-toolkit-dev-portal-25r2/samples/streamlined/05_Edit_Data.md @@ -44,7 +44,7 @@ record, folder *Previous cell output:* ```output -(, +(, ) ``` @@ -119,7 +119,7 @@ print(f"Record Name: {record.name}, State: {record.release_state}") ``` *Previous cell output:* ```output -Record Name: Scripting Toolkit Example 5:Thu Apr 24 22:50:31 2025, State: Unreleased +Record Name: Scripting Toolkit Example 5:Mon May 12 16:11:34 2025, 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 +143,7 @@ print(f'Record Name: "{record.name}", State: "{record.release_state}"') ``` *Previous cell output:* ```output -Record Name: "Scripting Toolkit Example 5:Thu Apr 24 22:50:31 2025", State: "Released" +Record Name: "Scripting Toolkit Example 5:Mon May 12 16:11:34 2025", 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 +157,7 @@ record.all_versions *Previous cell output:* ```output -{'v1': } +{'v1': } ``` @@ -200,7 +200,7 @@ print(f'"Record Name: {record.name}", State: "{record.release_state}"') ``` *Previous cell output:* ```output -"Record Name: Scripting Toolkit Example 5:Thu Apr 24 22:50:31 2025", State: "Released" +"Record Name: Scripting Toolkit Example 5:Mon May 12 16:11:34 2025", 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 +214,8 @@ record.all_versions *Previous cell output:* ```output -{'v1': , - 'v2': } +{'v1': , + 'v2': } ``` diff --git a/2025R2/scripting-toolkit-dev-portal-25r2/samples/streamlined/06_Create_Records.md b/2025R2/scripting-toolkit-dev-portal-25r2/samples/streamlined/06_Create_Records.md index dde8f510dc..333d96adb2 100644 --- a/2025R2/scripting-toolkit-dev-portal-25r2/samples/streamlined/06_Create_Records.md +++ b/2025R2/scripting-toolkit-dev-portal-25r2/samples/streamlined/06_Create_Records.md @@ -35,11 +35,11 @@ new_records *Previous cell output:* ```output -[, - , - , - , - ] +[, + , + , + , + ] ``` @@ -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=a5d09746-e913-461e-95ed-c1e99dd47417 -http://my.server.name/mi/datasheet.aspx?dbKey=MI_Training&recordHistoryGuid=568f97ec-7a71-4930-bc4f-d93a88f5628c -http://my.server.name/mi/datasheet.aspx?dbKey=MI_Training&recordHistoryGuid=90302b6b-cdff-4dbe-b02e-eeb0fcfd5757 -http://my.server.name/mi/datasheet.aspx?dbKey=MI_Training&recordHistoryGuid=439e3fb4-e63e-46da-b2df-956f90321c4c -http://my.server.name/mi/datasheet.aspx?dbKey=MI_Training&recordHistoryGuid=5d991280-8654-4c2a-9326-d9a6ac01458e +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 ``` ## Delete the records ``Session.bulk_delete_or_withdraw_records`` accepts any list of records (e.g. results of a search, diff --git a/2025R2/scripting-toolkit-dev-portal-25r2/samples/streamlined/07_Import_Functional_Data.md b/2025R2/scripting-toolkit-dev-portal-25r2/samples/streamlined/07_Import_Functional_Data.md index 0733268a7b..549a581291 100644 --- a/2025R2/scripting-toolkit-dev-portal-25r2/samples/streamlined/07_Import_Functional_Data.md +++ b/2025R2/scripting-toolkit-dev-portal-25r2/samples/streamlined/07_Import_Functional_Data.md @@ -39,7 +39,7 @@ rec *Previous cell output:* ```output - + ``` @@ -253,6 +253,6 @@ mi.update([rec]) *Previous cell output:* ```output -[] +[] ``` diff --git a/2025R2/scripting-toolkit-dev-portal-25r2/samples/streamlined/08_Create_Functional_Data.md b/2025R2/scripting-toolkit-dev-portal-25r2/samples/streamlined/08_Create_Functional_Data.md index a2ed6da68e..fad669bed2 100644 --- a/2025R2/scripting-toolkit-dev-portal-25r2/samples/streamlined/08_Create_Functional_Data.md +++ b/2025R2/scripting-toolkit-dev-portal-25r2/samples/streamlined/08_Create_Functional_Data.md @@ -421,6 +421,6 @@ mi.update([record]) *Previous cell output:* ```output -[] +[] ``` diff --git a/2025R2/scripting-toolkit-dev-portal-25r2/samples/streamlined/09_Edit_Tabular_Data.md b/2025R2/scripting-toolkit-dev-portal-25r2/samples/streamlined/09_Edit_Tabular_Data.md index d6bd12854b..9165b1ec50 100644 --- a/2025R2/scripting-toolkit-dev-portal-25r2/samples/streamlined/09_Edit_Tabular_Data.md +++ b/2025R2/scripting-toolkit-dev-portal-25r2/samples/streamlined/09_Edit_Tabular_Data.md @@ -167,6 +167,6 @@ mi.update_links([new_rec]) *Previous cell output:* ```output -[] +[] ``` diff --git a/2025R2/scripting-toolkit-dev-portal-25r2/samples/streamlined/11_Add_Files_Pictures_and_Hyperlinks.md b/2025R2/scripting-toolkit-dev-portal-25r2/samples/streamlined/11_Add_Files_Pictures_and_Hyperlinks.md index ea7449f877..c3bd725f39 100644 --- a/2025R2/scripting-toolkit-dev-portal-25r2/samples/streamlined/11_Add_Files_Pictures_and_Hyperlinks.md +++ b/2025R2/scripting-toolkit-dev-portal-25r2/samples/streamlined/11_Add_Files_Pictures_and_Hyperlinks.md @@ -33,7 +33,7 @@ record, folder *Previous cell output:* ```output -(, +(, ) ``` diff --git a/2025R2/scripting-toolkit-dev-portal-25r2/samples/streamlined/12_Add_Point_Range_Data.md b/2025R2/scripting-toolkit-dev-portal-25r2/samples/streamlined/12_Add_Point_Range_Data.md index 2f99592a00..8e3d03c616 100644 --- a/2025R2/scripting-toolkit-dev-portal-25r2/samples/streamlined/12_Add_Point_Range_Data.md +++ b/2025R2/scripting-toolkit-dev-portal-25r2/samples/streamlined/12_Add_Point_Range_Data.md @@ -36,7 +36,7 @@ record, folder *Previous cell output:* ```output -(, +(, ) ``` diff --git a/2025R2/scripting-toolkit-dev-portal-25r2/samples/streamlined/13_Add_Date_Integer_and_Logical_Data.md b/2025R2/scripting-toolkit-dev-portal-25r2/samples/streamlined/13_Add_Date_Integer_and_Logical_Data.md index 2402809953..123d340522 100644 --- a/2025R2/scripting-toolkit-dev-portal-25r2/samples/streamlined/13_Add_Date_Integer_and_Logical_Data.md +++ b/2025R2/scripting-toolkit-dev-portal-25r2/samples/streamlined/13_Add_Date_Integer_and_Logical_Data.md @@ -36,7 +36,7 @@ record, folder *Previous cell output:* ```output -(, +(, ) ``` @@ -109,7 +109,7 @@ 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: Apr 24 2025 +Date of Build: May 12 2025 Maximum Number of Layers: 5 Built in Closed Chamber?: Yes ``` \ No newline at end of file diff --git a/2025R2/scripting-toolkit-dev-portal-25r2/samples/streamlined/15_Use_Exporters_for_FEA_Export.md b/2025R2/scripting-toolkit-dev-portal-25r2/samples/streamlined/15_Use_Exporters_for_FEA_Export.md index 865c8e49df..f0cc22ce7f 100644 --- a/2025R2/scripting-toolkit-dev-portal-25r2/samples/streamlined/15_Use_Exporters_for_FEA_Export.md +++ b/2025R2/scripting-toolkit-dev-portal-25r2/samples/streamlined/15_Use_Exporters_for_FEA_Export.md @@ -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-04-24T18:55:54.3242472-04:00 +**Export DateTime: 2025-05-12T12:17:04.8602976-04:00 **Database Name: MI Training **Table Name: Design Data **Material Record History Id: 20673 diff --git a/2025R2/scripting-toolkit-dev-portal-25r2/samples/streamlined/16_Link_Records.md b/2025R2/scripting-toolkit-dev-portal-25r2/samples/streamlined/16_Link_Records.md index 73ee617c07..c13c03707b 100644 --- a/2025R2/scripting-toolkit-dev-portal-25r2/samples/streamlined/16_Link_Records.md +++ b/2025R2/scripting-toolkit-dev-portal-25r2/samples/streamlined/16_Link_Records.md @@ -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, Alumino silicate - 1723, Barium silicate, Soda barium glass, Alumino silicate - 1720 +Lithium aluminosilicate, Barium silicate, Alumino silicate - 1723, Alumino silicate - 1720, Soda barium glass ``` ## Static links A static link can be created between two existing records, including cross-database. @@ -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: -Alumino silicate - 1720, Barium silicate, Lithium aluminosilicate, Alumino silicate - 1723, Soda barium glass +Lithium aluminosilicate, Alumino silicate - 1723, Soda barium glass, Barium silicate, Alumino silicate - 1720 ``` ## Associated Records Associated Records are a way of traversing tabular links multiple steps at a time. This example finds all materials