Re: [Paraview] How to read the file info in *pvd file

2017-12-06 Thread Ke Gao
Thanks Cory. That's what I'm planning to do. It's really helpful.

Ke

On Wed, Dec 6, 2017 at 2:27 PM, Cory Quammen 
wrote:

> Did you make progress on this? You should just be able to use your
> favorite Python XML module to locate all the  elements and
> find the "file" attributes to get the *pvtu file names. Then you can
> parse those *pvtu XML files to get whatever information you want. One
> such module is documented here:
> https://docs.python.org/2/library/xml.etree.elementtree.html.
>
> HTH,
> Cory
>
> On Wed, Nov 15, 2017 at 1:17 PM, Ke Gao  wrote:
> > Actually, what I want to do is using python script to read *pvd file
> first
> > to get the name info of *pvtu files. Then use the *pvtu file name to read
> > through all of them one by one to extract the info I want. I'm not sure
> if
> > there is a better way to realize this.
> >
> > Many thanks.
> >
> > On Wed, Nov 15, 2017 at 11:05 AM, Cory Quammen  >
> > wrote:
> >>
> >> The file names are embedded in the same XML element as the time step:
> >>
> >> 
> >>
> >> But I'll be that's not how you want to access them.
> >>
> >> Next question: From where do you want to access the file names? A Python
> >> script? In the UI?
> >>
> >> On Wed, Nov 15, 2017 at 12:35 PM, Ke Gao  wrote:
> >>>
> >>> Hi,
> >>>
> >>> I mean how to get the file name info such as "Sout_1012.pvtu",
> >>> "Sout_1013.pvtu". Currently I can only read the timestep info such as
> >>> "+1.9880e+03".
> >>>
> >>> Many thanks.
> >>>
> >>>
> >>> 
> >>>   
> >>>   
> >>>  >>> file="Sout_1012.pvtu"/>
> >>>  >>> file="Sout_1013.pvtu"/>
> >>>  >>> file="Sout_1014.pvtu"/>
> >>>
> >>> On Wed, Nov 15, 2017 at 10:33 AM, Cory Quammen <
> cory.quam...@kitware.com>
> >>> wrote:
> 
>  What do you mean by "file info"? File name? Size of the file? Data
>  arrays in the file?
> 
>  - Cory
> 
>  On Tue, Nov 14, 2017 at 4:45 PM, Ke Gao  wrote:
> >
> > Does anyone know how to read the file info from *pvd file? I know how
> > to get the time step values, just using the keyword of
> “TimestepValues”,
> > however, I tried different ways, still haven’t figured out how to
> read the
> > file info.
> >
> >
> > Thanks
> >
> > 
> >   
> >   
> >  > file="Sout_1012.pvtu"/>
> >  > file="Sout_1013.pvtu"/>
> >  > file="Sout_1014.pvtu"/>
> > --
> >
> > 
> 
> ..
> > Ke Gao
> >
> > ___
> > 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
> >
> 
> 
> 
>  --
>  Cory Quammen
>  Staff R Engineer
>  Kitware, Inc.
> >>>
> >>>
> >>>
> >>>
> >>> --
> >>>
> >>> 
> 
> ..
> >>> Ke Gao
> >>
> >>
> >>
> >>
> >> --
> >> Cory Quammen
> >> Staff R Engineer
> >> Kitware, Inc.
> >
> >
> >
> >
> > --
> > 
> 
> ..
> > Ke Gao
>
>
>
> --
> Cory Quammen
> Staff R Engineer
> Kitware, Inc.
>



-- 
..
Ke Gao
___
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


Re: [Paraview] How to read the file info in *pvd file

2017-12-06 Thread Cory Quammen
Did you make progress on this? You should just be able to use your
favorite Python XML module to locate all the  elements and
find the "file" attributes to get the *pvtu file names. Then you can
parse those *pvtu XML files to get whatever information you want. One
such module is documented here:
https://docs.python.org/2/library/xml.etree.elementtree.html.

HTH,
Cory

