.. _append2-example:

#####################
Append Data to VTFx
#####################

.. image:: ../../../images/vtfx/append2_example.png
    :height: 250px
    :align: center

This example opens an existing VTFx file in append mode and adds a new state. 

It will also add scalar result values for the appended state and
update the existing case properties to include this new state in the animation.

The initial VTFx file has three states. The VTFx created by this example will also contain
a fourth newly added state and new scalar results for this state. The first three states (with their result values)
are identical to the initial VTFx file.


.. literalinclude:: ../../../../../../EnvisionDesktop/Examples/VTFx/VTFxAppend2/VTFxAppend2.cpp
    :language: cpp
    :lines: 39-243
