General Mechanical

General Mechanical

Topics related to Mechanical Enterprise, Motion, Additive Print and more.

Timestep range set for animation export

    • sohanur.rahman
      Subscriber

      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?

    • Pedram Samadian
      Ansys 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

       

Viewing 1 reply thread
  • You must be logged in to reply to this topic.