[Paraview] Python question - ElementBlocks

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Thu May 19 08:11:38 EDT 2016


The following should do the trick:

    activesourcefile.ElementBlocks.SelectAll()

Calling help(activesourcefile.ElementBlocks) will show info about all
available API (extract below):

  help(a.ElementBlocks)
  Help on ArrayListProperty in module paraview.servermanager object:

  class ArrayListProperty(VectorProperty)
   |  This property provides a simpler interface for selecting arrays.
   |  Simply assign a list of arrays that should be loaded by the reader.
   |  Use the Available property to get a list of available arrays.
   |
   ...
   |  Methods defined here:
   |
   |  DeselectAll(self)
   |      Deselects all arrays.
   |
   |  GetAvailable(self)
   |      Returns the list of available arrays
   |
   |  GetData(self)
   |      Returns all elements as a list.
   |
   |  SelectAll(self)
   |      Selects all arrays.
   |
   |  SetData(self, values)
   |      Allows setting of all values at once. Requires a single value,
   |      a tuple or list.
   ...
   |
   |  ----------------------------------------------------------------------
   |  Data descriptors defined here:
   |
   |  Available
   |      This read-only property contains the list of items that can
be read by a reader.
   |
   ...

Utkarsh

On Wed, May 18, 2016 at 9:53 PM, Scott, W Alan <wascott at sandia.gov> wrote:
> Is it necessary to include the list of blocks in the script similar to the
> line below or is it possible to say "all" to include all of the blocks all
> of the time or something similar?
>
>
>
> o   activesourcefile.ElementBlocks = ['block_1', 'block_2', 'block_3']
>
>
>
>
>
> Thanks,
>
>
>
> Alan
>
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Search the list archives at: http://markmail.org/search/?q=ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/paraview
>


More information about the ParaView mailing list