[Paraview] Tcl/Tk scripting with Paraview

Berk Geveci berk.geveci at gmail.com
Tue Jun 27 15:17:48 EDT 2006


Not that easy but doable. From Tcl, you can get the list of sources:
set window [$Application GetMainWindow]
set sources [$window GetSourceList Sources]

Once you have the sources, you can traverse it using the vtkCollection API
(look at vtkCollection and vtkPVSourceCollection in doxygen). Then you can
get the filename with
[source GetFileEntry] GetValue

Make sure to use the appropriate catch{} blocks to avoid errors when calling
GetFileEntry on a source that is not a reader.

-Berk


On 6/26/06, robert maynard <thorin.hax at gmail.com> wrote:
>
> I have been working on using the Tcl command line from paraview to perform
> certain repetitive tasks (turn on and off the visibility of numerous files).
> The problem I am facing is that the I would like to be able to access these
> files by their actual file name, not the vtkTemp name that the vtkTclUtil
> hash map is allowing me access to, because the vtkTemp name changes
> depending on order of files being loaded etc.
>
> If it is not possible to do this in Tcl, is it possible to create python /
> java / c++ scripts to interact with paraview to manipulate these data sets?
>
> _______________________________________________
> ParaView mailing list
> ParaView at paraview.org
> http://www.paraview.org/mailman/listinfo/paraview
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/paraview/attachments/20060627/d36a08ba/attachment.htm


More information about the ParaView mailing list