Tutorials‎ > ‎

Saving Data and States

In this tutorial we will explore the differences between saving data and saving states. A project should always be saved as a state.


Saving Data

  • From the Sources menu, choose the Box object and apply the default properties, so the box appears in the render view.
  • Rotate the box in the render view and apply coloring on the Display tab.


  • Click on File > Save Data (or Ctrl+S), name the file (such as SavingDataTutorial) and save it to your desktop. Click OK on the Configure Writer window.
  • Click on the Disconnect icon 
    and Discard to clear the pipeline.
  • Click on File > Open, browse to and select the file you just saved, and click on OK. Click on Apply to load the data.
  • Notice that although we rotated and colored the dataset prior to saving, we are looking at a gray box that isn't rotated.


A data file will not save information related to the color or rotation of a dataset, but instead will only save properties related to the data itself, such as size, velocity, and any associated cell or point arrays; that's why when we load some datasets we can choose which arrays to load.


Saving States

  • Again rotate the box in the render view and apply coloring.
  • This time we will save the data in a state file. Click on File > Save State (or Ctrl+Shift+S), name the file and save it to your desktop. You can give it the same file name as above, since the data file was saved as a *.pvd file (if you kept the default format) and the state file uses *.pvsm.
  • Click on the Disconnect icon
     and Discard to clear the pipeline.
  • Click on File > Open (or Ctrl+O for Open File and Ctrl+Shift+O for Open State), browse to and select the file you just saved, and click on OK. Alternately, click on File > Recent Files and select the state from there; it will be at the top of the list. Click on Apply to load the data if required (if chosen from Recent Files, the visualization is automatically applied).


  • Notice that this time the box is still rotated and has the coloring that was applied.


State files are great for saving projects since they will save all actions that are applied to the objects, such as rotations, filters, coloring, etc. They will also save any slides or animations that were created and the visualization is re-created when the state is loaded. A state file will not save the actual data itself! Instead, it will save where the data was located and it will load the data into the pipeline. Of course if the data file is moved, the state file will not be able to find it and an error will display.


Adding additional datasets

  • Click in the Sources menu and choose the Sphere object. Use the default properties and apply the sphere.
    • Note that new objects can be added at any time.
  • Save the state, then Disconnect
    from the session.
  • Click in the Source menu, choose the Cone, and apply the default properties.
  • Click on File > Recent Files and select the state file.
    • Notice that a window appears asking if you want to Discard the current state, although we haven't created a state file for the cone. It is not possible to load a state when there are objects in the pipeline, and only one state can be loaded at a time.

We have now looked at the differences between saving data objects and saving states. State files should always be used to save projects.

Click on Cancel and then Disconnect from the session.



Return To
Tutorials

Comments