[Paraview] CGNSSeriesReader - python - cell arrays

Crepier, Pierre P.Crepier at marin.nl
Fri Sep 30 11:37:29 EDT 2016


That works perfectly!

For some reason I could not see the GetPropertyValue and ListProperties functions in the dir output of the object.

Thanks a lot for the solution.


ir. Pierre Crepier | Project Manager Ships | CFD
MARIN | T +31 317 49 34 75 | P.Crepier at marin.nl<mailto:P.Crepier at marin.nl> | www.marin.nl<http://www.marin.nl>

[LinkedIn]<https://www.linkedin.com/company/marin> [YouTube] <http://www.youtube.com/marinmultimedia>  [Twitter] <https://twitter.com/MARIN_nieuws>  [Facebook] <https://www.facebook.com/marin.wageningen>
MARIN news: On the design of anti-roll tanks<http://www.marin.nl/web/News/News-items/On-the-design-of-antiroll-tanks-1.htm>
From: Andy Smith [mailto:agsmith424 at gmail.com]
Sent: Friday, September 30, 2016 5:04 PM
To: Crepier, Pierre
Cc: paraview at paraview.org
Subject: Re: [Paraview] CGNSSeriesReader - python - cell arrays

Would something like this work for you?

from __future__ import print_function
from paraview.simple import *

cgns = CGNSSeriesReader(FileNames=['SC10_steady.cgns'])
availableCellArrays = cgns.GetPropertyValue('CellArrayInfo')[::2]

print(availableCellArrays)

On Fri, Sep 30, 2016 at 2:57 AM, Crepier, Pierre <P.Crepier at marin.nl<mailto:P.Crepier at marin.nl>> wrote:
Hi everybody,

This is my first e-mail to this mailing list after looking around a lot in the wiki/manual/google.
I am busy trying to automate CGNS data loading using a python script but I am now stuck at listing the variables contained in the CGNS file

The CGNS data is 3D data and contains some variables. I want to specify which data to load.

When loading a cgns file manually, it gives list of the variables available in the file. See this picture:
http://www.pixhoster.info/f/2016-09/9b456f7a80da44827835ecddb0073ee6.jpg

I am wondering how I can get access to this list via the python scripting API.
I searched in the CompositeDataInformation object, but all I succeed to obtain is the list of selected arrays once those are selected.

Is it possible to achieve that from python ?

Thanks in advance,

P. Crepier

ir. Pierre Crepier | Project Manager Ships | CFD
MARIN | T +31 317 49 34 75<tel:%2B31%20317%2049%2034%2075> | P.Crepier at marin.nl<mailto:P.Crepier at marin.nl> | www.marin.nl<http://www.marin.nl>

[LinkedIn]<https://www.linkedin.com/company/marin> [YouTube] <http://www.youtube.com/marinmultimedia>  [Twitter] <https://twitter.com/MARIN_nieuws>  [Facebook] <https://www.facebook.com/marin.wageningen>
MARIN news: MARIN at Monaco Yacht Show, September 28-October 1<http://www.marin.nl/web/News/News-items/MARIN-at-Monaco-Yacht-Show-September-28October-1.htm>

_______________________________________________
Powered by www.kitware.com<http://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



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20160930/591bfca7/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 293 bytes
Desc: image001.png
URL: <http://public.kitware.com/pipermail/paraview/attachments/20160930/591bfca7/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 331 bytes
Desc: image002.png
URL: <http://public.kitware.com/pipermail/paraview/attachments/20160930/591bfca7/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 333 bytes
Desc: image003.png
URL: <http://public.kitware.com/pipermail/paraview/attachments/20160930/591bfca7/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.png
Type: image/png
Size: 253 bytes
Desc: image004.png
URL: <http://public.kitware.com/pipermail/paraview/attachments/20160930/591bfca7/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: imageb5bd87.PNG
Type: image/png
Size: 293 bytes
Desc: imageb5bd87.PNG
URL: <http://public.kitware.com/pipermail/paraview/attachments/20160930/591bfca7/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image0efd13.PNG
Type: image/png
Size: 331 bytes
Desc: image0efd13.PNG
URL: <http://public.kitware.com/pipermail/paraview/attachments/20160930/591bfca7/attachment-0005.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: imagea6b4b4.PNG
Type: image/png
Size: 333 bytes
Desc: imagea6b4b4.PNG
URL: <http://public.kitware.com/pipermail/paraview/attachments/20160930/591bfca7/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image2fcb4c.PNG
Type: image/png
Size: 253 bytes
Desc: image2fcb4c.PNG
URL: <http://public.kitware.com/pipermail/paraview/attachments/20160930/591bfca7/attachment-0007.png>


More information about the ParaView mailing list