On Wed, Nov 15, 2017 at 1:17 PM, Ke Gao  wrote:
> Actually, what I want to do is using python script to read *pvd file first
> to get the name info of *pvtu files. Then use the *pvtu file name to read
> through all of them one by one to extract the info I want. I'm not sure if
> there is a better way to realize this.
>
> Many thanks.
>
> On Wed, Nov 15, 2017 at 11:05 AM, Cory Quammen 
> wrote:
>>
>> The file names are embedded in the same XML element as the time step:
>>
>> 
>>
>> But I'll be that's not how you want to access them.
>>
>> Next question: From where do you want to access the file names? A Python
>> script? In the UI?
>>
>> On Wed, Nov 15, 2017 at 12:35 PM, Ke Gao  wrote:
>>>
>>> Hi,
>>>
>>> I mean how to get the file name info such as "Sout_1012.pvtu",
>>> "Sout_1013.pvtu". Currently I can only read the timestep info such as
>>> "+1.9880e+03".
>>>
>>> Many thanks.
>>>
>>>
>>> 
>>>   
>>>   
>>> >> file="Sout_1012.pvtu"/>
>>> >> file="Sout_1013.pvtu"/>
>>> >> file="Sout_1014.pvtu"/>
>>>
>>> On Wed, Nov 15, 2017 at 10:33 AM, Cory Quammen 
>>> wrote:

 What do you mean by "file info"? File name? Size of the file? Data
 arrays in the file?

 - Cory

 On Tue, Nov 14, 2017 at 4:45 PM, Ke Gao  wrote:
>
> Does anyone know how to read the file info from *pvd file? I know how
> to get the time step values, just using the keyword of “TimestepValues”,
> however, I tried different ways, still haven’t figured out how to read the
> file info.
>
>
> Thanks
>
> 
>   
>   
>  file="Sout_1012.pvtu"/>
>  file="Sout_1013.pvtu"/>
>  file="Sout_1014.pvtu"/>
> --
>
> ..
> Ke Gao
>
> ___
> 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
>



 --
 Cory Quammen
 Staff R Engineer
 Kitware, Inc.
>>>
>>>
>>>
>>>
>>> --
>>>
>>> ..
>>> Ke Gao
>>
>>
>>
>>
>> --
>> Cory Quammen
>> Staff R Engineer
>> Kitware, Inc.
>
>
>
>
> --
> ..
> Ke Gao



-- 
Cory Quammen
Staff R Engineer
Kitware, Inc.
___
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


Re: [Paraview] How to read the file info in *pvd file

2017-11-15 Thread Ke Gao
Actually, what I want to do is using python script to read *pvd file first
to get the name info of *pvtu files. Then use the *pvtu file name to read
through all of them one by one to extract the info I want. I'm not sure if
there is a better way to realize this.

Many thanks.

On Wed, Nov 15, 2017 at 11:05 AM, Cory Quammen 
wrote:

> The file names are embedded in the same XML element as the time step:
>
> 
>
> But I'll be that's not how you want to access them.
>
> Next question: From where do you want to access the file names? A Python
> script? In the UI?
>
> On Wed, Nov 15, 2017 at 12:35 PM, Ke Gao  wrote:
>
>> Hi,
>>
>> I mean how to get the file name info such as "Sout_1012.pvtu",
>> "Sout_1013.pvtu". Currently I can only read the timestep info such as
>> "+1.9880e+03".
>>
>> Many thanks.
>>
>>
>> 
>>   
>>   
>> > file="Sout_1012.pvtu"/>
>> > file="Sout_1013.pvtu"/>
>> > file="Sout_1014.pvtu"/>
>>
>> On Wed, Nov 15, 2017 at 10:33 AM, Cory Quammen 
>> wrote:
>>
>>> What do you mean by "file info"? File name? Size of the file? Data
>>> arrays in the file?
>>>
>>> - Cory
>>>
>>> On Tue, Nov 14, 2017 at 4:45 PM, Ke Gao  wrote:
>>>
 Does anyone know how to read the file info from *pvd file? I know how
 to get the time step values, just using the keyword of “TimestepValues”,
 however, I tried different ways, still haven’t figured out how to read the
 file info.

 Thanks

 
   
   
 >>> file="Sout_1012.pvtu"/>
 >>> file="Sout_1013.pvtu"/>
 >>> file="Sout_1014.pvtu"/>
 --
 
 
 ..
 Ke Gao

 ___
 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


