vtk is a valid extension but maybe not for the writer factory for some reason.<div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Nov 28, 2012 at 3:10 PM, Ian Krukow <span dir="ltr"><<a href="mailto:i.krukow@tu-braunschweig.de" target="_blank">i.krukow@tu-braunschweig.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Ok, that helps for a possible solution. Thanks!<br>
With<br>
<br>
writer = CreateWriter('sol_i=0.vtm')<br>
writer.UpdatePipeline()<br>
<br>
I get an XML file, that can be loaded back into ParaView.<br>
---<br>
Still the behaviour I noticed before remains strange.<br>
<br>
I used the extension ".vtk". From the GUI, I chose "Save Data", and then "Legacy VTK Files(*.vtk)", which should be a valid option, because it is explicitly offered. The pvpython commands were<br>
<br>
writer = DataSetWriter(slice)<br>
writer.FileName = 'sol_i=0.vtk'<br>
writer.FileType = "Ascii"<br>
writer.UpdatePipeline()<br>
<br>
The result of both is the same, i.e. a file with the following structure:<br>
<br>
# vtk DataFile Version 3.0<br>
vtk output<br>
ASCII<br>
DATASET MULTIBLOCK<br>
CHILDREN 96<br>
CHILD 0<br>
# vtk DataFile Version 3.0<br>
vtk output<br>
ASCII<br>
DATASET POLYDATA<br>
POINTS 39714 float<br>
...<br>
POLYGONS 77132 308528<br>
...<br>
POINT_DATA 39714<br>
...<br>
ENDCHILD<br>
CHILD 0<br>
# vtk DataFile Version 3.0<br>
vtk output<br>
ASCII<br>
DATASET POLYDATA<br>
POINTS 219146 float<br>
...<br>
ENDCHILD<br>
CHILD 0<br>
...<br>
ENDCHILD<br>
...<br>
<br>
Each part between "CHILD 0" and "ENDCHILD" would be a complete Legacy VTK file in itself.<br>
The ParaView version is 3.14.1.<br>
<br>
By the way, when I use<br>
<br>
writer = CreateWriter('sol_i=0.vtk')<br>
<br>
I get the following error message:<br>
<br>
ERROR: In [...]\src\ParaViewCore\<u></u>ServerManager\<u></u>vtkSMWriterFactory.cxx, line 374<br>
vtkSMWriterFactory: No matching writer found for extension: vtk<br>
<br>
Is ".vtk" not a valid file extension?<br>
<br>
<br>
<br>
Am 28.11.2012 19:55, schrieb Sebastien Jourdain:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
There is no multi-block legacy format. What file extension did you try<br>
to write ? It should be .vtm by default.<br>
<br>
<br>
<br>
On Wed, Nov 28, 2012 at 11:52 AM, Ian Krukow<br></div><div class="im">
<<a href="mailto:i.krukow@tu-braunschweig.de" target="_blank">i.krukow@tu-braunschweig.de</a> <mailto:<a href="mailto:i.krukow@tu-braunschweig.de" target="_blank">i.krukow@tu-<u></u>braunschweig.de</a>>> wrote:<br>
<br>
Hi,<br>
<br>
I have loaded an EnSight file (results from an external code) into<br>
ParaView, taken a slice from it and saved it in Legacy VTK format.<br>
The result is a VTK file with multiblock datasets. When I try to<br>
load it again, ParaView does not recognise the file format and asks<br>
me to choose a reader. Why does ParaView not know the format of a<br>
file, that it has written itself?<br>
<br>
The written VTK file contains several "CHILDREN" with part of the<br>
data (I suppose that it is just divided) plus several empty<br>
CHILDREN. If I put the data of a single CHILD into a seperate file,<br>
I can load it into ParaView without any problems.<br>
Now, I could manipulate the file "by hand" (or script), so that I<br>
get a file I can use again in ParaView, but I just do not think,<br>
that this is the way it is supposed to be. Can somebody help me?<br>
<br>
Best regards<br>
Ian<br></div>
______________________________<u></u>___________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a> <<a href="http://www.kitware.com" target="_blank">http://www.kitware.com</a>><div class="im"><br>
<br>
Visit other Kitware open-source projects at<br></div>
<a href="http://www.kitware.com/__opensource/opensource.html" target="_blank">http://www.kitware.com/__<u></u>opensource/opensource.html</a><div class="im"><br>
<<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/<u></u>opensource/opensource.html</a>><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at:<br></div>
<a href="http://paraview.org/Wiki/__ParaView" target="_blank">http://paraview.org/Wiki/__<u></u>ParaView</a> <<a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/<u></u>ParaView</a>><div class="im">
<br>
<br>
Follow this link to subscribe/unsubscribe:<br></div>
<a href="http://www.paraview.org/__mailman/listinfo/paraview" target="_blank">http://www.paraview.org/__<u></u>mailman/listinfo/paraview</a><br>
<<a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/<u></u>mailman/listinfo/paraview</a>><br>
<br>
<br>
</blockquote><div class="HOEnZb"><div class="h5">
______________________________<u></u>_________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/<u></u>opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/<u></u>ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/<u></u>mailman/listinfo/paraview</a><br>
</div></div></blockquote></div><br></div>