Hi Greg,

I think I found a bug, or else I don't quite understand what is happening.
It seems that under certain circumstances the python layer fails to wrap all
the properties of a proxy.  I look into this, but for now you can work
around the issue by accessing the c++ api:

 >>> p = rep.SMProxy.GetProperty("SeriesNamesInfo")

>>> series_names = [p.GetElement(i) for i in
xrange(p.GetNumberOfElements())]


Pat

On Thu, Oct 6, 2011 at 2:34 PM, Greg Schussman
<schuss...@slac.stanford.edu>wrote:

> **
> Hi, Pat.
>
> I tried plotting directly from the CSVReader, and then it all works.   But
> when my programmable filter is in between, there's a problem.  When I apply
> the plot filter  (via ParaView's GUI) to my programmable filter, the plot
> works fine in the gui, but the GetProperty("SeriesNameInfo") returns None.
> However, if I skip the programmable filter, and plot the CSV reader
> directly, then GetProperty("SeriesNameInfo") does what you say it should.
>
> Anyway, I think I can skip my programmable filter for now, and get this
> working dircetly.
>
> Thanks so much for what you've provided.
>
>
> Greg
>
>
> On 10/06/2011 11:10 AM, pat marion wrote:
>
> Are you sure that the chart view is the active view when you call
> GetDisplayProperties(p)?   If the render view is active, you'll get the
> wrong representation.  I verified that this works for Wavelet --> Plot Data
> filter using PV 3.10.1.
>
> Pat
>
> On Thu, Oct 6, 2011 at 2:03 PM, Greg Schussman <
> schuss...@slac.stanford.edu> wrote:
>
>>  On 10/06/2011 07:33 AM, pat marion wrote:
>>
>> series_names = [name for name in d.GetProperty("SeriesNamesInfo")]
>>
>>
>> Hi, Pat.
>>
>> Thanks for the helpful pointers.
>>
>> After setting everything up in ParaView (3.10.1, 64-bit), I'm not getting
>> results.  Here is what I did from the ParaView Python Shell:
>>
>>  >>> p = FindSource("PlotData1")
>>
>> >>> rep = GetDisplayProperties(p)
>>
>> >>> rep.GetProperty("SeriesNamesInfo")
>>
>> None
>>
>> >>>
>>
>> While, at the same time, the Object Inspector shows 27 series, each with
>> the correct name.
>>
>> Does something need to be updated or refreshed first?  I notice in the
>> pvblot script, there is a
>>
>>   rep.Update()
>>
>> but when I try that in ParaView's python shell (after getting the
>> representation the way I showed above), it tells me:
>>
>>
>> >>> rep.Update()
>>
>> Traceback (most recent call last):
>>
>> File "<console>", line 1, in <module>
>>
>> File "/usr/lib64/paraview/site-packages/paraview/servermanager.py", line
>> 370, in __getattr__
>>
>> return getattr(self.SMProxy, name)
>>
>> AttributeError: Update
>>
>> >>>
>>
>> Thanks!
>>
>> Greg
>>
>>
>>
>
>
_______________________________________________
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

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview

Reply via email to