Ansys Products

Ansys Products

Discuss installation & licensing of our Ansys Teaching and Research products.

Change view orientation and export result as avz

    • Ansys_Wolke
      Subscriber

      I would like to export a result as avz and change the view which will be initially shown when you open the avz-file.

      I am using the following code:   

      my_wd_path = this.Parent.Parent.WorkingDir
      named_selection = Model.NamedSelections.Children[0]
      Graphics.Camera.SetFit(named_selection)
       my_pp_obj = ExtAPI.DataModel.AnalysisList[0].Solution.Children[2].Children[1]
       my_pp_obj_name = my_pp_obj.Name.replace(' ','_')
       my_pp_obj.Activate()
       ExtAPI.Graphics.Export3D(os.path.join(my_wd_path,"%s.avz" %(my_pp_obj_name)))

      In the GUI the view is changed with the command above but not in the exported file.

      I would like to have the defined view as the initial view when you open the avz file. However it is always the iso view which is shown.

      How one can change the view for the avz file.

       

      Thanks

      Wolke

    • mjmiddle
      Ansys Employee

      Your command doesn't look right. It should be:

      settings = Ansys.Mechanical.Graphics.Graphics3DExportSettings()    # only has background controls
      ExtAPI.Graphics.Export3D(file_path, Graphics3DExportFormat, settings)

      However, there are no settings to determine the view orientation, and I don't think the avz file format even supports this. It's just a simple format that contains the deformed mesh shape and contour.

      Any view would be controlled be the Ansys Viewer application. However, I see no scripting capabilities in this application and no way to set the default view orientation.

    • Sana Cop
      Subscriber

Viewing 2 reply threads
  • The topic ‘Change view orientation and export result as avz’ is closed to new replies.