<html><head><style>body{font-family:Helvetica,Arial;font-size:14px}</style></head><body style="word-wrap:break-word;line-break:after-white-space"><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:14px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">I fixed this issue by adding a time step attribute to the XML of this as a plugin following this blog post <a href="https://blog.kitware.com/easy-customization-of-the-paraview-python-programmable-filter-property-panel/">https://blog.kitware.com/easy-customization-of-the-paraview-python-programmable-filter-property-panel/</a></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:14px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:14px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto"><div id="bloop_customfont" style="margin:0px">ExtraXml = '''\</div><div id="bloop_customfont" style="margin:0px">  <DoubleVectorProperty</div><div id="bloop_customfont" style="margin:0px">   name="TimestepValues"</div><div id="bloop_customfont" style="margin:0px">   repeatable="1"</div><div id="bloop_customfont" style="margin:0px">   information_only="1"></div><div id="bloop_customfont" style="margin:0px">   <TimeStepsInformationHelper/></div><div id="bloop_customfont" style="margin:0px">     <Documentation></div><div id="bloop_customfont" style="margin:0px">     Available timestep values.</div><div id="bloop_customfont" style="margin:0px">     </Documentation></div><div id="bloop_customfont" style="margin:0px">  </DoubleVectorProperty></div><div id="bloop_customfont" style="margin:0px">'''</div></div> <br> <div id="bloop_sign_1519006985445368064" class="bloop_sign"></div> <br><p class="airmail_on">On February 18, 2018 at 6:35:27 PM, Bane Sullivan (<a href="mailto:banesulli@gmail.com">banesulli@gmail.com</a>) wrote:</p> <blockquote type="cite" class="clean_bq"><span><div style="word-wrap:break-word;line-break:after-white-space"><div></div><div>
<title></title>
<div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:14px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">
Is it possible to add time steps in a Programmable Filter? For
example, I have read a single static csv file with the normal
delimited text reader and I want to iterate over each row of that
file at different time steps.</div>
<div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:14px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">
<br></div>
<div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:14px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">
My RequestInformation script:</div>
<div id="bloop_customfont" style="margin:0px">Â Â
executive = self.GetExecutive()</div>
<div id="bloop_customfont" style="margin:0px">Â Â
outInfo = executive.GetOutputInformation(0)</div>
<div id="bloop_customfont" style="margin:0px">Â Â #-
Get number of rows in table and use that for num time steps</div>
<div id="bloop_customfont" style="margin:0px">Â Â pdi =
self.GetInput()</div>
<div id="bloop_customfont" style="margin:0px">Â Â nrows
= int(pdi.GetColumn(0).GetNumberOfTuples())</div>
<div id="bloop_customfont" style="margin:0px"># Calculate list of
time steps   </div>
<div id="bloop_customfont" style="margin:0px">xtime =
range(0,nrows)</div>
<div id="bloop_customfont" style="margin:0px">Â Â
outInfo.Remove(executive.TIME_STEPS())</div>
<div id="bloop_customfont" style="margin:0px">Â Â for i
in range(len(xtime)):</div>
<div id="bloop_customfont" style="margin:0px">Â Â
  outInfo.Append(executive.TIME_STEPS(),
xtime[i])</div>
<div id="bloop_customfont" style="margin:0px">Â Â #
Remove and set time range info</div>
<div id="bloop_customfont" style="margin:0px">Â Â
outInfo.Remove(executive.TIME_RANGE())</div>
<div id="bloop_customfont" style="margin:0px">Â Â
outInfo.Append(executive.TIME_RANGE(), xtime[0])</div>
<div id="bloop_customfont" style="margin:0px">Â Â
outInfo.Append(executive.TIME_RANGE(), xtime[-1])</div>
<div id="bloop_customfont" style="margin:0px"><br></div>
<div id="bloop_customfont" style="margin:0px">Then my Request
Data script:</div>
<div id="bloop_customfont" style="margin:0px">pdi =
self.GetInput()Â </div>
<div id="bloop_customfont" style="margin:0px">pdo =
self.GetOutput()Â </div>
<div id="bloop_customfont" style="margin:0px"># grab coordinates
for each part of boring machine at time idx as row </div>
<div id="bloop_customfont" style="margin:0px">executive =
self.GetExecutive()Â </div>
<div id="bloop_customfont" style="margin:0px">outInfo =
executive.GetOutputInformation(0)Â </div>
<div id="bloop_customfont" style="margin:0px">idx =
outInfo.Get(executive.UPDATE_TIME_STEP())Â </div>
<div id="bloop_customfont" style="margin:0px">print("Current time
step: “, idx)</div>
<div id="bloop_customfont" style="margin:0px"># NOW I SHOULD BE
ABLE TO USE IDX TO ITERATE OVER EACH ROW OF THE INPUT
VTKTABLE</div>
<div id="bloop_customfont" style="margin:0px"><br></div>
<div id="bloop_customfont" style="margin:0px"><br></div>
<div id="bloop_customfont" style="margin:0px"><br></div>
<div id="bloop_customfont" style="margin:0px">The time steps
printed in Request Data do not reflect the time steps set in
Request Information. However if I add this little snippet to the
Request Data call it prints out the expected time steps:</div>
<div id="bloop_customfont" style="margin:0px"></div>
<div id="bloop_customfont" style="margin:0px">
print(self.GetExecutive().GetOutputInformation(0).Get(vtk.vtkStreamingDemandDrivenPipeline.TIME_STEPS()))</div>
<div id="bloop_customfont" style="margin:0px"><br></div>
<div id="bloop_customfont" style="margin:0px">Is there something
I am missing, or can timesteps only be set this way in a
Programmable Source?</div>
<div><br></div>
<div id="bloop_sign_1519003587834291968" class="bloop_sign"></div>
</div></div></span></blockquote></body></html>