[Paraview] Scripting Common UI Tasks for Opening Files

Adrien Guillon aj.guillon at gmail.com
Mon Oct 22 14:28:35 EDT 2012


Hi,

So this doesn't quite work.  The problem is that the generated script seems
to hard-code particular filenames, rather than say just looking at the
order of the pipeline.  Given that we have to open several files at the
same time, and then arrange a visualization of simulation results, this
isn't quite what we want.

I was unaware of the macro feature, so I might be able to investigate a bit
further to write a python macro that does what we want.

I considered writing a script to generate a state file automatically for a
given set of filenames.  I'm not sure if this is the best option or not.
It depends upon the portability of these files from version to version, and
the dependency upon particular files.

In particular, we have several file types which particular features of
results.  So, for instance, we might have for simulation run X, and
features f_j:

X_f1_*.vtp
X_f2_*.vtu
X_f3_*.vtu

We need to open these files and make some basic adjustments so that we have
a good idea of what is happening in the simulation.

AJ

On Sun, Oct 21, 2012 at 2:26 PM, Andy Bauer <andy.bauer at kitware.com> wrote:

> If you're using the python trace (under Tools->Start Trace/Stop Trace) you
> can create a python script that should mimic what you're doing in the GUI.
> After you stop the trace you have the option of saving it as a macro which
> will then allow you to click on a widget in the GUI to replay those
> actions.
>
> You could also create a state file (File->Save State) which may also
> accomplish what you're looking for.
>
> If either of those don't work as expected and/or desired, I would
> recommend emailing back the list with specific problems.
>
> Andy
>
> On Sun, Oct 21, 2012 at 12:49 PM, Adrien Guillon <aj.guillon at gmail.com>wrote:
>
>> Hi everyone,
>>
>> We have simulation results that we frequently visualize in the same way.
>> We construct a specific pipeline, visualize some parts as wireframe, set a
>> color scheme, and so on.  Unfortunately, this is done manually at the
>> moment, which means that just opening simulation results can take a few
>> minutes of clicking around.  I'm looking to script this.
>>
>> Is there a way to script the UI so that it opens a number of given files,
>> and adjusts features automatically?  My investigations into Python
>> scripting with Paraview suggest that it cannot directly control the UI,
>> instead it does analysis using Paraview.
>>
>> Any suggestions on how to accomplish some automation?
>>
>> AJ
>>
>> _______________________________________________
>> 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
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.paraview.org/mailman/listinfo/paraview
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20121022/3255b140/attachment.htm>


More information about the ParaView mailing list