[Paraview] enums in python

Paul Edwards paul.m.edwards at gmail.com
Thu Apr 29 11:09:06 EDT 2010


Hi,

I have this in my XML:

<IntVectorProperty name="Items" command="AddItems"
clean_command="RemoveAllItems" repeat_command="1"
number_of_elements_per_command="1">
    <EnumerationDomain name="array_list">
        <Entry value="1" text="item 1"/>
        <Entry value="2" text="item 2"/>
        <Entry value="3" text="item 3"/>
    </EnumerationDomain>
</IntVectorProperty>

The problem I have is that I don't know how to set the items in python by
their name.  instead I need to call:

filter.Items = [1,2]

rather than:

filter.items = ['item 1', 'item 2']

This seems work work automatically for single items (such as with the mesh
quality filter).  Is this just not implemented for lists or have I done
something wrong?

Thanks in advance,
Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20100429/34fe9f07/attachment.htm>


More information about the ParaView mailing list