[Paraview] Connection to a server from python / C++

Jefferson Thomas foramuyou at gmail.com
Thu Feb 21 20:15:02 EST 2008


I want to connect to a ParaView server from the ParaView client using
python. Im using Paraview 3.2.1. Following the procedure found on
http://www.paraview.org/Wiki/ParaView:pvpython Im using the code:

import paraview
connection=paraview.Connect()
paraview.ActiveConnection=connection

The connection works but it has no name. Also the previous connection doesnt
disappear and now I have two 3D displays. But the strange thing is that when
I delete manually the first (the one that was there before, the "builtin")
connection (clicking on it and chosing "Delete") then the connection I
created, the new one, suddenly becomes useless - when I try to open the
File->Open dialog or add a new source an error comes up saying "No active
server selected" !
The same thing happens when using a c++ plugin with a code:

vtkProcessModule *promod=vtkProcessModule::GetProcessModule();
promod->ConnectToRemote("localhost",port);

The best would be if the state after connection was like the state you get
after clicking the Connect button in ParaView GUI - the previous connection
disappears and the new one has a name.
How can I do it from inside the C++ code/python ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/paraview/attachments/20080222/0b8c4e26/attachment.htm


More information about the ParaView mailing list