Ansys Learning Forum › Forums › Discuss Simulation › 3D Design › How to run a Spaceclaim script from an external IDE like vscode? › Reply To: How to run a Spaceclaim script from an external IDE like vscode?
Since IronPython use .Net Framework it does not support a lot of CPython modules. An alternative is to use MathNet library (http://numerics.mathdotnet.com/). You can download the library yourself, but Ansys has distributed it inside the Ansys installation. Here is how you can access it with IronPython:
import os
import clr
clr.AddReference("Ans.Utilities")
version = Ansys.Utilities.ApplicationConfiguration.DefaultConfiguration.VersionInfo.VersionString
sys.path.append(os.environ["AWP_ROOT" + version] + "\\Addins\\ACT\\bin\\Win64")
clr.AddReferenceToFile("MathNet.Numerics.dll")
import MathNet.Numerics