<div dir="ltr"><div><div><div><div><div>Hello Utkarsh,<br><br></div>I also spent a few hours the other day, just to discover that my problem was this mismatch between proxy's name and label, through python access.<br></div>Maybe we should throw the developers a warning at compile time when the two mismatch, to avoid confusion.<br></div>The other "solution" I can think of is to allow property access through both name and label. But this looks like a hack, and might have side-effect I'm not aware of.<br><br></div>Best,<br></div>Bastie<font size="2">n</font><div class="gmail_extra"><div class="gmail_quote">On Mon, Oct 31, 2016 at 10:16 PM, Utkarsh Ayachit <span dir="ltr"><<a href="mailto:utkarsh.ayachit@kitware.com" target="_blank">utkarsh.ayachit@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">When we started, we indeed used the property's XMLName as the name for<br>
the parameter in the Python script. However, it was noted that the<br>
parameter name in Python would not match what the user saw in the UI<br>
and hence he had no clue how to look for it. Hence, we changed it such<br>
that the Python parameter name uses label instead.<br>
<br>
This would not have been an issue if a property's (or proxy's) name<br>
and label are the same, however this didn't happen for historical<br>
reasons.<br>
<br>
Now changing property names after the fact is harder since we need to<br>
ensure backwards compability for pvsm and py files.<br>
<br>
Utkarsh<br>
<div><div class="h5"><br>
On Mon, Oct 31, 2016 at 2:06 PM, Joachim Pouderoux<br>
<<a href="mailto:joachim.pouderoux@kitware.com">joachim.pouderoux@kitware.com</a><wbr>> wrote:<br>
> Hi,<br>
><br>
> Writing a python script for PV5.2, I needed to save a temporal ptvtu file<br>
> and faced this problem again: looking at the proxy's XML definition, the<br>
> writer has the name=WriteAllTimeSteps property.<br>
><br>
>       <IntVectorProperty command="SetWriteAllTimeSteps"<br>
>                          default_values="0"<br>
>                          label="Write all timesteps as file-series"<br>
>                          name="WriteAllTimeSteps"<br>
>                          number_of_elements="1"><br>
><br>
> So I tried something like this:<br>
><br>
>   SaveData("test.pvtu", WriteAllTimeSteps=1)<br>
><br>
> But it failed claiming that the writer has no WriteAllTimeSteps property!<br>
> Well, looking at the help() on the writer instance it looked like indeed,<br>
> the exposed python property is not call WriteAllTimeSteps but<br>
> Writealltimestepsasfileseries:<br>
>  |  Writealltimestepsasfileseries<br>
>  |      When WriteAllTimeSteps is turned ON, the writer is<br>
>  |      executed once for each timestep available from the<br>
>  |      reader.<br>
><br>
> Isn't it ugly?<br>
> So is the choice of exposing the property using its concatenated label a<br>
> deliberate choice or a bug?<br>
> It seems to me very unnatural, the label should be reserved for better human<br>
> readable UI printing.<br>
><br>
> What do you think?<br>
><br>
> Best,<br>
><br>
> Joachim Pouderoux, PhD<br>
><br>
> Technical Expert - Scientific Computing Team<br>
> Kitware SAS<br>
><br>
><br>
</div></div>> ______________________________<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<br>
> <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
><br>
> Search the list archives at:<br>
> <a href="http://markmail.org/search/?q=Paraview-developers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>Paraview-developers</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://public.kitware.com/mailman/listinfo/paraview-developers" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/paraview-<wbr>developers</a><br>
><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>
Search the list archives at: <a href="http://markmail.org/search/?q=Paraview-developers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>Paraview-developers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/paraview-developers" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/paraview-<wbr>developers</a><br>
</blockquote></div><br></div></div>