How can I import numpy and scipy libraries in SpaceClaim ?
Or how can I launch an external Python script in it ?
I can't find anything to do these things.
There's a Scripting section in the manual, check under the Customising SpaceClaim section.
Thank you for your quick answer. Unfortunately, there is nothing about adding new libraries or running an external python script in this section.
Guys, I found a solution to run an external python script in SpaceClaim :
from System.Diagnostics import ProcessProcess.Start("File.py")
Make sure you have Python installed on your device and that all the libraries needed are downloaded. In my case, I needed numpy & scipy. So, in the Windows terminal (Windows + R -> "cmd" -> Ok), you have to write :
pip3 install numpy
pip3 install mkl
pip3 install scipy
I hope it is going to help some people,
I also want to run python codes which include libs as scipy and numpy.
Could you please explain in more detail what you've done? I've tried those commands and they do not work for me.
Also, have you run numpy in ansys act?
If you want to run external python scripts from SpaceClaim (IronPython), you first need to download the latest version of Python from the Windows store.Once it is done, just run the Windows terminal (Windows key + R) and write the command lines I wrote above (pip3 … ). It should work. At least, that is how I did it (https://www.edureka.co/blog/install-numpy/). From there, to be able to call an external python script (i.e. a ".py" file) in a SpaceClaim script, you have to write the two lines above (from System.Diagnostics … ).
Unfortunately, I never run numpy in Ansys ACT but I remember finding a video that seemed interesting, judging by the comments :
I hope this helps. Feel free to ask more questions if your problem is still unresolved.
Ansys customers with active commercial software licenses can access the
customer portal and submit support questions. You will need your active account number to register.