<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
Dear All,<div><br></div><div>I have some data files which are written by our simulation they are .vtp format with point data. Each point has several properties such as "Density" or "Pressure" associated with it. I wish to load these files using a python script which I can then use to look at their properties and extract the results I'm interested in. I have successfully loaded the files and I can read the points positions' but I have no idea how to access the accompanying properties, could anybody suggest how to do this?</div><div><br></div><div>Currently to load the file I am doing the following;</div><div><br></div><div><div>reader = vtk.vtkXMLPolyDataReader()</div><div>reader.SetFileName(file)</div><div>reader.Update()</div><div>data = reader.GetOutput()</div><div>data.Update()</div><div><br></div><div>print(str(type(data))) #outputs <type 'vtkobject'></div><div><br></div><div> for i in range(data.GetNumberOfPoints()):</div><div> p = data.GetPoints().GetPoint(i) #p is a tuple with the x,y & z coordinates.</div></div><div><br></div><div><br></div><div>Thanks,</div><div><br></div><div>Dan</div>                                            </div></body>
</html>