Error in Writing to a VTU image

Dear All,

I am trying to write to a VTU file from one example and it is giving the errors of the image.

Can you please inform me how to initialize such variables?


Luis Gonçalves

Please post your code as well as the text of the exception.

I will back again on this later. I have now to prioritize another tasks.

The errors appear with #include <vtkTetra.h>

Good morning,

I isolated the code and created a new project. Seems that is deprecated features. For information it is compile time error.

See the errors:

See the program:
Program to WriteVTU

To replicate the problem:

Project WriteVTU

Are there some more recent program that does what I want?

Can you provide some recent example code to write to a VTU file?


Luis Gonçalves

Do not post image of exception, post the text of the exception using Copy/Paste feature.

In any case, juste enable legacy in your VTK compilation to fix the issue.

Sorry for the image. I think you do not like but I think it is more clear.
I put the option in the image “WANT” (see cmake-gui window). If I put “YES” the VTK package compilation gives error.
But my program still giving the same compilation error if I compile VTK with “WANT”.

Thanks in Advance for the possible help.

Luis Gonçalves

There is not solution for this question? I provided the source code and even the Visual 2017 project. What you need more?

That is not the right legacy option. Probably you’ll need VTK_LEGACY_REMOVE=OFF and VTK_LEGACY_SILENT=ON

Sorry, It did not worked. See the result of the compilation. The VTK_LEGACY_REMOVE was already off. VTK_LEGACY_SILENT was toggled to ON.