<p>Sorry, by pqXML, I meant the XML file for the GUI plugin. <br>
</p>
<div class="gmail_quote">On May 28, 2012 5:55 PM, "Sebastien Jourdain" <<a href="mailto:sebastien.jourdain@kitware.com">sebastien.jourdain@kitware.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Paul,<br>
<br>
can you be more explicit in what you mean by:<br>
<br>
> I thought the type just went in the pqXML file.<br>
<br>
Thanks,<br>
<br>
Seb<br>
<br>
On Mon, May 28, 2012 at 11:45 AM, Paul Edwards <<a href="mailto:paul.m.edwards@gmail.com">paul.m.edwards@gmail.com</a>> wrote:<br>
> I've just noticed that none of my writer plugins are working from the GUI.<br>
> They appear but when trying to write I get the following output:<br>
><br>
> Failed to create writer for: "/path/to/file.mytype"<br>
> ERROR: In /ParaView/ParaViewCore/ServerManager/vtkSMWriterFactory.cxx, line<br>
> 374<br>
> vtkSMWriterFactory (0x8b3d8a0): No matching writer found for extension:<br>
> mytype<br>
><br>
> Is this intentional and do we need to put in hints for each writer now? I<br>
> thought the type just went in the pqXML file.<br>
><br>
> Thanks,<br>
> Paul<br>
><br>
> On 10 May 2012 20:40, Yumin Yuan <<a href="mailto:yumin.yuan@kitware.com">yumin.yuan@kitware.com</a>> wrote:<br>
>><br>
>> Is this your own csv writer? if yes, did you have hints for the writer<br>
>> in your xml config file<br>
>><br>
>> </WriterProxy><br>
>> ......<br>
>><br>
>> <Hints><br>
>> <WriterFactory extensions="csv"<br>
>> file_description="my csv writer"/><br>
>> </Hints><br>
>><br>
>> </WriterProxy><br>
>><br>
>> This is something I found out that I have to do for my writer plugin with<br>
>> 3.14.<br>
>> Yumin<br>
>><br>
>> On Thu, May 10, 2012 at 2:14 PM, Utkarsh Ayachit<br>
>> <<a href="mailto:utkarsh.ayachit@kitware.com">utkarsh.ayachit@kitware.com</a>> wrote:<br>
>> > Your script looks reasonable to me. I'll check it out.<br>
>> ><br>
>> > Utkarsh<br>
>> ><br>
>> > On Sun, May 6, 2012 at 2:44 PM, Luis Martinez <<a href="mailto:lamtmartos@hotmail.com">lamtmartos@hotmail.com</a>><br>
>> > wrote:<br>
>> >> Hi all,<br>
>> >><br>
>> >> I have a pvbatch script that worked in version 3.12. It uses plot over<br>
>> >> line<br>
>> >> and writes out CSV data. Now I get the following error in version<br>
>> >> 3.14:<br>
>> >><br>
>> >> Is this a bug or am I supposed to call the writer differently in 3.14?<br>
>> >><br>
>> >> Thanks!<br>
>> >><br>
>> >> Tony<br>
>> >><br>
>> >><br>
>> >><br>
>> >> ERROR: In<br>
>> >><br>
>> >> /build/buildd/paraview-3.14.1/ParaViewCore/ServerManager/vtkSMWriterFactory.cxx,<br>
>> >> line 374<br>
>> >> vtkSMWriterFactory (0x17ee360): No matching writer found for extension:<br>
>> >> csv<br>
>> >><br>
>> >> Traceback (most recent call last):<br>
>> >> File "wakeProfilesAllTurbines.py", line 65, in <module><br>
>> >> writer.FieldAssociation = "Points"<br>
>> >> AttributeError: 'NoneType' object has no attribute 'FieldAssociation'<br>
>> >><br>
>> >><br>
>> >><br>
>> >><br>
>> >> Here is the script Im using:<br>
>> >><br>
>> >><br>
>> >><br>
>> >> try: paraview.simple<br>
>> >> except: from paraview.simple import *<br>
>> >> paraview.simple._DisableFirstRenderCameraReset()<br>
>> >> import os<br>
>> >> import math<br>
>> >> import matplotlib as mpl<br>
>> >> mpl.use('Agg')<br>
>> >> import matplotlib.pyplot as plt<br>
>> >> import csv<br>
>> >> from scipy.integrate import trapz<br>
>> >> # Current location<br>
>> >> directory=os.getcwd()<br>
>> >> if not os.path.exists('./wakeProfiles/plots/'):<br>
>> >> os.makedirs('./wakeProfiles/plots/')<br>
>> >> # Rotor Diameter<br>
>> >> D=93<br>
>> >> width=D*1.5<br>
>> >> profiles=[0.125,0.25,0.5,0.75,1,2,3,4]<br>
>> >> layout=open('./layout.dat')<br>
>> >> Umean_slice_0_vtk = LegacyVTKReader(<br>
>> >><br>
>> >> FileNames=[directory+'/../ADM/sliceDataADM/12746.8908019/Umean_slice_0.vtk']<br>
>> >> )<br>
>> >> Umean_slice_1_vtk = LegacyVTKReader(<br>
>> >> FileNames=[directory+'/../ALM/sliceDataALM/12771/Umean_slice_0.vtk'] )<br>
>> >> SetActiveSource(Umean_slice_0_vtk)<br>
>> >> CellDatatoPointData1 = CellDatatoPointData()<br>
>> >> SetActiveSource(CellDatatoPointData1)<br>
>> >> Calculator1 = Calculator()<br>
>> >> Calculator1.AttributeMode = 'point_data'<br>
>> >> Calculator1.Function = 'Umean_X*cos(0.84444265) +<br>
>> >> Umean_Y*sin(0.84444265)'<br>
>> >> Calculator1.ResultArrayName = 'U_row'<br>
>> >> SetActiveSource(Umean_slice_1_vtk)<br>
>> >> CellDatatoPointData2 = CellDatatoPointData()<br>
>> >> SetActiveSource(CellDatatoPointData2)<br>
>> >> Calculator2 = Calculator()<br>
>> >> Calculator2.AttributeMode = 'point_data'<br>
>> >> Calculator2.Function = 'Umean_X*cos(0.84444265) +<br>
>> >> Umean_Y*sin(0.84444265)'<br>
>> >> Calculator2.ResultArrayName = 'U_row'<br>
>> >> for i, turbine in enumerate(layout):<br>
>> >> for profile in profiles:<br>
>> >> SetActiveSource(Calculator1)<br>
>> >> PlotOverLine1 = PlotOverLine( Source="High Resolution Line<br>
>> >> Source" )<br>
>> >> PlotOverLine1.Source.Resolution = 100<br>
>> >> alpha0=0.84444265-math.atan((width/2)/(profile*D))<br>
>> >> alpha1=0.84444265+math.atan((width/2)/(profile*D))<br>
>> >> L=math.sqrt((D*profile)**2+(width/2)**2)<br>
>> >> x0=float(turbine.split()[0])+L*math.cos(alpha0)<br>
>> >> y0=float(turbine.split()[1])+L*math.sin(alpha0)<br>
>> >> x1=float(turbine.split()[0])+L*math.cos(alpha1)<br>
>> >> y1=float(turbine.split()[1])+L*math.sin(alpha1)<br>
>> >> PlotOverLine1.Source.Point1 = [x0, y0, 65.0]<br>
>> >> PlotOverLine1.Source.Point2 = [x1, y1, 65.0]<br>
>> >> if not os.path.exists('./wakeProfiles/'+str(profile)):<br>
>> >> os.makedirs('./wakeProfiles/'+str(profile))<br>
>> >> if not os.path.exists('./wakeProfiles/plots/'+str(profile)):<br>
>> >> os.makedirs('./wakeProfiles/plots/'+str(profile))<br>
>> >><br>
>> >><br>
>> >> nameADM=directory+'/wakeProfiles/'+str(profile)+'/ADM'+'turbine'+str(i+1)+'.csv'<br>
>> >> writer = CreateWriter(nameADM, PlotOverLine1)<br>
>> >> writer.FieldAssociation = "Points"<br>
>> >> writer.UpdatePipeline()<br>
>> >> del writer<br>
>> >> SetActiveSource(Calculator2)<br>
>> >> PlotOverLine2 = PlotOverLine( Source="High Resolution Line<br>
>> >> Source" )<br>
>> >> PlotOverLine2.Source.Resolution = 100<br>
>> >> PlotOverLine2.Source.Point1 = [x0, y0, 65.0]<br>
>> >> PlotOverLine2.Source.Point2 = [x1, y1, 65.0]<br>
>> >><br>
>> >><br>
>> >> nameALM=directory+'/wakeProfiles/'+str(profile)+'/ALM'+'turbine'+str(i+1)+'.csv'<br>
>> >> writer = CreateWriter(nameALM, PlotOverLine2)<br>
>> >> writer.FieldAssociation = "Points"<br>
>> >> writer.UpdatePipeline()<br>
>> >> del writer<br>
>> >> csvreader1 = csv.reader(open(nameADM,'rb'))<br>
>> >> csvreader2 = csv.reader(open(nameALM,'rb'))<br>
>> >> x,y,x1,y1=[],[],[],[]<br>
>> >> for j, line in enumerate(csvreader1):<br>
>> >> if j>0:<br>
>> >> x.append((float(line[5])-width/2)/D)<br>
>> >> y.append(float(line[0]))<br>
>> >> for j, line in enumerate(csvreader2):<br>
>> >> if j>0:<br>
>> >> x1.append((float(line[5])-width/2)/D)<br>
>> >> y1.append(float(line[0]))<br>
>> >> plt.plot(x,y,'-',label='ADM',color='black')<br>
>> >> plt.plot(x1,y1,'--',label='ALM',color='black')<br>
>> >> plt.xlabel('Distance')<br>
>> >> plt.ylabel(r'$U$ (m/s)')<br>
>> >> plt.legend(loc='best')<br>
>> >> plt.ylim([2,10])<br>
>> >><br>
>> >><br>
>> >> plt.savefig('./wakeProfiles/plots/'+str(profile)+'/turbine'+str(i+1)+'.eps')<br>
>> >><br>
>> >><br>
>> >> plt.savefig('./wakeProfiles/plots/'+str(profile)+'/turbine'+str(i+1)+'.png')<br>
>> >> plt.clf()<br>
>> >> del x,y,x1,y1,csvreader1,csvreader2<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>
>> > 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>
>> 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>
> _______________________________________________<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>
</blockquote></div>