# Showing the structure of an HDF5 file (drive)

**URL:** <https://forum.hdfgroup.org/t/showing-the-structure-of-an-hdf5-file-drive/2558>\
**Category:** Hdf-forum archives\
**Created:** [May 24, 2012, 1:21pm UTC](https://forum.hdfgroup.org/t/showing-the-structure-of-an-hdf5-file-drive/2558 "2012-05-24T13:21:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gheber](https://forum.hdfgroup.org/user_avatar/forum.hdfgroup.org/gheber/32/1919_2.png) [@gheber](https://forum.hdfgroup.org/u/gheber)\
**Post date:** [May 24, 2012, 1:21pm UTC](https://forum.hdfgroup.org/t/showing-the-structure-of-an-hdf5-file-drive/2558/1 "2012-05-24T13:21:43Z")

</div>

I just finished reading an early release of Doug Finke's upcoming  
O'Reilly book 'Windows PowerShell for Developers'  
( [Windows PowerShell for Developers [Book]](http://shop.oreilly.com/product/0636920024491.do) )  
which I thoroughly enjoyed. In Chapter 9, 'Writing Little languages in  
PowerShell',  
he has a section on GraphViz ( [http://www.graphviz.org/](http://www.graphviz.org/) - drawing graphs  
since before  
you were born 😉 and how to write DOT files from PowerShell. Wouldn't it be  
nice  
to have a cmdlet in PSH5X that creates a quick visual of an HDF5 drive?

vi Show-H5Drive.ps1 ... (Have a look at the source!)

The latest version of PSH5X includes the Show-H5Drive cmdlet which  
conveys the idea. (Improve it for your own purpose!)  
The attached PNG was created via

Show-H5Drive sample | & 'C:\Program Files (x86)\Graphviz 2.28\bin\dot.exe'  
-Tpng -o sample.png

or SVG

Show-H5Drive h5 | & 'C:\Program Files (x86)\Graphviz 2.28\bin\dot.exe' -Tsvg  
-o h5.svg

or ...

It shows the (multi-)graph structure of the sample file from the PSH5X  
tutorial.  
The edge labels are link names and the node labels are of the form:  
{item type abbreviation}\_{address in the HDF5 file}  
For example, G\_1293 is a group object at address 1293.  
'sample.gv' shows the output generated by Show-H5Drive. Check it out for  
yourself!

Relevant links:

PSH5X website: [http://www.hdfgroup.org/projects/PSH5X/](http://www.hdfgroup.org/projects/PSH5X/)

The movie: [http://www.hdfgroup.org/ftp/HDF5/projects/psh5x/PSH5X.mov](http://www.hdfgroup.org/ftp/HDF5/projects/psh5x/PSH5X.mov)

The bits: [http://www.hdfgroup.org/ftp/HDF5/projects/psh5x/PSH5X.zip](http://www.hdfgroup.org/ftp/HDF5/projects/psh5x/PSH5X.zip)

Twitter: [http://twitter.com/@psh5x](http://twitter.com/@psh5x)

Best, G.

 ![](https://hdf-discourse-1.s3.amazonaws.com/original/1X/dd871d505bb56617c4580a1756480c445f142ec2.png)

[sample.gv](https://hdf-discourse-1.s3.amazonaws.com/original/1X/07e5d3ef26307466b060587a017fb6dd83ef625f.gv) (1.19 KB)

![](https://hdf-discourse-1.s3.amazonaws.com/original/1X/6726b9ecbda816f82361b55f63e7714895a3dff5.svg)
