We have an exciting announcement about badges coming in May 2025. Until then, we will temporarily stop issuing new badges for course completions and certifications. However, all completions will be recorded and fulfilled after May 2025.

Ansys Learning Forum Forums Installation and Licensing Ansys Products Scripting in Mechanical – Accessing ‘Model’ Reply To: Scripting in Mechanical – Accessing ‘Model’

Matthew Little
Subscriber

After a few more searches, I found a solution.  In the imported module, you must 'initialize' the Ansys objects you want to use (e.g., ExtAPI, Ansys).  Create a function that takes whatever objects you want and set them to global variables in the imported module.

In the main Ansys script, after you load your module, you call the initialization function to pass whatever Ansys namespace functions (ExtAPI, Ansys, etc.) to you module.

This sort of seems like a workaround, and i feel like there should be a direct way to import the needed objects.