If you have the source code, you can look at the &lt;pv source&gt;/Plugins/CoProcessingScriptGenerator/cp_export.py. It might be a bit confusing but the section you&#39;ll want to look at is below. I think you&#39;re problem is that you don&#39;t have any slice object to get the data information from.<br>
<br>Andy<br><br>=========<br>    if %s : # rescale data range<br>        import math<br>        for view in cp_views:<br>            if timestep %% view.cpFrequency == 0 or datadescription.GetForceOutput() == True:<br>                reps = view.Representations<br>
                for rep in reps:<br>                    if hasattr(rep, &#39;Visibility&#39;) and rep.Visibility == 1 and hasattr(rep, &#39;MapScalars&#39;) and rep.MapScalars != &#39;&#39;:<br>                        input = rep.Input<br>
                        input.UpdatePipeline() #make sure range is up-to-date<br>                        lut = rep.LookupTable<br>                        if lut == None:<br>                            continue<br>                        if rep.ColorAttributeType == &#39;POINT_DATA&#39;:<br>
                            datainformation = input.GetPointDataInformation()<br>                        elif rep.ColorAttributeType == &#39;CELL_DATA&#39;:<br>                            datainformation = input.GetCellDataInformation()<br>
                        else:<br>                            print &#39;something strange with color attribute type&#39;, rep.ColorAttributeType<br><br>                        if lut.VectorMode != &#39;Magnitude&#39; or \<br>
                           datainformation.GetArray(rep.ColorArrayName).GetNumberOfComponents() == 1:<br>                            datarange = datainformation.GetArray(rep.ColorArrayName).GetRange(lut.VectorComponent)<br>
                        else:<br>                            datarange = [0,0]<br>                            for i in range(datainformation.GetArray(rep.ColorArrayName).GetNumberOfComponents()):<br>                                for j in range(2):<br>
                                    datarange[j] += datainformation.GetArray(rep.ColorArrayName).GetRange(i)[j]*datainformation.GetArray(rep.ColorArrayName).GetRange(i)[j]<br>                            datarange[0] = math.sqrt(datarange[0])<br>
                            datarange[1] = math.sqrt(datarange[1])<br><br>                        rgbpoints = lut.RGBPoints.GetData()<br>                        numpts = len(rgbpoints)/4<br>                        minvalue = min(datarange[0], rgbpoints[0])<br>
                        maxvalue = max(datarange[1], rgbpoints[(numpts-1)*4])<br>                        if minvalue != rgbpoints[0] or maxvalue != rgbpoints[(numpts-1)*4]:<br>                            # rescale all of the points<br>
                            oldrange = rgbpoints[(numpts-1)*4] - rgbpoints[0]<br>                            newrange = maxvalue - minvalue<br>                            newrgbpoints = list(rgbpoints)<br>                            for v in range(numpts):<br>
                                newrgbpoints[v*4] = minvalue+(rgbpoints[v*4] - rgbpoints[0])*newrange/oldrange<br><br>                            lut.RGBPoints.SetData(newrgbpoints)<br><br><br><div class="gmail_quote">On Fri, Feb 8, 2013 at 6:35 AM, Kisler <span dir="ltr">&lt;<a href="mailto:Roman.Kisler@tnt.tu-berlin.de" target="_blank">Roman.Kisler@tnt.tu-berlin.de</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi everyone,<br>
<br>
I write a python script (Paraview 3.14.1 64-bit) in which a loop loads files,<br>
makes slices etc., prints an image and deletes all variables within each<br>
iteration step. Therefore I need a python code which rescales the colorbar in<br>
each step.<br>
<br>
So far I found this code in another mailing conversation (see<br>
<a href="http://www.paraview.org/pipermail/paraview/2009-January/010809.html).Unfortunately" target="_blank">http://www.paraview.org/pipermail/paraview/2009-January/010809.html).Unfortunately</a><br>
the command<br>
<br>
range=slice.GetDataInformation().GetPointDataInformation().GetArrayInformation(0).GetComponentRange(0)<br>
<br>
doesn&#39;t work in my script and delivers the following error message:<br>
<br>
&quot; AttributeError: &#39;NoneType&#39; object has no attribute &#39;GetDataInformation&#39; &quot;<br>
<br>
and refers to the line written above (range=...).<br>
<br>
I would appreciate any help, be it a more detailed explanation of the script<br>
which can be found in the link posted above or another possibility of<br>
implementing it.<br>
<br>
Kindest regards,<br>
Roman<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
</blockquote></div><br>