# Is there a way to read LSDyna keyword files (.k) directly in vtk?

**URL:** <https://discourse.vtk.org/t/is-there-a-way-to-read-lsdyna-keyword-files-k-directly-in-vtk/10817>\
**Category:** Development\
**Tags:** code, file-formats\
**Created:** [February 26, 2023, 11:19pm UTC](https://discourse.vtk.org/t/is-there-a-way-to-read-lsdyna-keyword-files-k-directly-in-vtk/10817 "2023-02-26T23:19:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Prakhar\_Singh](https://discourse.vtk.org/user_avatar/discourse.vtk.org/prakhar_singh/32/6637_2.png) [@Prakhar\_Singh](https://discourse.vtk.org/u/Prakhar_Singh)\
**Post date:** [February 26, 2023, 11:19pm UTC](https://discourse.vtk.org/t/is-there-a-way-to-read-lsdyna-keyword-files-k-directly-in-vtk/10817/1 "2023-02-26T23:19:31Z")

</div>

I am a beginner in computer graphics and vtk. I have a directory with .k files containing mesh data which I want to visualize using vtk.

I have particularly following doubts:

Can .k files be read using vtk ? If yes, how? If no, what should be the workaround ?

I came to know about vtkLSDynaReader class but didn’t get any examples to move forward. I set the database directory by doing

```auto
vtkLSDynaReader* reader = vtkLSDynaReader::New();
reader->SetDatabaseDirectory(dir);
reader->Update();

```

Upon running the application I get the error :

```auto
vtkCompositeDataPipeline (00000000003696B0): Algorithm vtkLSDynaReader(0000000000366BB0) returned failure for request: vtkInformation (000000000036DD10)
  Debug: Off
  Modified Time: 108
  Reference Count: 1
  Registered Events: (none)
  Request: REQUEST_DATA
  ALGORITHM_AFTER_FORWARD: 1
  FORWARD_DIRECTION: 0
  FROM_OUTPUT_PORT: 0

```
