# Get multi block dataset structure in python

**URL:** https://discourse.paraview.org/t/get-multi-block-dataset-structure-in-python/17628
**Category:** ParaView Support
**Created:** [June 19, 2026, 12:58pm UTC](https://discourse.paraview.org/t/get-multi-block-dataset-structure-in-python/17628 "2026-06-19T12:58:14Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Captain\_Convergence](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/c/e19b73/32.png) [@Captain\_Convergence](https://discourse.paraview.org/u/Captain_Convergence)
#### Post date: [June 19, 2026, 12:58pm UTC](https://discourse.paraview.org/t/get-multi-block-dataset-structure-in-python/17628/1 "2026-06-19T12:58:14Z")

</div>

Dear support,

I would like to know if there is an method to parse or get the hierarchical structure of a multi block data set in python in a dictionary, XML or similar way which is quite useful for looping over the blocks. At the moment I usually do something like this:

```auto
# While loop to scan the hierarchy
i = 0
blk_names = []
while (blk_name := MyDataSet.GetDataInformation().DataInformation.GetBlockName(i)): # Stops when finds the same name (empty fields like '' in this case)
    blk_name.append(blk_name.lstrip('/'))
    i += 1

```

So I can have a list that I can parse later on using keywords. Is there any better way to do this? I feel this is quite primitive 😬
