# Code Examples

Reading and running the provided examples is a good way to start using the VTFx Component. There are multiple examples included in the distribution showcasing a range of features and levels of complexity. All examples are shipped with Visual Studio project files and Makefiles and are ready to run directly from the Examples folder. The generated VTFx files can be opened in all Envision products, including our free viewers. Download the HOOPS Envision Demo Viewer for free from the developer zone, https://developer.techsoft3d.com/.

The main language for the examples are C++. There is also one C# example and one Python example included, but reading and adapting the C++ examples should be trivial. If you are a C# user, please read the topic C# Users: Features and Differences. If you are a Python user, please read the topic Python Users: HOOPS Envision for Python.

The minimal example is also available as a tutorial and is a good entry point for starting programming using the VTFx Component. Find this tutorial at Tutorial: My First VTFx.

All the examples are found under the folder /Examples/VTFx/ in the distribution.

| Minimal VTFx File This example shows how to create a minimal VTFx file with a simple part consisting of just one element, with only one state and no results or properties.
| Simple VTFx File Simple VTFx file including result fringes and multiple states. The example has two simple parts, one scalar result and three time steps. It uses properties to set up an animation of the results.
| Advanced Example A more advanced example showing multiple parts, two states, various result types and properties. It demonstrates different ways of populating the blocks.
| Read VTFx File Reads a VTFx file and prints the content of databases, cases and blocks.
| Append Case to VTFx Opens an existing VTFx file and appends an additional case to it. The appended case sets draw style on the first part to line and sets color and opacity on the second part.
| Append Data to VTFx Opens an existing VTFx file and adds a state. This example also adds scalar result values for this new state and updates the properties to include this state in the animation.
| Cutting Plane and Isosurface Showing isosurface and cutting plane features in VTFx. Isosurfaces and cutting planes are set as properties. This example creates a small part with a scalar result shown as fringes and adds an isosurface and a cutting plane.
| Two Geometries Creating a VTFx using two geometries
| Two Geometries Creating a VTFx using adaptive geometries
| Send to Cloud Creating a VTFx and sending it to Ceetron Cloud for viewing
| Cross Sections Creating a VTFx using cross section element expansion for beams
| Cross Sections (All types) Creating a VTFx showing all available cross section element expansion for beams
| Polyhedron Simple example on creating polyhedron elements

Conversation saved
HOOPSY BETA

### Hello! I'm HOOPSY

Your multilingual generative AI assistant for documentation. Ask me anything about HOOPS Envision for Desktop in your own language, or choose a sample question below to start a conversation:

What is HOOPS Envision for Desktop?
What are the latest release notes for HOOPS Envision for Desktop?
How do I start evaluating HOOPS Envision for Desktop?
How do I write my first sample application?
How can I get assistance?

HOOPSY may store conversations according to OpenAI's policy. Responses may not always be accurate.

HOOPSY is thinking...