TAGGED: animation, export, python-scripting, scripting
-
-
October 18, 2024 at 5:26 pmsohanur.rahmanSubscriber
Hello,
I am trying to export animation of a specific result(e.g., Total Deformation) in Ansys Mechanical using a python script. I am getting the result animation for the whole range of timestep (e.g., 0 to 18 sec). However, I want to select the timestep range(e.g., 4 to 18 sec) for the exported animation in my script . Is there any way to do this in the python script? -
October 28, 2024 at 6:56 pmPedram SamadianAnsys Employee
Hi,
Thanks for contacting us. The following Python script helps to export an animation from the evolution of Total Deformation throughout the simulation from a specific view (ISO in this case) with the specified frame numbers and video duration in Ansys Mechanical.
########################################################
cam = Graphics.Camera
cam.SetSpecificViewOrientation(ViewOrientationType.Iso)
Graphics.ResultAnimationOptions.NumberOfFrames = 100
Graphics.ResultAnimationOptions.Duration = Quantity(2, ‘s’)
totalDeform = DataModel.GetObjectsByName(“Total Deformation”)[0]
totalDeform.ExportAnimation(“C:\\Users\\pesamadi\\Downloads\\test\\test.mp4”,GraphicsAnimationExportFormat.MP4)######################################################
I will ask the developers about the required commands to specify the start and end times of the animation and then update my respond.
Thanks,
Pedram
-
- You must be logged in to reply to this topic.
- Problem with access to session files
- Ayuda con Error: “Unable to access the source: EngineeringData”
- At least one body has been found to have only 1 element in at least 2 directions
- Error when opening saved Workbench project
- Geometric stiffness matrix for solid elements
- How to select the interface delamination surface of a laminate?
- How to apply Compression-only Support?
- Timestep range set for animation export
- Image to file in Mechanical is bugged and does not show text
- SMART crack under fatigue conditions, different crack sizes can’t growth
-
1191
-
518
-
488
-
225
-
209
© 2024 Copyright ANSYS, Inc. All rights reserved.