<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; ">
<div style="font-family: Calibri, sans-serif; ">
<div>
<div>The convention for making a reader that accepts multiple files is to first implement a pair of methods in the reader to add file names one at a time and another method to reset the list of file names. Here is some example declarations that would be in
 the reader's header file.</div>
</div>
</div>
<div style="font-family: Calibri, sans-serif; "><br>
</div>
<blockquote style="margin: 0px 0px 0px 40px; border: none; padding: 0px; ">
<div>
<div><font face="Courier">&nbsp;&nbsp;// Description:</font></div>
<div><font face="Courier">&nbsp; // Adds names of files to be read. The files are read in the order</font></div>
<div><font face="Courier">&nbsp; // they are added.</font></div>
<div><font face="Courier">&nbsp; virtual void AddFileName(const char* fname);</font></div>
<div><font face="Courier"><br>
</font></div>
<div><font face="Courier">&nbsp; // Description:</font></div>
<div><font face="Courier">&nbsp; // Remove all file names.</font></div>
<div><font face="Courier">&nbsp; virtual void RemoveAllFileNames();</font></div>
</div>
</blockquote>
<div style="font-family: Calibri, sans-serif; "><br>
</div>
<div style="font-family: Calibri, sans-serif; ">Then in your reader xml file of the SourceProxy declare a StringVectorProperty with a FileListDomain. Here is an example of that.</div>
<div style="font-family: Calibri, sans-serif; "><br>
</div>
<blockquote style="margin:0 0 0 40px; border:none; padding:0px;">
<div>
<div><font face="Courier">&nbsp; &nbsp; &nbsp; &lt;StringVectorProperty animateable=&quot;0&quot;</font></div>
<div><font face="Courier">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; clean_command=&quot;RemoveAllFileNames&quot;</font></div>
<div><font face="Courier">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; command=&quot;AddFileName&quot;</font></div>
<div><font face="Courier">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; name=&quot;FileNames&quot;</font></div>
<div><font face="Courier">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; number_of_elements=&quot;0&quot;</font></div>
<div><font face="Courier">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; panel_visibility=&quot;never&quot;</font></div>
<div><font face="Courier">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; repeat_command=&quot;1&quot;&gt;</font></div>
<div><font face="Courier">&nbsp; &nbsp; &nbsp; &nbsp; &lt;FileListDomain name=&quot;files&quot; /&gt;</font></div>
<div><font face="Courier">&nbsp; &nbsp; &nbsp; &nbsp; &lt;Documentation&gt;The list of files to be read by the</font></div>
<div><font face="Courier">&nbsp; &nbsp; &nbsp; &nbsp; reader.&lt;/Documentation&gt;</font></div>
<div><font face="Courier">&nbsp; &nbsp; &nbsp; &lt;/StringVectorProperty&gt;</font></div>
<div style="font-family: Calibri, sans-serif; "><br>
</div>
</div>
</blockquote>
<div style="font-family: Calibri, sans-serif; ">-Ken</div>
<div style="font-family: Calibri, sans-serif; "><br>
</div>
<span id="OLK_SRC_BODY_SECTION" style="font-family: Calibri, sans-serif; ">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>庞庆源 &lt;<a href="mailto:pangqingyuan1991@gmail.com">pangqingyuan1991@gmail.com</a>&gt;<br>
<span style="font-weight:bold">Date: </span>Tuesday, September 17, 2013 5:23 AM<br>
<span style="font-weight:bold">To: </span>paraview &lt;<a href="mailto:paraview@paraview.org">paraview@paraview.org</a>&gt;<br>
<span style="font-weight:bold">Subject: </span>[EXTERNAL] [Paraview] How does paraview pass multiple filenames to reader plugin?<br>
</div>
<div><br>
</div>
<div>
<div>
<div dir="ltr">I have read some source of paraview plugin.All of them &nbsp;define a char pointer such as:
<div>char *FileName;</div>
<div>and have two macro:</div>
<div>
<div>&nbsp;vtkSetStringMacro(FileName);</div>
<div>&nbsp;vtkGetStringMacro(FileName);</div>
<div>But paraview can choose multiple files once.And I would like to get the filenames.So what should I do?Can someone give me a simple example?</div>
-- <br>
<font face="arial,helvetica,sans-serif" size="6" color="#33ff33"><a href="mailto:pangqingyuan1991@gmail.com" target="_blank">庞庆源<span></span><span></span></a></font></div>
</div>
</div>
</div>
</span>
</body>
</html>