Tagged: #python-#ironpython, script, spaceclaim
-
-
March 1, 2023 at 9:56 pm
Tom Teschner
SubscriberI'm currently playing around with Spaceclaim's scripting capabilities, given that this is in Python, I have a few ideas I want to test but would need to import a few non-standard packages for that. My question is thus if it is possible to install additional packages in spaceclaim? I have tried to drop the package folder inside C:\Program Files\ANSYS Inc\v222\scdm\Library\IronPython\Lib which is then recognised in the script editor (i.e. intelissense is picking it up) but this route does not seem to work (possibly as my package is designed to work with Python 3.6 and newer and spaceclaim seemingly using Python version 2.7.4).
If this approach ought to work but the issues I am facing are due to an outdated Python version, is there a way to upgrade the python version within spaceclaim to the latest Python version?
Edit: I just realised that "IronPython" is not standard Python, reading up on IronPython, it seems what I want to achieve is not possible with IronPython (i.e. there is no support for the packages I am looking at). Too bad. But if there is a way to upgrade the IronPython version, that would still be of interest to me.
-
March 2, 2023 at 10:06 am
Vinayak Vipradas
Ansys EmployeeHi Tom,
If you are using 2022 R1, then it depends on both IronPython 2 and Python 3.7.11 and upgrading or uninstalling either would have unpredictable effects on the softwares performance. The latest version of Python is not compatible with Spaceclaim.
Which supporting packages are you looking for importing? Because only IronPython compatible modules (i.e., pure Python with no C code involved) will work. This is a limitation of IronPython in general.
Regards,
Vinayak Vipradas -
March 2, 2023 at 10:32 am
Tom Teschner
SubscriberI am using 2022R2, any chance I can use Python 3.7.11 within the scripting editor as well, or just IronPython? I could also upgrade to version 2023R1 if that changes anything (I haven't checked).
There are a few modules I am interested in but indee dsome of them are using C so that is probably why dragging and dropping them into the Lib folder did not work. Though I think at least some of these should be available by default in Python 3.7.11 so if there is a chance to use that instead that would already help using at least a few of these.
-
March 2, 2023 at 1:47 pm
Vinayak Vipradas
Ansys EmployeePython 3.7.11 is compatible with 2022R2.
If you have a local version of upgraded IronPython, you can try to use its pip to pull in the libraries you need. -
March 2, 2023 at 1:58 pm
Tom Teschner
Subscriberthat's a good point, I will try. Just to confirm, version 2022 R1 would work with Python 3.7.11 or am I misinterpreting this?
-
March 2, 2023 at 2:00 pm
Vinayak Vipradas
Ansys EmployeeYes, Python 3.7.11 should work with 2022R1. Please let me know if you have any trouble.
-
- You must be logged in to reply to this topic.

Boost Ansys Fluent Simulations with AWS
Computational Fluid Dynamics (CFD) helps engineers design products in which the flow of fluid components is a significant challenge. These different use cases often require large complex models to solve on a traditional workstation. Click here to join this event to learn how to leverage Ansys Fluids on the cloud, thanks to Ansys Gateway powered by AWS.

Earth Rescue – An Ansys Online Series
The climate crisis is here. But so is the human ingenuity to fight it. Earth Rescue reveals what visionary companies are doing today to engineer radical new ideas in the fight against climate change. Click here to watch the first episode.

Ansys Blog
Subscribe to the Ansys Blog to get great new content about the power of simulation delivered right to your email on a weekly basis. With content from Ansys experts, partners and customers you will learn about product development advances, thought leadership and trends and tips to better use Ansys tools. Sign up here.
- How to work with STL file?
- Rotate tool in ANSYS Design Modeler
- Using Symmetry in DesignModeler and Expanding the Results
- section plane
- material properties
- ANSYS FLUENT – Operation would result in non manifold bodies
- drawing a geometry by importing a table of points
- Geometry scaling
- Parameters not imported into Workbench 18.2 from Solidworks/Inventor
- Coordinates orientation
-
3644
-
2502
-
1735
-
1226
-
578
© 2023 Copyright ANSYS, Inc. All rights reserved.