<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">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"> <span class="Apple-tab-span" style="white-space:pre"> </span>executive = self.GetExecutive()</div><div id="bloop_customfont" style="margin:0px"> <span class="Apple-tab-span" style="white-space:pre"> </span>outInfo = executive.GetOutputInformation(0)</div><div id="bloop_customfont" style="margin:0px"> <span class="Apple-tab-span" style="white-space:pre"> </span>#- Get number of rows in table and use that for num time steps</div><div id="bloop_customfont" style="margin:0px"> <span class="Apple-tab-span" style="white-space:pre"> </span>pdi = self.GetInput()</div><div id="bloop_customfont" style="margin:0px"> <span class="Apple-tab-span" style="white-space:pre"> </span>nrows = int(pdi.GetColumn(0).GetNumberOfTuples())</div><div id="bloop_customfont" style="margin:0px"><span class="Apple-tab-span" style="white-space:pre"> </span># Calculate list of time steps </div><div id="bloop_customfont" style="margin:0px"><span class="Apple-tab-span" style="white-space:pre"> </span>xtime = range(0,nrows)</div><div id="bloop_customfont" style="margin:0px"> <span class="Apple-tab-span" style="white-space:pre"> </span>outInfo.Remove(executive.TIME_STEPS())</div><div id="bloop_customfont" style="margin:0px"> <span class="Apple-tab-span" style="white-space:pre"> </span>for i in range(len(xtime)):</div><div id="bloop_customfont" style="margin:0px"> <span class="Apple-tab-span" style="white-space:pre"> </span>outInfo.Append(executive.TIME_STEPS(), xtime[i])</div><div id="bloop_customfont" style="margin:0px"> <span class="Apple-tab-span" style="white-space:pre"> </span># Remove and set time range info</div><div id="bloop_customfont" style="margin:0px"> <span class="Apple-tab-span" style="white-space:pre"> </span>outInfo.Remove(executive.TIME_RANGE())</div><div id="bloop_customfont" style="margin:0px"> <span class="Apple-tab-span" style="white-space:pre"> </span>outInfo.Append(executive.TIME_RANGE(), xtime[0])</div><div id="bloop_customfont" style="margin:0px"> <span class="Apple-tab-span" style="white-space:pre"> </span>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"><span class="Apple-tab-span" style="white-space:pre"> </span>pdi = self.GetInput() </div><div id="bloop_customfont" style="margin:0px"><span class="Apple-tab-span" style="white-space:pre"> </span>pdo = self.GetOutput() </div><div id="bloop_customfont" style="margin:0px"><span class="Apple-tab-span" style="white-space:pre"> </span># grab coordinates for each part of boring machine at time idx as row </div><div id="bloop_customfont" style="margin:0px"><span class="Apple-tab-span" style="white-space:pre"> </span>executive = self.GetExecutive() </div><div id="bloop_customfont" style="margin:0px"><span class="Apple-tab-span" style="white-space:pre"> </span>outInfo = executive.GetOutputInformation(0) </div><div id="bloop_customfont" style="margin:0px"><span class="Apple-tab-span" style="white-space:pre"> </span>idx = outInfo.Get(executive.UPDATE_TIME_STEP()) </div><div id="bloop_customfont" style="margin:0px"><span class="Apple-tab-span" style="white-space:pre"> </span>print("Current time step: “, idx)</div><div id="bloop_customfont" style="margin:0px"><span class="Apple-tab-span" style="white-space:pre"> </span># 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"><span class="Apple-tab-span" style="white-space:pre"> </span></div><div id="bloop_customfont" style="margin:0px"><span class="Apple-tab-span" style="white-space:pre"> </span>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></body></html>