-
-
February 28, 2023 at 1:37 pm
pavankonchada123
SubscriberWhen I am trying to record the macro for saving Total Deformation and Stress as images using image to file option, I found that script is same for both cases. But how to differentiate between Deformation and stress for automation
image_settings = Ansys.Mechanical.Graphics.GraphicsImageExportSettings()
image_settings.CurrentGraphicsDisplay = False
image_settings.Resolution = GraphicsResolutionType.NormalResolution
image_settings.Capture = GraphicsCaptureType.ImageAndLegend
image_settings.Background = GraphicsBackgroundType.White
image_settings.FontMagnification = 1
Graphics.ExportImage(r"""D:\Projects\ES.png""", GraphicsImageExportFormat.PNG, image_settings) -
February 28, 2023 at 1:41 pm
pavankonchada123
SubscriberI want to run this journal file to extract the images
result1 = system1.GetContainer(ComponentName="Results")
result1.Edit(Interactive=False)DSscript = open("D:scrt.py", "r")
DSscriptcommand=DSscript.read()
DSscript.close()
result1.SendCommand(Language='Python', Command = DSscriptcommand) -
February 28, 2023 at 2:57 pm
pavankonchada123
SubscriberI have used as this as scrt.py but images are not coming
'''NOTE : All workflows will not be recorded, as recording is under development.'''
solu=Model.Analyses[0].Solution
Graphics.Camera.FocalPoint = Point([0.000000, 0.050126, 0.000000], 'm')
Graphics.Camera.ViewVector = Vector3D(0.57735, 0.57735, 0.57735)
Graphics.Camera.UpVector = Vector3D(0, 1, 0)
Graphics.Camera.SceneHeight = Quantity(0.126253, 'm')
Graphics.Camera.SceneWidth = Quantity(0.046775, 'm')image_settings = Ansys.Mechanical.Graphics.GraphicsImageExportSettings()
image_settings.CurrentGraphicsDisplay = False
image_settings.Resolution = GraphicsResolutionType.NormalResolution
image_settings.Capture = GraphicsCaptureType.ImageAndLegend
image_settings.Background = GraphicsBackgroundType.White
image_settings.FontMagnification = 1totdef = solu.AddTotalDeformation()
totdef.EvaluateAllResults()Graphics.ExportImage(r"""D:\Projects\TD.png""", GraphicsImageExportFormat.PNG, image_settings)
equstress = solu.AddEquivalentStress()
equstress.EvaluateAllResults()
Graphics.ExportImage(r"""D:\Projects\ES.png""", GraphicsImageExportFormat.PNG, image_settings)
#endregion
-
- 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.
- Saving & sharing of Working project files in .wbpz format
- Solver Pivot Warning in Beam Element Model
- 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
- whether have the difference between using contact and target bodies
- The solver engine was unable to converge on a solution for the nonlinear problem as constrained.
- User manual
- Colors and Mesh Display
- material damping and modal analysis
-
3778
-
2587
-
1831
-
1244
-
598
© 2023 Copyright ANSYS, Inc. All rights reserved.