.. _simple-load-vtf-example:

#################################################################
UnstructGrid: Load Model from File and Set Up Model Specification 
#################################################################

This example shows how to load a data source from a VTF file and set up the
model specification. 

.. image:: ../images/tut_loadvtf.png
    :height: 300 
    :align: center

This data source contains multiple states, scalar results, vector results and a displacement
result. After opening the file, the available metadata can be queried through the data source
directory. In this example you will set up the model specification to show the following:

-   Set the last state id as current
-   Set the first scalar result as fringes on the model
-   Set the first vector result
-   Set the first displacement result

Remember to toggle on result visibility in each part's PartSettings. 


.. literalinclude:: ../../../../EnvisionDesktop/Tutorials/SimpleLoadVTFx.cpp
    :language: cpp
    :lines: 39-116