<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 03/29/2018 04:45 AM, Mathieu
Westphal wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAC2t4USE9AsNsdpUnYcgcXRdqPC+evS+z2AQ21tTjW9J8E7q+Q@mail.gmail.com">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<div dir="ltr">
<div>
<div>
<div>
<div>Hello Pascal,<br>
<br>
</div>
First, i would suggest identifying a widget in <span
class="" style="" id=":17b.1" tabindex="-1">ParaView</span>
that behave the way you would like your widget to behave,
then take a look into this widget XML for inspiration.<br>
<br>
</div>
There may be a way to do what you want to do, but you will
need to precise, where do these "at run-time min and max"
values come from ?<br>
</div>
<br>
Also what do you mean by increment ? There is no such concept
of increment in ParaView slider based widgets.<br>
<br>
</div>
Best regards,<br>
<div class="gmail_extra"><br clear="all">
<div>
<div class="gmail_signature"
data-smartmail="gmail_signature">
<div dir="ltr"><span class="" style="" id=":17b.3"
tabindex="-1">Mathieu</span> <span class="" style=""
id=":17b.4" tabindex="-1">Westphal</span><br>
</div>
</div>
</div>
<br>
<div class="gmail_quote">On Wed, Mar 28, 2018 at 9:15 PM,
Pascal <span class="" style="" id=":17b.5" tabindex="-1">Meysonnat</span>
<span dir="ltr"><<a
href="mailto:p.meysonnat@aia.rwth-aachen.de"
target="_blank" moz-do-not-send="true">p.<span class=""
style="" id=":17b.6" tabindex="-1">meysonnat</span>@<span
class="" style="" id=":17b.7" tabindex="-1">aia</span>.<span
class="" style="" id=":17b.8" tabindex="-1">rwth</span>-<span
class="" style="" id=":17b.9" tabindex="-1">aachen</span>.<span
class="" style="" id=":17b.10" tabindex="-1">de</span></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">Dear
all,
<div><br>
</div>
<div>I am currently developing a new plugin for our
in-house solver and would like to have a slider to
select certain values which are only known at run
time. I have seen the property panel configuration for
such a case to look similar to:</div>
<div><br>
</div>
<div>
<div> <DoubleVectorProperty</div>
<div> Name="Values"</div>
<div> command="SetValues"</div>
<div> number_of_elements="1"</div>
<div> default_values="1"></div>
<div> panel_widget="int_range"></div>
<div> <ArrayRangeDomain name="range"></div>
<div> <RequiredProperties></div>
<div> <Property function="Input"</div>
<div> name="Input" /></div>
<div> </RequiredProperties></div>
<div> </ArrayRangeDomain></div>
<div> </DoubleVectorProperty></div>
<div><br>
</div>
<div>I am not fully sure on how to set the range
properly at the run time. Let’s for example say i
know at run time the range of the slider should be
1…8. How can i set the range properly and how can I
set the increment? Is there some small example I can
may be have a look at?</div>
<div><br>
</div>
<div>Thank you very much for your help, </div>
<div><br>
</div>
<div>Regards, </div>
<div><br>
</div>
<div>Pascal </div>
<div><br>
</div>
<div>
<span class="m_2203978730382752357Apple-style-span"
style="border-collapse:separate;font-variant-ligatures:normal;font-variant-east-asian:normal;line-height:normal;border-spacing:0px">
<div style="word-wrap:break-word"><span
class="m_2203978730382752357Apple-style-span"
style="border-collapse:separate;color:rgb(0,0,0);font-family:Helvetica;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;border-spacing:0px">
<div style="word-wrap:break-word">
<div>--</div>
<div>Dr.-Ing. Pascal S. Meysonnat</div>
<div><br>
</div>
<div>Chair of Fluid Mechanics and Institute
of Aerodynamics</div>
<div>RWTH Aachen University</div>
<div>Wüllnerstraße 5a</div>
<div>D-52062 Aachen</div>
<div>Germany</div>
<div><br>
</div>
</div>
</span></div>
</span>
</div>
<br>
</div>
</div>
<br>
______________________________<wbr>_________________<br>
Powered by <a href="http://www.kitware.com"
rel="noreferrer" target="_blank" moz-do-not-send="true">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" moz-do-not-send="true">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" moz-do-not-send="true">http://markmail.org/search/?q=<wbr>Paraview-developers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a
href="https://public.kitware.com/mailman/listinfo/paraview-developers"
rel="noreferrer" target="_blank" moz-do-not-send="true">https://public.kitware.com/<wbr>mailman/listinfo/paraview-<wbr>developers</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</blockquote>
<p>Dear <span class="" style="" id=":17b.3" tabindex="-1">Mathieu,
<br>
</span></p>
<p><span class="" style="" id=":17b.3" tabindex="-1">I finally
managed to get it work in the end, except for one special
question which remains open. Here is the solution. <br>
</span></p>
<p><span class="" style="" id=":17b.3" tabindex="-1">In the xml file
I hat to use the function RangeInfo (see below):<br>
</span></p>
<p><span class="" style="" id=":17b.3" tabindex="-1"> <DoubleVectorProperty
name="LevelRange"<br>
command="GetLevelRange"<br>
information_only="1"<br>
number_of_elements="2"<br>
default_values="-1 -10"><br>
<SimpleDoubleInformationHelper /><br>
</DoubleVectorProperty><br>
<br>
<DoubleVectorProperty<br>
name="MaxLevelToShow"<br>
command="SetMaxLevelToShow"<br>
information_property="LevelRange"<br>
number_of_elements="2"<br>
animateable="1"<br>
default_values="0 0"<br>
panel_widget="double_range"><br>
<DoubleRangeDomain name="range" ><br>
<RequiredProperties><br>
<Property name="LevelRange"
function="RangeInfo"/><br>
</RequiredProperties><br>
</DoubleRangeDomain><br>
</DoubleVectorProperty><br>
</span></p>
<p><span class="" style="" id=":17b.3" tabindex="-1">and in the *.h
file of the reader, the Macro had to be set</span></p>
<p><span class="" style="" id=":17b.3" tabindex="-1">vtkGetVector2Macro(LevelRange,
int);<br>
</span></p>
<p><span class="" style="" id=":17b.3" tabindex="-1">as well as </span><span
class="" style="" id=":17b.3" tabindex="-1"></span></p>
<p><span class="" style="" id=":17b.3" tabindex="-1"></span><span
class="" style="" id=":17b.3" tabindex="-1"><span class=""
style="" id=":17b.3" tabindex="-1">int LevelRange[2];</span></span></p>
<p><span class="" style="" id=":17b.3" tabindex="-1"><span class=""
style="" id=":17b.3" tabindex="-1">Finished! Now I can read
the values into LevelRange from the RequestInformation and the
sliders appear correctly. There is just one final thing which
is missing. I have integer values and I would like the sliders
to be rather of an integer type than being of double type,
i.e., i would like them do change in full integer values? Is
there a way to achieve this?</span></span></p>
<p><span class="" style="" id=":17b.3" tabindex="-1"><span class=""
style="" id=":17b.3" tabindex="-1">Best Regards</span></span></p>
<p><span class="" style="" id=":17b.3" tabindex="-1"><span class=""
style="" id=":17b.3" tabindex="-1">Pascal Meysonnat <br>
</span></span></p>
<p><span class="" style="" id=":17b.3" tabindex="-1"><br>
</span></p>
<p><span class="" style="" id=":17b.3" tabindex="-1"><br>
</span></p>
<p><span class="" style="" id=":17b.3" tabindex="-1"><br>
</span></p>
<p><span class="" style="" id=":17b.3" tabindex="-1"><br>
</span></p>
</body>
</html>