Configuring MS Visual Studio to Develop IronPython for ANSYS Scripting
Hi ANSYS Developer Community:
I would like to be able to develop IronPython code in Microsoft Visual Studio for scripting applications in ANSYS Spaceclaim, ANSYS Discovery, ANSYS Electronics Desktop, etc. Right now, it is unclear to me how to properly configure Microsoft Visual Studio to work with IronPython as oppsed to CPython so that I can develop IronPython applications in Visual Studio in the same way as other .NET languages such as C#, F#, Visual Basic, etc. I was wondering if someone in the ANSYS Developer Community could reach out to me to help me understand this? Thanks very much!
Answers
-
I have not tried it, because in VS you will not have access to the variables supplied through Ansys products. Instead, I recommend developing in the scripting window of the Ansys product. Alternatively, if you wish to run Ansys products externally, I recommend using PyAnsys
, which is compatible with CPython.0 -
Just as an addendum to the answer from @Landon Mitchell Kanner, according to this post on https://visualstudio.com, Visual Studio no longer supports IronPython. As the overall direction for Ansys is towards the external scripting of applications with APIs and Libraries, I would second his guidance and investigate the PyAnsys tools and make the shift to the CPython implementation they provide.
0 -
Thank you Landon and Chris for your information! I did find another post in the ANSYS Developer Community at:
I did get this to work for AEDT, but I just wonder if something similar to this could be done to do scripting for ANSYS Discovery and Spaceclaim within Visual Studio? The main difference is that AEDT scripting is based on ActiveX COM and the Discovery and Spaceclaim scripting is not.
Thank you for letting me know that Microsoft will no longer support IronPython. I was told last year that Microsoft would no longer support ActiveX COM in favor of WCF (Windows Communication Foundation)? Have you heard this? If Microsoft will no longer support ActiveX COM or IronPython, what does ANSYS plan for the future of the scripting capabilities in AEDT, Discovery and Spaceclaim?
0 -
Our plan is to gradually migrate all product scripting to use CPython.
1