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 <[email protected]> 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 | [email protected] | www.marin.nl
>
> [image: LinkedIn] <https://www.linkedin.com/company/marin> [image:
> YouTube] <http://www.youtube.com/marinmultimedia> [image: Twitter]
> <https://twitter.com/MARIN_nieuws> [image: 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
>
> 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