>>>
>>>
>>> --
>>> Cory Quammen
>>> Staff R Engineer
>>> Kitware, Inc.
>>>
>>
>>
>>
>> --
>> 
>> 
>> ..
>> Ke Gao
>>
>
>
>
> --
> Cory Quammen
> Staff R Engineer
> Kitware, Inc.
>



-- 
..
Ke Gao
___
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


Re: [Paraview] How to read the file info in *pvd file

2017-11-15 Thread Cory Quammen
The file names are embedded in the same XML element as the time step:



But I'll be that's not how you want to access them.

Next question: From where do you want to access the file names? A Python
script? In the UI?

On Wed, Nov 15, 2017 at 12:35 PM, Ke Gao  wrote:

> Hi,
>
> I mean how to get the file name info such as "Sout_1012.pvtu",
> "Sout_1013.pvtu". Currently I can only read the timestep info such as
> "+1.9880e+03".
>
> Many thanks.
>
>
> 
>   
>   
> 
> 
> 
>
> On Wed, Nov 15, 2017 at 10:33 AM, Cory Quammen 
> wrote:
>
>> What do you mean by "file info"? File name? Size of the file? Data arrays
>> in the file?
>>
>> - Cory
>>
>> On Tue, Nov 14, 2017 at 4:45 PM, Ke Gao  wrote:
>>
>>> Does anyone know how to read the file info from *pvd file? I know how to
>>> get the time step values, just using the keyword of “TimestepValues”,
>>> however, I tried different ways, still haven’t figured out how to read the
>>> file info.
>>>
>>> Thanks
>>>
>>> 
>>>   
>>>   
>>> >> file="Sout_1012.pvtu"/>
>>> >> file="Sout_1013.pvtu"/>
>>> >> file="Sout_1014.pvtu"/>
>>> --
>>> 
>>> 
>>> ..
>>> Ke Gao
>>>
>>> ___
>>> 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
>>>
>>>
>>
>>
>> --
>> Cory Quammen
>> Staff R Engineer
>> Kitware, Inc.
>>
>
>
>
> --
> 
> 
> ..
> Ke Gao
>



-- 
Cory Quammen
Staff R Engineer
Kitware, Inc.
___
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


Re: [Paraview] How to read the file info in *pvd file

2017-11-15 Thread Ke Gao
Hi,

I mean how to get the file name info such as "Sout_1012.pvtu",
"Sout_1013.pvtu". Currently I can only read the timestep info such as
"+1.9880e+03".

Many thanks.



  
  




On Wed, Nov 15, 2017 at 10:33 AM, Cory Quammen 
wrote:

> What do you mean by "file info"? File name? Size of the file? Data arrays
> in the file?
>
> - Cory
>
> On Tue, Nov 14, 2017 at 4:45 PM, Ke Gao  wrote:
>
>> Does anyone know how to read the file info from *pvd file? I know how to
>> get the time step values, just using the keyword of “TimestepValues”,
>> however, I tried different ways, still haven’t figured out how to read the
>> file info.
>>
>> Thanks
>>
>> 
>>   
>>   
>> > file="Sout_1012.pvtu"/>
>> > file="Sout_1013.pvtu"/>
>> > file="Sout_1014.pvtu"/>
>> --
>> 
>> 
>> ..
>> Ke Gao
>>
>> ___
>> 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
>>
>>
>
>
> --
> Cory Quammen
> Staff R Engineer
> Kitware, Inc.
>



-- 
..
Ke Gao
___
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


Re: [Paraview] How to read the file info in *pvd file

2017-11-15 Thread Cory Quammen
What do you mean by "file info"? File name? Size of the file? Data arrays
in the file?

- Cory

On Tue, Nov 14, 2017 at 4:45 PM, Ke Gao  wrote:

> Does anyone know how to read the file info from *pvd file? I know how to
> get the time step values, just using the keyword of “TimestepValues”,
> however, I tried different ways, still haven’t figured out how to read the
> file info.
>
> Thanks
>
> 
>   
>   
> 
> 
> 
> --
> 
> 
> ..
> Ke Gao
>
> ___
> 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
>
>


-- 
Cory Quammen
Staff R Engineer
Kitware, Inc.
___
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