# Example of vtkhdf with PartitionedDataSetCollection and Asembly

**URL:** https://discourse.paraview.org/t/example-of-vtkhdf-with-partitioneddatasetcollection-and-asembly/16429
**Category:** ParaView Support
**Tags:** vtkhdf
**Created:** [April 4, 2025, 10:58am UTC](https://discourse.paraview.org/t/example-of-vtkhdf-with-partitioneddatasetcollection-and-asembly/16429 "2025-04-04T10:58:25Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Borek\_Patzak](https://discourse.paraview.org/user_avatar/discourse.paraview.org/borek_patzak/32/13669_2.png) [@Borek\_Patzak](https://discourse.paraview.org/u/Borek_Patzak)
#### Post date: [April 4, 2025, 10:58am UTC](https://discourse.paraview.org/t/example-of-vtkhdf-with-partitioneddatasetcollection-and-asembly/16429/1 "2025-04-04T10:58:25Z")

</div>

Hello,  
can anyone provide simple vtkhdf input file that illustrates how to encode properly model using PartitionedDataSetCollection and Asemblies?

Thank you,  
Borek

---

<div class="post-metadata">

### Author: ![Louis\_Gombert](https://discourse.paraview.org/user_avatar/discourse.paraview.org/louis_gombert/32/14576_2.png) [@Louis\_Gombert](https://discourse.paraview.org/u/Louis_Gombert)
#### Post date: [April 4, 2025, 12:51pm UTC](https://discourse.paraview.org/t/example-of-vtkhdf-with-partitioneddatasetcollection-and-asembly/16429/2 "2025-04-04T12:51:28Z")

</div>

Hello, here is the file we use for testing purposes in VTK: [test\_composite.hdf](https://discourse.paraview.org/uploads/short-url/nYXOSl4dALeKJq2iRQRxJSHdKw1.hdf) (27.1 KB)

It is a simple assembly where you have 2 partitioned datasets, one PolyData (Block0) and one unstructured grid (Block1).

In the hierarchy, you have `blockName0` which is linked to the dataset `Block0`, `blockName2` which is linked to dataset `Block1`, and a subgroup `groupName0` which contains `blockName1`, linked again to `Block1`. PartitionedDataSetCollection is made so that one dataset can be referenced multiple times. Also note that datasets have an `Index` attribute, and the link creation order in the hierarchy should be tracked.

Let me know if you have any questions.

---

<div class="post-metadata">

### Author: ![habakuk](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/h/df705f/32.png) [@habakuk](https://discourse.paraview.org/u/habakuk)
#### Post date: [May 27, 2025, 9:32am UTC](https://discourse.paraview.org/t/example-of-vtkhdf-with-partitioneddatasetcollection-and-asembly/16429/3 "2025-05-27T09:32:49Z")

</div>

Similar issue - the composite file is not recognized by ParaView on import (A reader … could not be found):  
[multitest.vtkhdf](https://discourse.paraview.org/uploads/short-url/avZxsy0SSzkn4CT8ESg5PmlPSVD.vtkhdf) (297.3 KB)

Common issues which have been checked:

- Link creation order is tracked for Assembly group
- “Type” attribute has ASCII charset
- Dataset groups have “Index” attribute set

I have checked the structure and datatypes versus the test\_composite.hdf posted above and it seems to be consistent. However, the test\_composite.hdf file opens without issues.

I cannot see any other sources of the problem now. Can someone else have a look at it, please? Also, is there any option how to track/debug the loading process (and pinpoint the source of failure)?

Thanks!

---

<div class="post-metadata">

### Author: ![Louis\_Gombert](https://discourse.paraview.org/user_avatar/discourse.paraview.org/louis_gombert/32/14576_2.png) [@Louis\_Gombert](https://discourse.paraview.org/u/Louis_Gombert)
#### Post date: [May 27, 2025, 10:14am UTC](https://discourse.paraview.org/t/example-of-vtkhdf-with-partitioneddatasetcollection-and-asembly/16429/4 "2025-05-27T10:14:37Z")

</div>

Hello @habakuk , we currently only handle fixed-length strings for the “Type” attribute.

You can easily fix it from a h5py script:

```python
import h5py as h5

f = h5.File('multitest.vtkhdf', 'r+')

ascii_type = 'PartitionedDataSetCollection'.encode('ascii')
f["VTKHDF"].attrs.pop('Type')
f["VTKHDF"].attrs.create('Type', ascii_type, dtype=h5.string_dtype('ascii', len(ascii_type))) 

f.close()

```

now the file opens correctly in ParaView.

That’s something we should fix in the reader…

---

<div class="post-metadata">

### Author: ![habakuk](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/h/df705f/32.png) [@habakuk](https://discourse.paraview.org/u/habakuk)
#### Post date: [May 27, 2025, 10:28am UTC](https://discourse.paraview.org/t/example-of-vtkhdf-with-partitioneddatasetcollection-and-asembly/16429/5 "2025-05-27T10:28:16Z")

</div>

Thanks, that fixed the issue.

I did not thought of it (although I was aware of this difference), since it matters only for the composite datasets. The Type of individual block can have variable length, and same for the single-dataset file (i.e. no Assembly and VTKHDF[“Type”] = “UnstructuredGrid”), which I have successfully tested before.

---

<div class="post-metadata">

### Author: ![Louis\_Gombert](https://discourse.paraview.org/user_avatar/discourse.paraview.org/louis_gombert/32/14576_2.png) [@Louis\_Gombert](https://discourse.paraview.org/u/Louis_Gombert)
#### Post date: [May 28, 2025, 7:50am UTC](https://discourse.paraview.org/t/example-of-vtkhdf-with-partitioneddatasetcollection-and-asembly/16429/6 "2025-05-28T07:50:19Z")

</div>

This was indeed a bug in ParaView, which I’m fixing here: [https://gitlab.kitware.com/vtk/vtk/-/merge\_requests/12158](https://gitlab.kitware.com/vtk/vtk/-/merge_requests/12158)

The fix will be available in ParaView 6.0.
