Grasshopper Ansys connection : succeeded but!

I load ansys api dll in Ghpython, it have an option to detect ansys opened session,
the script success to get the current time of the solver but when i try to pause or reset animation i get this error.

Runtime error (MissingMethodException): Method not found: 'Void SpaceClaim.UserInterface.ScriptHelper.ExecuteAllOnMainThread(SpaceClaim.Task)'.

  line 18, in script

I will also ask in Ansys forum but i don’t think i will get an answer.

I find a solution using command, i will try to find a way to control modeling

1 Like

Hi, khaled! Amazing job.

I am also trying to connect Ansys with Grasshopper for optimization purpose.
Would mind sharing some information to convert the Rhino model into Ansys model and get the feedback of simulation back to the Grasshopper interface?


Sadly there is no way actually, there is an old plugin to send and receive shapes from Rhino to Ansys and vice versa but work only with Rhino5.
I think an addon like Rhino inside revit will be better.


Khaled. Thanks for informing me of this message. Actually, I am not a Revit user so I still hope to find a plugin or self-scripted code inside Grasshopper.

I found an old PhD thesis that introduced several methods that integrating Grasshopper/Rhino, FEA engine, and optimization algorithm. This approach is under Matlab, Abaqus and Grasshopper. But I am not so familiar with Matlab and Abaqus, so I am still looking for some alternative methods to connect Ansys and Grasshopper… The paper link is here:

I roughly know the procedure of the communication but I think I still need to find original scripting for the communication purpose so that I can customize my idea. I noticed some people succeeded in linking Ansys and Grasshopper but the content seems to be gone already… such as this one:

So could you please share the old plugin that you find for connecting Rhino 5 with Ansys? I think I’ll try to figure out how to program scriptings for this purpose.

Besides, my concern is to find a method to optimize the geometry of cellular structure for thermal control and structural performance. I know honeybee can test the 2D shape with THERM, and karamba can deal with beam and shell problems, but both of them can not tackle the FEM issue in a small-scaled I think such as 5 cm^3 boxes. If you have some recomendation for softwares or plugins, please help to tell me as well.

Thank you~ :slightly_smiling_face:

I saw these scripts before but sadly they are not available.
The plugin is in Ansys installation folder called:
I tried to load this dll in Ghpython but i don’t find a way how to use it to import or export.
The other problem that no one help in Ansys forum , they always said: read the documentation and for many things like scripting there is no information, they don’t give professional help for student versions but only for commercial users.
And the problem with RhinoSpaceClaimPlugin that everytime you export or import it create new scene an don’t replace shapes.
If you want for example study something with Galapagos this will create hundreds of scenes!

Hi, khaled!

Thank you for the information.
I didn’t find the original file of RhinoSpaceClaim so didn’t try that in GHpython.

I found a project done by University of Stuttgart many years ago and they have a publication describing the procedures to implement the communication between Ansys and grasshopper. You may take a look and tell me if you think it is possible.

But, to set up the model for FEA in ANSYS, it needs to use APDL(ANSYS Parametric Design Language) to write in the parameter exported from Grasshopper. I am not familiar with its internal language, so I think I will see some videos first to come up with ideas for assembling the FEA model by this language.

I will let you know if I could succeed(I wish)…


compas-dev · GitHub
There is an extension for ansys among others compas_fea - COMPAS FEA and they have a grasshopper/rhino integration.
You can check it out - I don’t know if it can do what you’re looking for.


My project need wind analysis, if you want material and structure analysis check the link posted by @martinborst1

I finally find a solution,
I create simple addin for Ansys which include the sender code to send data , than i import the addin dll in Grasshopper and use this receiver code to receive data.
This work fine

The codes used posted here and also are in rhinoinside examples:


Were you able to get satisfactory results? I am currently attempting thermal analysis of a wall, while varying its internal geometry to improve thermal efficiency.
Ideally, I will use Wallacei or Tuny to optimize this internal geometry.
But, for the time being, I am still struggling just to export the geometry to ANSYS. I will try as an STL file and port it later today. (My STL file is 13GB from a 37kb GH file…)
There is a decent export process to an ABAQUS .inp file using VoxelPrint (of Ghent University’s Cobraprint) but it is not perfect, and so far I have been unable to get the resolution necessary required for my analysis.

@seghierkhaled could you explain your final model in a bit more detail? I tried using the .gh file you list, but seem to be missing components (from your animation)
and congratulations! btw, looks great!

This is an example for wind analysis , but it need more work and tests and i can’t share the components because it is a private academic work.
Ansys released open source software called PyAnsys, i never tried it but it looks useful