General Mechanical

General Mechanical

Saving & sharing of Working project files in .wbpz format

    • Vishal Ganore
      Ansys Employee

      Hello Friends, 


      Please use .wbpz archive format for sharing your project files in student community. To do that, go to Workbench>Archive. 120 MB is the maximum file size that you can attach. 


      If the file size exceeds 120 MB, right click on Model or Mesh, and Clear Generated Data, to delete the mesh and the solution from the project. File>Save As a new name and then File>Archive to create a much smaller .wbpz file.


      See below:


       



      To open an archive file, use the File>Restore Archive menu.

    • Zizi96
      Subscriber

      Does saving as a wbpz file allow me to open the file on a previous version of ANSYS.


      For example if I did a project on my personal computer with ANSYS 18.2, could save the project.wbpz file and then open and continue working on it with another computer that ANSYS 17.8?

    • peteroznewman
      Subscriber

      No. You can only open an archive with the same or newer release of ANSYS.

    • Zizi96
      Subscriber

      Ok, is there any way to save and open on a previous version on ANSYS Workbench?

    • peteroznewman
      Subscriber

      I don't know of any way to open a new file in an old version.  There is an export function in Mechanical that will write out a file. You can try that. I've never tried to go backward.

    • maurya
      Subscriber

      use the .rst file to open in mechanical apdl  of any older version of workbench or apdl file. or you can crete input file in workbench tools> write  input file.


       

    • Bhargava Sista
      Ansys Employee

      The best way of opening files created in newer versions in previous versions of WB is to write out the CDB file and then read it via External Model. Depending on how old the previous version is, some of the information will be lost. Generally, the mesh, the material assignments, and the connections come through but do not expect to import loads and boundary conditions. The import options for CDB files are improving significantly with every release. 

    • Bhargava Sista
      Ansys Employee

      The export option in Mechanical writes out a mechdat file which is not backward compatible so you still have this issue. The advantage with the mechdat file is that it can be used for transferring any system between different WB projects. Also, if you're interested in sharing just one system which is part of a bigger WB project, then one may just share the mechdat file so it helps in reducing the file size for sharing purpose.

    • ikra
      Subscriber

      Hi bsista, 


      I'm want to open an older version of WB and WP, with my Ansys 19.2 ? can help me please in this ?


      You say that I must to write out the CDB file and then read it via external Model. Can you explain me this in more detail 


       


      Thank you

    • xRtC
      Subscriber

      How can i attach a file in a comment?

    • peteroznewman
      Subscriber

      The Attach button only appears after you Post the comment. It is not visible while you are writing the comment. So hit the Add Post button, then on the right side, you will see an Attach button appear.

    • VJ0085
      Subscriber

      Hello, By following above steps, we are actually clearing out everything from the project. But I need to send a project with results only, how do i do that? Thanks to inform.

    • peteroznewman
      Subscriber

      You can Solve to obtain results, Save the Project then Save the Archive, with Results.  The problem is the file size is likely to be > 120 MB, which is the file size limit for attaching to a post.


      Many students have a Google Drive or equivalent, which allows you to put a link to a document in the Google Drive which can be gigabytes in size.

    • PSiedlac123
      Subscriber


      I know this is old topic however I think I have something valuable to share.

      @ikra,  If You have problem with opening old WB project in newer ANSYS Workbech version it can be reason of bugs hidden in older archiviser, especially if material name have some special charters...

      - first try open the model in version adequate to which it was created - if this fail
      - try to import mechdat (or change name in mechdb to new project) Below its small script to WB console that can do this for multiple files using following scrtipt
      - with some effort the script can be changed to do backward import using CDB format.


       


       # -*- coding: utf-8 -*-
      '''WB_import_multiple_simulations_from_other_file.py
      ######################################################################################
      # INFO:  CUSTOM SIMULATIONS IMPORTER WRAPPER FOR .mechdb import as .mechdat
      # Autor: psiedlaczek (at) prvo2.pl
      #
      # Version: 2019.05.26
      #
      # USSAGE:
      #  1. open source project and check the solution directories descriptor from which You want to import,
      #  2. explicitly edit SOURCE_PROJECT_DIR="" list selection IMPORT_SOL_DIRS=[] in this script file
      #  3. open desitination project and run the script
      # TESTED:
      #   ANSYS Workbech 19.0
      # FEATURES:
      #    The script is made for ANSYS WB ProjectPage console.
      #    It add Note to imported file
      # TODO's:   1. copy geometry
      #           2. copy also solver.out and file.rst
      #           3. associate files with containers
      '''

      #############
      # SETUP: From where and what to import
      ######################################
      # rather avoid national charters, especially if they are not in UTF-8 format



      SOURCE_PROJECT_DIR=unicode("D:\PROJEKTY_2020\ES900_Z?BY_SUWAKÓW\ES900_ko?a_z?bate_skok170_files")

      IMPORT_SOL_DIRS=[
      "SYS-11"
      ,"SYS-37"]



      #############
      # Main
      ######################################
      from shutil import copyfile
      import os

      SystemsList=[]

      for sol in IMPORT_SOL_DIRS:
          f_src=SOURCE_PROJECT_DIR+"\dp0\global\MECH\"+sol+".mechdb"
          f_dest=SOURCE_PROJECT_DIR+"\dp0\global\MECH\"+sol+".mechdat"
          copyfile(f_src , f_dest)        
          ImportFile(f_dest)      # obj. does not return imported container so I need to dig-it-out-not-manually-sic
          os.remove(f_dest)
          
          ###############
          ##### Check what was imported and add comment Note
          ###############################
          SystemsList1=SystemsList[:]

          for i in range(len(GetContainerList())):
              xxx=GetDataContainer(GetContainerList())     # Property Component ID -> Solution 5
              try:        
                  dicx=GetSystemPropertiesForContainer(xxx)        
                  sysx=GetSystem(dicx[0])         
                  SystemsList.append((GetSystem(dicx[0]),dicx[0]))
                  #print i,"|||:",sysx,"|||:",dicx[0],"|||:",dicx[0],"|||:",dicx[0]
              except:
                  #print i,"|||:", str(GetContainerList()),"|||:", "dicx empty - Not proper object."
                  pass

          SystemsList=list(set(SystemsList)) # -> remove duplicates
          print "SystemsList, SystemsList1", SystemsList, "/n", SystemsList1

          ###########
          ###### Znajdz try roznice ;P
          ###############################

          diffSystemsList=list(set(SystemsList).difference(set(SystemsList1)))
          print "diffSystemsList:",diffSystemsList
          try:
              system1 = diffSystemsList[0][0]    
              text=system1.DisplayText  # System Title
              print "TEXT:", text
              system1.Notes = "Importer: Psiedlac123nSimulation:" + sol + "nThe file has been imported from:" + f_src

          except:
              pass

      clr.AddReference("Ans.Core")
      from Ansys.Core import *
      from Ansys.Core.Messaging import *
      Session.PublishMessage(None, MessageType.Information, "Script Event", "Source: Python", "My msg: DONE IMPORT USING WB_import_multiple_simulations_from_other_file.py " + " SOURCE_PROJECT_DIR: " + unicode(SOURCE_PROJECT_DIR),"Import data")        

    • kaitova
      Subscriber

      Hi, would you please share an example of transferring back using cdb file? It looks as a very useful function. Thank you!

    • mhmdalmudhafar
      Subscriber
      Hi ,would you please share an example of analysing prosthetic foot statically and dynamically. Thank youn
Viewing 15 reply threads
  • You must be logged in to reply to this topic.