# boolean input for Python Plugin

**URL:** https://discourse.paraview.org/t/boolean-input-for-python-plugin/14146
**Category:** ParaView Support
**Tags:** python
**Created:** [March 13, 2024, 2:58pm UTC](https://discourse.paraview.org/t/boolean-input-for-python-plugin/14146 "2024-03-13T14:58:43Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Andy\_Bauer](https://discourse.paraview.org/user_avatar/discourse.paraview.org/andy_bauer/32/5442_2.png) [@Andy\_Bauer](https://discourse.paraview.org/u/Andy_Bauer)
#### Post date: [March 13, 2024, 2:58pm UTC](https://discourse.paraview.org/t/boolean-input-for-python-plugin/14146/1 "2024-03-13T14:58:43Z")

</div>

Hi,

Is there a way to set an `intvector ` with a boolean domain for a Python Plugin? What I’m trying to do is have a checkbox in the GUI. I don’t see how to do that for a Python Plugin.

Thanks,  
Andy

---

<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: [March 13, 2024, 4:27pm UTC](https://discourse.paraview.org/t/boolean-input-for-python-plugin/14146/2 "2024-03-13T16:27:51Z")

</div>

Here’s a snippet from a reader I made:

```python
@smproperty.xml("""
    <IntVectorProperty name="PadData"
        label="Pad Data"
        command="SetPadStatus"
        number_of_elements="1"
        default_values="1">
        <BooleanDomain name="bool" />
        <Documentation>If checked, dataset will be padded at all timestates
            to ensure consistent block indices</Documentation>
    </IntVectorProperty>
    """)
def SetPadStatus(self, val):
    '''Set attribute to signal whether data should be padded when RequestData is called
    '''
    self.pad_data = val
    self.Modified()

```

---

<div class="post-metadata">

### Author: ![Andy\_Bauer](https://discourse.paraview.org/user_avatar/discourse.paraview.org/andy_bauer/32/5442_2.png) [@Andy\_Bauer](https://discourse.paraview.org/u/Andy_Bauer)
#### Post date: [March 13, 2024, 4:37pm UTC](https://discourse.paraview.org/t/boolean-input-for-python-plugin/14146/3 "2024-03-13T16:37:06Z")

</div>

Thanks – that’s exactly what I was looking for.
