<!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">
<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-&gt;SetFileName(in_file.c_str());
  _reader-&gt;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-&gt;SetFileName(out_file.c_str());
  _ens_writer-&gt;SetInput(_reader-&gt;GetOutput());
  _ens_writer-&gt;Write();
  _ens_writer-&gt;WriteCaseFile(<span style="color: rgb(0, 0, 255);">1</span>);
</pre>
<br>
When I run this I get the error <br>
&nbsp; No BlockID was found<br>
for some some hundred times.<br>
<br>
Still threee files are created:<br>
&nbsp; ensight.0.case <br>
&nbsp; ensight.0.00000.geo <br>
&nbsp; 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>
</body>
</html>