# Explicitly naming variables and blocks in trace

**URL:** https://discourse.paraview.org/t/explicitly-naming-variables-and-blocks-in-trace/8515
**Category:** Development
**Created:** [November 29, 2021, 10:00pm UTC](https://discourse.paraview.org/t/explicitly-naming-variables-and-blocks-in-trace/8515 "2021-11-29T22:00:28Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![wascott](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/w/8e8cbc/32.png) [@wascott](https://discourse.paraview.org/u/wascott)
#### Post date: [November 29, 2021, 10:00pm UTC](https://discourse.paraview.org/t/explicitly-naming-variables-and-blocks-in-trace/8515/1 "2021-11-29T22:00:28Z")

</div>

I have been looking at traces (IOSSReader and ExodusIIReader), and both explicitly set variables and blocks. However, this is both redundant and not necessary, as the reader turns them all on by default. Here is the code of interest for the IOSSReader from 5.10.0-RC1:

```auto
canex2 = IOSSReader(registrationName='can.ex2', FileName=['/Applications/PV/can.ex2'])
canex2.ElementBlocks = ['block_1', 'block_2']
canex2.NodeBlockFields = ['accl', 'displ', 'vel']
canex2.ElementBlockFields = ['eqps']

```

Why do we even need to set the ElementBlocks, NodeBlockFields or ElementBlockFields? It has confused numerous users, and me until I looked at it closely. I would like to propose that the trace recorder NOT set these, but just add a comment in case users want to set blocks or fields. For instance,

```auto
canex2 = IOSSReader(registrationName='can.ex2', FileName=['/Applications/PV/can.ex2'])
# canex2.ElementBlocks = ['block_1', 'block_2']
# canex2.NodeBlockFields = ['accl', 'displ', 'vel']
# canex2.ElementBlockFields = ['eqps']

```

The reason to not explicitly set these is that the same trace is more generic, and still works correctly. If a user wants to find out what the Fields are, they can use the GetProperty command.

@utkarsh.ayachit @cory.quammen

---

<div class="post-metadata">

### Author: ![theodorebaltis](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/t/e480ec/32.png) [@theodorebaltis](https://discourse.paraview.org/u/theodorebaltis)
#### Post date: [November 30, 2021, 3:09pm UTC](https://discourse.paraview.org/t/explicitly-naming-variables-and-blocks-in-trace/8515/2 "2021-11-30T15:09:28Z")

</div>

I believe the XDMFReader exhibits similar behavior with respect to its `PointArrayStatus` and `CellArrayStatus` attributes.

---

<div class="post-metadata">

### Author: ![wascott](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/w/8e8cbc/32.png) [@wascott](https://discourse.paraview.org/u/wascott)
#### Post date: [December 1, 2021, 3:26am UTC](https://discourse.paraview.org/t/explicitly-naming-variables-and-blocks-in-trace/8515/3 "2021-12-01T03:26:20Z")

</div>

[https://gitlab.kitware.com/paraview/paraview/-/issues/21114](https://gitlab.kitware.com/paraview/paraview/-/issues/21114)
