<div>Hi Ann, </div>
<div> </div>
<div>You said you were importing a serie of CSV Files. </div>
<div>So the data type were a MultiBlockDataSet ? </div>
<div> </div>
<div>Then you should iterate over all the blocks : </div>
<div> </div>
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote">id = self<span></span>.GetInput()</blockquote>
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote">
<div>
<div>od = self.GetOutput()</div>
<div>od.ShallowCopy(id)</div></div>
<div> </div>
<div>iter = od.NewIterator()
<div>iter.UnRegister(None)</div>
<div>iter.InitTraversal()</div>
<div>while not iter.IsDoneWithTraversal():</div>
<div> bloc = iter.GetCurrentDataObject()</div>
<div> bloc.GetPointData().RemoveArray('Name')</div></div>
<div> iter.GoToNextItem()</div></blockquote>
<div> </div>
<div>Regards, </div>
<div> </div>
<div>A.Marsan<br><br></div>
<div class="gmail_quote">2012/2/28 Ann Moulding <span dir="ltr"><<a href="mailto:geoflutist@gmail.com">geoflutist@gmail.com</a>></span><br>
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote">Well, I tried to run the filter below (entering it into the "Programmable<br>Filter") - but when I tried to run the calculator on the "filtered" dataset<br>
- it again choked on the text field. (I need to note however that when I<br>look at the "filtered" dataset in spreadsheet view - the text field is still<br>there).<br>I will go ahead and submit a "Bug" report.<br>
Any other ideas about how to "filter" out a non-numeric array is<br>appreciated.<br><span class="HOEnZb"><font color="#888888">Ann<br></font></span>
<div class="HOEnZb">
<div class="h5"><br>-----Original Message-----<br>From: David E DeMarle [mailto:<a href="mailto:dave.demarle@kitware.com">dave.demarle@kitware.com</a>]<br>Sent: Monday, February 27, 2012 4:49 PM<br>To: Ann Moulding<br>Cc: <a href="mailto:paraview@paraview.org">paraview@paraview.org</a><br>
Subject: Re: [Paraview] Changing array names<br><br>Sounds like a bug in the calculator filter. Please file a bug report to help<br>us remember to fix it.<br><br>Until someone does fix it, try this Script in a python programmable filter,<br>
placed somewhere before the calculator.<br><br>id = self.GetInput()<br>od = self.GetOutput()<br>od.ShallowCopy(id)<br>od.GetPointData().RemoveArray('Name')<br><br><br>David E DeMarle<br>Kitware, Inc.<br>R&D Engineer<br>
21 Corporate Drive<br>Clifton Park, NY 12065-8662<br>Phone: 518-881-4909<br><br><br><br>On Sat, Feb 25, 2012 at 1:10 AM, Ann Moulding <<a href="mailto:geoflutist@gmail.com">geoflutist@gmail.com</a>> wrote:<br>> I am a very new user of Paraview – and am just learning its<br>
> capabilities. I am importing a series of CSV files – creating points<br>> and Delaunay polygons – and then using the Calculator filter to create<br>> vectors to plot with the Glyph tool. But when I use the calculator –<br>
> one of the “Point Data” fields is not numeric – and when I write my<br>> formula (which does not use the non-numeric field) and hit “Apply” - <br>> thje Output message says<br>><br>> ERROR: In ..\..\..\..\source\VTK\Graphics\vtkArrayCalculator.cxx, line<br>
> 304<br>><br>> vtkPVArrayCalculator (000000000B39EAE0): Invalid array name: 'Name'<br>><br>> (the name of the non numeric field is “name”).<br>><br>> I tried renaming this field in the input file – and this didn’t work. <br>
> So I removed the non-numeric field completely from the input file –<br>> and the calculator did work.<br>><br>> So, I have the option of editing all of my input files – so they don’t<br>> have non-numeric fields – or there is some way of getting Paraview to<br>
> not choke on this field – or I’m missing something obvious right in front<br>of my nose?<br>> Any help is appreciated.<br>><br>> Thanks.<br>><br>> New2PV<br>><br>><br>><br>><br>> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com/" 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" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>> Please keep messages on-topic and check the ParaView Wiki at:<br>> <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>><br>> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>><br><br>_______________________________________________<br>Powered by <a href="http://www.kitware.com/" target="_blank">www.kitware.com</a><br>
<br>Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br><br>Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
<br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br></div></div></blockquote></div><br>