<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    <font size="+1"><font face="Droid Serif">Hi.<br>
        <br>
        I have a ParaView macro which sets up a CSVReader, and a
        PlotData of that.&nbsp; The variable names and legend names and
        series colors are all filled in automatically by ParaView.<br>
        <br>
        What I would like to do is, from the python macro, iterate
        through all series in a chart and make specific ones visible or
        invisible.&nbsp; Recording a python trace of this gives:<br>
        <br>
      </font></font>
    <style type="text/css">p, li { white-space: pre-wrap; }</style>
    <p style="margin: 0px; text-indent: 0px;"> try: paraview.simple</p>
    <p style="margin: 0px; text-indent: 0px;"> except: from
      paraview.simple import *</p>
    <p style="margin: 0px; text-indent: 0px;">
      paraview.simple._DisableFirstRenderCameraReset()</p>
    <p style="margin: 0px; text-indent: 0px;"> PlotData1 =
      GetActiveSource()</p>
    <p style="margin: 0px; text-indent: 0px;"> my_representation0 =
      GetDisplayProperties(PlotData1)</p>
    <p style="margin: 0px; text-indent: 0px;">
      my_representation0.SeriesColor = ['A(0,0)', '0', '1', '0']</p>
    <p style="margin: 0px; text-indent: 0px;">
      my_representation0.SeriesVisibility = ['A(0,0)', '0']</p>
    <p style="margin: 0px; text-indent: 0px;"> Render()</p>
    <br>
    <font size="+1"><font face="Droid Serif">When I go the python shell
        after doing this, and&nbsp; I do this:<br>
        <br>
        &nbsp; p = FindSource("PlotData1")<br>
        &nbsp; d = GetDisplayProperties(p)<br>
        &nbsp; print d.SeriesVisibility<br>
        <br>
        it gives me<br>
        <br>
        &nbsp; ['A(0,0)', '0']<br>
        <br>
        but doesn't say anything about the other series ('A(0,1)' ...
        'A(5,5)).<br>
        <br>
        How do I get at the names of the other series?&nbsp;&nbsp; <br>
        <br>
        If I had them, how would I use them?&nbsp; Like the following?<br>
        <br>
        Thanks.<br>
        <br>
        Greg<br>
        <br>
        new_visibility = []<br>
        For i in xrange(len(series_names)):<br>
        &nbsp; new_visibility.append(series_names[i])<br>
        &nbsp; if series_names[i] == 'A(1,3)':&nbsp; # for example<br>
        &nbsp;&nbsp;&nbsp;&nbsp; new_visibility.append('1')<br>
        &nbsp; else:<br>
        &nbsp;&nbsp;&nbsp;&nbsp; new_visibility.append('0')<br>
        <br>
        d.SeriesVisibility = new_visibility<br>
        <br>
        Render()<br>
        &nbsp; <br>
      </font></font>
  </body>
</html>