[Paraview] CGNSSeriesReader - python - cell arrays

Andy Smith agsmith424 at gmail.com
Fri Sep 30 11:03:59 EDT 2016


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> 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 | P.Crepier at marin.nl | 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20160930/7fcafa1f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: imagebad1f0.PNG
Type: image/png
Size: 331 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/paraview/attachments/20160930/7fcafa1f/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image2edf6b.PNG
Type: image/png
Size: 253 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/paraview/attachments/20160930/7fcafa1f/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: imageee5e3d.PNG
Type: image/png
Size: 293 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/paraview/attachments/20160930/7fcafa1f/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: imagecc1426.PNG
Type: image/png
Size: 333 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/paraview/attachments/20160930/7fcafa1f/attachment-0003.png>


More information about the ParaView mailing list