<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Did anyone of you write EnSight files and did not have problems with
BlockID?<br>
<br>
Regards, M.B.<br>
<br>
<br>
<br>
Martin Baumann schrieb:
<blockquote cite="mid44929EBB.5050501@web.de" type="cite">
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
<div class="moz-text-html" lang="x-western"> Hi,<br>
<br>
I am trying to save EnSight data files with the following code:<br>
<pre> string in_file = <span style="color: rgb(221, 0, 0);">"test.asc"</span>;
string out_file = <span style="color: rgb(221, 0, 0);">"ensight.ens"</span>;
<span style="color: rgb(128, 128, 128);"><i>// **********************************************</i></span>
<span style="color: rgb(128, 128, 128);"><i>// read Legacy-Format variables</i></span>
<span style="color: rgb(128, 128, 128);"><i>// **********************************************</i></span>
vtkUnstructuredGridReader* _reader = vtkUnstructuredGridReader::New();
_reader->SetFileName(in_file.c_str());
_reader->Update();
<span style="color: rgb(128, 128, 128);"><i>// **********************************************</i></span>
<span style="color: rgb(128, 128, 128);"><i>// write EnSight</i></span>
<span style="color: rgb(128, 128, 128);"><i>// **********************************************</i></span>
vtkEnSightWriter* _ens_writer = vtkEnSightWriter::New();
_ens_writer->SetFileName(out_file.c_str());
_ens_writer->SetInput(_reader->GetOutput());
_ens_writer->Write();
_ens_writer->WriteCaseFile(<span style="color: rgb(0, 0, 255);">1</span>);
</pre>
<br>
When I run this I get the error <br>
No BlockID was found<br>
for some some hundred times.<br>
<br>
Still threee files are created:<br>
ensight.0.case <br>
ensight.0.00000.geo <br>
ensight.0.00000_n.u_x<br>
<br>
- I tried to find out what the error means. What are BlockIDs used for?<br>
- Is there any information on writing EnSight files with vtk?<br>
- In the example file (test.asc) there are contained three scalars:
u_x, u_y and u_z.<br>
Only one (u_x) is written to an EnSight data file. I need to export all
of the<br>
scalars and vectors if there are any in the input file. How can I do
this?<br>
<br>
Regards, M.B.<br>
</div>
<pre wrap="">
<hr size="4" width="90%">
_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at: <a class="moz-txt-link-freetext" href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a>
Follow this link to subscribe/unsubscribe:
<a class="moz-txt-link-freetext" href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</a>
</pre>
</blockquote>
</body>
</html>