Skip to main content

Introduction

MI Scripting Toolkit provides a clean and intuitive Python interface for working with Granta MI. The package provides:
  • Searching for records in Granta MI using the same powerful criteria as in MI Explore.
  • Importing and exporting most Granta MI attribute types as native Python objects, allowing data to be analyzed and reported on using the Python data analytics ecosystem, or provided to external systems.
  • Exporting data to FEA material card formats.
The Example notebooks contain fully documented example code covering these use cases, and can be used as starting points for your own code. For more advanced users, the Streamlined API reference provides more detailed guidance. Finally, the User guide contains additional information on the package structure, performance optimization, and authentication.

Installation

MI Scripting Toolkit 5.0 is available as a part of the Granta MI Enterprise software package, but is licensed separately. To use MI Scripting Toolkit 5.0, your Granta MI server must be running 2024 R2 or later, which includes Service Layer Interface 23/10. MI Scripting Toolkit is provided in a package called ansys.grantami.core, and can be installed using either the pip or conda package managers. See the links below for detailed installation instructions and client requirements:

Quick code

Once you’ve installed MI Scripting Toolkit using the installation instructions above, use the code below to connect to Granta MI, find a record by name, and export an attribute value:
For more examples see the Example notebooks.