Ansys Assistant will be unavailable on the Learning Forum starting January 30. An upgraded version is coming soon. We apologize for any inconvenience and appreciate your patience. Stay tuned for updates.

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?

mjmiddle
Ansys Employee

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

[bingo_chatbox]