-
-
May 14, 2023 at 6:31 pm
Maks Brus
SubscriberGreeting to everyone!
I am currently working on a project in Ansys Student 2023, where I would need to make many iterations based on location of a certain part (let's say a couple of thousand different locations). The model was drawn in SolidWorks and the x and y parameters for location were also imported and parameterized. Now I need to do a Modal analysis and Harmonic analysis.
Figure 1: Imported parameters (currently only 3 for testing purposes).From harmonic analysis I would like to export a CSV (or similar) for the tabular data of Frequency response deformation for each design point. Currently I have spent the whole weekend trying to find a solution.
Figure 2: Tabular data I would like to export
I found this (Figure 3) and it seems to work, BUT! It only works in Mechanical. If I update all design points it doesn't generate the files:
https://blog.ozeninc.com/resources/using-python-to-export-tabular-data-from-within-ansys-mechanical
The reason is that this method only works with the Mechanical GUI:
https://forum.ansys.com/forums/topic/tabular-data-extraction/Figure 3: The Python script, slightly modified to work.
Now is there any way of doing this with Python? Or any other way of doing this? I have found APDL and VWRITE, but have no clue in this regard.
*Disclamer: Total Ansys beginner and basic Python knowledge.
**Also: This seems like something that should be integrated.
-
May 15, 2023 at 6:41 am
Erik Kostson
Ansys EmployeeHi
By default, the Python objects are not connected, for security purposes. It is possible to activate an option to automatically connect the Python objects. This is mandatory to be able to use Python objects in a Design Point experiment.
The option is: activate the Connect/Run Python Code Objects when Mechanical is Launched preference contained in the Mechanical category of the Workbench Options dialog (Tools > Options > Mechanical):
See this page of the help for further information: https://ansysproducthelpqa.win.ansys.com/account/secured?returnurl=/Views/Secured/corp/v231/en/wb_sim/ds_python_code.html
In the future should you have any scripting related questions you can also post here:
https://discuss.ansys.com/categories/engineering-simulation
Thank you
Erik
-
May 15, 2023 at 3:05 pm
Maks Brus
SubscriberThank you for your answer Erik!
But it doesn't solve the problem as I had the option enabled before posting the question. The script runs, but it doesn't work because it requires Mechanical GUI, which doesn't open if you update all design points from Workbench.
-
- 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.
- Solver Pivot Warning in Beam Element Model
- Saving & sharing of Working project files in .wbpz format
- Understanding Force Convergence Solution Output
- An Unknown error occurred during solution. Check the Solver Output…..
- What is the difference between bonded contact region and fixed joint
- User manual
- The solver engine was unable to converge on a solution for the nonlinear problem as constrained.
- whether have the difference between using contact and target bodies
- material damping and modal analysis
- Colors and Mesh Display
-
5290
-
3311
-
2471
-
1308
-
1016
© 2023 Copyright ANSYS, Inc. All rights reserved.