<html><head><style> body {height: 100%; color:#000000; font-size:12pt; font-family:Times New Roman;}</style></head><body>Thank you very much Seb :) <br><br>----- Original Message -----<br>From: Sebastien Jourdain <sebastien.jourdain@kitware.com><br>To: Tuan Ha Tran <tuan-ha.tran@insa-lyon.fr><br>Cc: paraview-developers@paraview.org, paraview@paraview.org<br>Sent: Wed, 06 Jun 2012 14:08:34 +0200 (CEST)<br>Subject: Re: [Paraview] Setter and getter for ParaView Plugin<br><br>Hi Tuan,<br><br>an information_only property is used to retrieve value from the object<br>by calling some Get Macro.<br>But information property does not behave the same way a regular property does.<br>In fact, you need to explicitly call on your proxy<br>UpdatePropertyInformation() in order to update the local values of<br>those information properties.<br>In ParaViewWeb, the method UpdatePropertyInformation() is not exposed<br>therefore, you will need to write a helper plugin in python.<br><br>Here is a sample code that illustrate what you want to achieve:<br><br>=== file: helper.py ====<br><br>def getProperty( proxy, propertyName ):<br> proxy.UpdatePropertyInformation()<br> return eval("proxy." + propertyName) ## You might need to fix<br>that line, but you get the idea...<br><br>==== JavaScript part =====<br><br>helper = paraview.getPlugin('helper');<br>var value = helper.getProperty( myProxy, 'NumberOfSomething' );<br><br>Seb<br><br>On Tue, Jun 5, 2012 at 5:42 PM, Tuan Ha Tran <tuan-ha.tran@insa-lyon.fr> wrote:<br>> Thank you very much for your reply, Seb.<br>> I have been reading lots of exemple in the .xml files before I ask you this<br>> question :<br>> For input, we have command="SetInputArrayToProcess" to know that there is a<br>> function (if i'm right) which is linked with the input.<br>> But for the output, there isn't any information like that. So, I wonder if<br>> the output as information_only="1" is the return value of an vtkGetMacro?<br>> And if the return value of my function is not an attribute of my class, is<br>> there any way to see this return value?<br>><br>><br>><br>> ----- Original Message -----<br>> From: Sebastien Jourdain <sebastien.jourdain@kitware.com><br>> To: Tuan Ha Tran <tuan-ha.tran@insa-lyon.fr><br>> Cc: paraview-developers@paraview.org, paraview@paraview.org<br>> Sent: Tue, 05 Jun 2012 21:26:37 +0200 (CEST)<br>> Subject: Re: [Paraview] Setter and getter for ParaView Plugin<br>><br>> You just have to use the attribute<br>><br>> information_only="1"<br>><br>> For more details, you can look at the one that are defined inside<br>> ParaView itself in<br>> SRC/ParaViewCode/ServerImplementation/Resources/*.xml<br>><br>> Seb<br>><br>> On Tue, Jun 5, 2012 at 3:21 PM, Tuan Ha Tran wrote:<br>>> Hi everyone,<br>>> I want to ask you a question about setter and getter of ParaView<br>>> Plugin.<br>>> As input, we can use the xml file to link them, using<br>>>, , etc.<br>><br>>> So, for the outputs, how can we write the xml file?<br>>> For exemple, I have a function with "double" as return value. And I<br>>> want<br>>> to show this value in ParaView, as well as extract it in Python Shell and<br>>> JavaScript Terminal (ParaViewWeb).<br>>> Thank you very much in advance.<br>>><br>>><br>>><br>>><br>>> _______________________________________________<br>>> Powered by www.kitware.com<br>>><br>>> Visit other Kitware open-source projects at<br>>> http://www.kitware.com/opensource/opensource.html<br>>><br>>> Please keep messages on-topic and check the ParaView Wiki at:<br>>> http://paraview.org/Wiki/ParaView<br>>><br>>> Follow this link to subscribe/unsubscribe:<br>>> http://www.paraview.org/mailman/listinfo/paraview<br>>><br>><br><br></tuan-ha.tran@insa-lyon.fr></sebastien.jourdain@kitware.com></tuan-ha.tran@insa-lyon.fr></body></html>