Ah! No, the current implementation doesn't support that, but if you
want to extend the code to do so and push a merge-request on ParaView
(d) -- which would be awesome -- here are a few pointers:

1. Extend pqFileChooserWidget (a) to add support for non-existing files.
2. Extend pqStringVectorPropertyWidget to (b) add support for new
attribute on the <FileChooser /> hint to support non-exisiting files
and if and when it's present, tell pqFileChooseWidget  using the API
added in 1.
3. Update PropertyHints.md (c) to document the new hint attribute added in 2.

Thanks
Utkarsh

(a) 
https://gitlab.kitware.com/paraview/paraview/blob/master/Qt/Components/pqFileChooserWidget.h
(b) 
https://gitlab.kitware.com/paraview/paraview/blob/master/Qt/Components/pqStringVectorPropertyWidget.cxx#L173-233
(c) 
https://gitlab.kitware.com/paraview/paraview/blob/master/Utilities/Doxygen/pages/PropertyHints.md#filechooser
(d) https://gitlab.kitware.com/paraview/paraview


On Wed, Jun 22, 2016 at 2:46 AM, LB <bravo.l...@gmail.com> wrote:
> [Paraview] XML plugin syntax for FileChooser.
>
>
>
> Hi,
>
>
>
> I would like to create a custom programmable python filter  to write some
> calculation results in a file.
>
> I’ve tried to use the following XML plugin syntax to define a FileChooser
> button and help the user select the path of the output file :
>
> <StringVectorProperty
>   label="Path"
>   command="SetParameter"
>   name="QFileName"
>   initial_string="QFileName"
>   number_of_elements="1"
>   panel_visibility="default">
>   <FileListDomain name="files" />
>   <Documentation>Path of the output file</Documentation>
>   <Hints>
>     <FileChooser extensions="inp" file_description="APDL input file" />
>   </Hints>
> </StringVectorProperty>
>
> This create a text field with an associated file chooser button as I wanted.
>
> But it seems that I can only select existing files.
>
> Is-there a way to tell Paraview that this path is an output path and not an
> input path ?
>
> Best regards,
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Search the list archives at: http://markmail.org/search/?q=ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/paraview
>
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview

Reply via email to