Ansys Maxwell Scripting

Ansys Maxwell can run a python script from the Tools Menu. The scripts export *.fld files from the field calculator. I need to run a huge number of those scripts (generated in Matlab) at once, but Ansys can't do that. Is there a way of overcoming that?

From there, is there a way to run those scripts from Matlab?

What are the scripting capabilities of Ansys Maxwell when it comes to Matlab?

Does anyone have a way of linking Ansys Maxwell to Matlab?


  • mbeliaevmbeliaev Moderator
    edited February 17


    there are multiple ways to do it.

    Why do not you use just one Py script where you loop through all quantities needed and export them to different .fld files?

    After that you can read them in Matlab for postprocessing

  • reebalnreebaln Member
    edited February 17

    The python script is too long to handle the export of field files for a parametric setup. Also, a single script does not give me the flexibility in selecting and extracting the data.

    I found a way around that problem. However, is there an Ansys-Matlab (template/ guide/ or source) to run Ansys from Matlab?

    Thank you!

  • have you find a solution for you probleme?

  • rtkrtk Pune, IndiaForum Coordinator


    Matlab have many external interfaces from which you can call scripts in other formats like .vbs, .py etc.. and even DLLs.

    You can use 'loadlibrary' function in Matlab, if you want to call from DLLs.

    Another way is to call other COM objects from MATLAB (check here).... or use COM API within MATLAB.

    So, for your case, initialize Ansys tool's COM object first and then proceed using MATLAB like I mentioned above.

    Also, you can call MATLAB function from VB . Check here

    Hope this addressed your concern!

    Best Regards,

Sign In or Register to comment.