Say I have a vtp file which contains 100 points (and vertices). I know how to add a vector of the same length with information about each point, but is there a way to add just a single integer or double or something? For example, if I want to know this was the 4th file, I would want to store FileIndex=4 in the file. If I add a vtkIntArray with only one element, paraview gets mad when I open the file because that array is not the same length as the point array.<br>
<br>This is what I was doing:<br>vtkSmartPointer&lt;vtkIntArray&gt; FileIndex = vtkSmartPointer&lt;vtkIntArray&gt;::New();<br>    FileIndex-&gt;SetNumberOfComponents(1);<br>    FileIndex-&gt;SetName(&quot;FileIndex&quot;);<br>
    FileIndex-&gt;InsertNextValue(4);<br>    pdata-&gt;GetPointData()-&gt;AddArray(FileIndex);<br><br>What I want to do would be something like this:<br>    pdata-&gt;AddData(&quot;FileIndex&quot;)-&gt;AddValue(4); //this is not valid VTK syntax<br>
<br>Is there any way to do this?<br><br clear="all">Thanks,<br><br>David<br>