To try to solve your problem another way, you can create multiple readers that 
read files with the same extension and resolve which one to use by implementing 
a CanReadFile method.  Before assigning a file to a particular VTK reader 
class, ParaView will try to run a method called CanReadFile that takes a const 
char* filename argument.  If that method exists and returns false, that reader 
is not used.  This process works outside of the server manager functions, so 
you don't need to make any modifications to the server manager XML.

There are several examples of readers in VTK/IO that implement the CanReadFile 
convention.  You can look at those for more details.

As I recall, first reader found that either has no CanReadFile or a CanReadFile 
that returns true is used, and the readers are traversed from the last 
registered to the first.  This is so that readers defined by plugins can 
conditionally override readers for file extensions that already exist.

-Ken

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> On Behalf Of Samuel Crow
> Sent: Monday, August 25, 2008 1:21 PM
> To: [email protected]
> Subject: [Paraview] Can sources use filenames in property panels?
>
> Hello again,
>
> I'm trying to make a source that can read in two files and generate output
> based on those files and a few other selection boxes on the panel
> describing the file processing.  I cannot use file readers for the two
> files because there are already readers registered to both file types and
> they produce inappropriate data conversions for the type of data
> processing I have to do on the files.  As such, I also cannot use a filter
> to process the input files due to that fact.
>
> Whenever I try to make a string gadget on the source's properties panel it
> doesn't register on the sources menu.  When I comment out the
> FileListDomain from each of the filename gadgets, the string gadgets don't
> appear at all but the plugin registers as a source.  Whether I do or don't
> comment out the FileListDomain, everything compiles correctly and loads
> correctly under the CVS version of Paraview for Windows from last
> Wednesday.
>
> How can I make a source that can read a file?
>
>
>
>
> _______________________________________________
> ParaView mailing list
> [email protected]
> http://www.paraview.org/mailman/listinfo/paraview


_______________________________________________
ParaView mailing list
[email protected]
http://www.paraview.org/mailman/listinfo/paraview

Reply via email to