Skip to main content
Launch the Granta Material Picker in a browser and obtain data for the material models selected for use in your application.

Imports

Import required packages for the workflow.

Authentication

Obtain an access token from Ansys ID and format an authentication header. The underlying standard used is OIDC.

Connect to the Granta Integration Service

Create a session on the Granta Integration Service and store the response from that call.

Launch the Granta Material Picker

Launch the Granta Material Picker in a browser (this example uses the default web browser). The session uid from the previous step is required here.
In the browser, you can now search for materials and select material models to transfer to your application.

Receive model data

Retrieve the material model data from the Granta Integration Service.
Your application can now use the material data contained in data_response. Replace the print statement with your code to handle the material data.