[Paraview] Saving multi-block data with names

Magician f_magician at mac.com
Sat Jul 13 10:13:08 EDT 2013


Hi Matt,


I had same problems as yours.
So I coded Python scripts as below:
  1. Get the blocks' names with
     [source].GetDataInformation().GetCompositeDataInformation().GetName()
  2. Read the old *.vtm file with xml.etree.ElementTree.
  3. Add the blocks' names to the 'name' properties of 'DataSet' elements.
  4. Export the modified XML Tree as new *.vtm file.


Magician


On 2013/07/09, at 5:44, paraview-request at paraview.org wrote:

> Date: Mon, 8 Jul 2013 16:44:12 -0400
> From: Matthew Cragun <mcragun at totalsim.us>
> Subject: [Paraview] Saving multi-block data with names
> To: paraview at paraview.org
> Message-ID:
> 	<CAM5bWJeao1OrDsJ9AWFrVKi8Wb6uNoBXcG1td3DjxbJtMuO8Dg at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
> 
> Hi, I have an EnSight file that I read into Paraview which comes in as
> multi-block data.  When I apply an extractBlock filter, the names of the
> different regions of my model show up to be extracted.  After extracting a
> subset of the data, I save the data as a new *.vtm file.  However the
> newFile.vtm, when read into Paraview does not have the names of the
> regions.  Is there a way to preserve block names when saving data out of
> Paraview?
> 
> Thanks in advance,
> 
> -- 
> Matt Cragun
> 
> Engineer
> TotalSim LLC
> 555 Metro Place N, Suite 175
> Dublin, Ohio 43017
> O: (614) 255-7426
> M: (801) 404-6021
> E: mcragun at totalsim.us
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://www.paraview.org/pipermail/paraview/attachments/20130708/0b335f26/attachment.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
> 
> Follow this link to subscribe/unsubscribe:
> http://www.paraview.org/mailman/listinfo/paraview
> 
> 
> End of ParaView Digest, Vol 111, Issue 12
> *****************************************



More information about the ParaView mailing list