Go to www.awrcorp.com
Back to search page Click to download printable version of this guide. Export Unfiltered Field/Mesh to VTK File

To export a mesh or mesh/field data prior to filters to a text file choose Export Unfiltered Field/Mesh to VTK File from a mesh or field annotation's Browser node context menu.

A brief synopsis of the format is listed below. More details can be found in The Visualization Toolkit (https://www.kitware.com/products/books/vtkbook.html).

The format of the files is as follows:

# vtk DataFile Version 3.0
vtk output ASCII
#After this header information, the nodes on which the data is
#output are defined. The first line of the node section lists
#the number of nodes and the data type:
POINTS 200 float
#The nodes definitions follow, and are simply consecutive
#triplets of real numbers that are broken up into lines of
#reasonable length, e.g.:
-6.98297e-015 -4.87618e-029 -1 1 6.98297e-015 -1.72582e-014
1.37668e-014 9.61329e-029 1 -1 -6.98297e-015 1.02753e-014
0.707107 4.9377e-015 -0.707107 0.707107 4.9377e-015 0.707107
-0.707107 -4.9377e-015 0.707107 -0.707107 -4.9377e-015
-0.707107 0.382683 2.67227e-015 -0.92388 0.92388 6.45142e-015
-0.382683 0.92388 6.45142e-015 0.382683 0.382683 2.67227e-015
#The nodes are implicitly numbered from 0. The element
#definitions follow the node listing. The first line lists the
#number of elements and the total number of integers in the element list.
CELLS 764 3820
#Each element definition consists of an integer indicating the
#number of nodes that define the element, followed by the node
#number of each node, and there will be a single element
#definition per line in the output file, e.g.,
4 134 129 133 132
4 134 128 130 129
4 132 129 128 134
4 134 128 132 131
#After the element definition list, there is a list indicating
#the type of each element following the heading. 
#The integer again indicates the number of elements. For
#tetrahedrons, the cell type will always be 10.
#Field data has a header of the form:
VECTORS vectors float
#Followed by consecutive triplets that are arranged into rows
#of reasonable length (similar to the node definitions), e.g.,
0.0262314 0.00602391 -0.0465782 0.831676 -0.0290625 -0.0095951
0.0287873 0.0170979 -0.0514312 0.804472 0.0708395 0.00498523
0.437863 0.0665478 -0.399423 0.394295 -0.00972207 0.395047
0.407604 0.0211681 -0.394472 0.369445 0.012277 0.323042
0.165642 0.0401793 -0.307615

Please send email to awr.support@ni.com if you would like to provide feedback on this article. Please make sure to include the article link in the email.

Legal and Trademark Notice