<div dir="ltr"><div>The programmable source was designed to work on the server-side data only. By the fact that you're using the built-in server (i.e. the ParaView GUI and pvserver run in the same process space) you have access to client-side information like representation type but that stuff is only available after you've fully executed the programmable source script. <br><br></div>You may want to look at using the Python trace functionality and then saving that as a macro. That should be a more consistent solution that also works with a remote pvserver.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 13, 2018 at 12:16 PM, Manochehr Bahavar <span dir="ltr"><<a href="mailto:manoch@iris.washington.edu" target="_blank">manoch@iris.washington.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space">Hello,<div><br></div><div>I have created a Python programmable source to populate and display a vtkPolyData. All works well, however, I would like to change display settings via the same Python code. I found out that after I press The Apply button I can modify the script to set the representation type to ‘Points’ but if I place a GetDisplayProperties statement at the end of the script initially to gain access to these properties, I will get: </div><div><br></div><div><div style="margin:0px"><div style="margin:0px"><span style="font-size:13pt;color:rgb(128,0,0)">Traceback (most recent call last):</span></div><div style="margin:0px"><span style="font-size:13pt;color:rgb(128,0,0)">  File "<string>", line 20, in <module></span></div><div style="margin:0px"><span style="font-size:13pt;color:rgb(128,0,0)">  File "<string>", line 82, in RequestData</span></div><div style="margin:0px"><span style="font-size:13pt;color:rgb(128,0,0)">  File "/Applications/ParaView-5.4.1-<wbr>822-g597adef982.app/Contents/<wbr>Python/paraview/simple.py", line 454, in GetDisplayProperties</span></div><div style="margin:0px"><span style="font-size:13pt;color:rgb(128,0,0)">    return GetRepresentation(proxy, view)</span></div><div style="margin:0px"><span style="font-size:13pt;color:rgb(128,0,0)">  File "/Applications/ParaView-5.4.1-<wbr>822-g597adef982.app/Contents/<wbr>Python/paraview/simple.py", line 437, in GetRepresentation</span></div><div style="margin:0px"><span style="font-size:13pt;color:rgb(128,0,0)">    view = active_objects.view</span></div><div style="margin:0px"><span style="font-size:13pt;color:rgb(128,0,0)">  File "/Applications/ParaView-5.4.1-<wbr>822-g597adef982.app/Contents/<wbr>Python/paraview/simple.py", line 2213, in get_view</span></div><div style="margin:0px"><span style="font-size:13pt;color:rgb(128,0,0)">    self.__get_selection_model("<wbr>ActiveView").GetCurrentProxy()<wbr>)</span></div><div style="margin:0px"><span style="font-size:13pt;color:rgb(128,0,0)">  File "/Applications/ParaView-5.4.1-<wbr>822-g597adef982.app/Contents/<wbr>Python/paraview/simple.py", line 2191, in __get_selection_model</span></div><div style="margin:0px"><span style="font-size:13pt;color:rgb(128,0,0)">    pxm = servermanager.ProxyManager(<wbr>session)</span></div><div style="margin:0px"><span style="font-size:13pt;color:rgb(128,0,0)">RuntimeError: maximum recursion depth exceeded</span></div></div></div><div style="margin:0px"><span style="font-size:13pt;color:rgb(128,0,0)"><br></span></div><div style="margin:0px"><div>How can I address this problem?</div><div><br></div><div>Thanks,</div><div><br></div><div>—manoch</div><div><br></div></div></div><br>______________________________<wbr>_________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" rel="noreferrer" target="_blank">http://paraview.org/Wiki/<wbr>ParaView</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=ParaView" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://public.kitware.com/mailman/listinfo/paraview" rel="noreferrer" target="_blank">https://public.kitware.com/<wbr>mailman/listinfo/paraview</a><br>
<br></blockquote></div><br></div>