I'm trying to use python scripting to use the calculator. I can't get the function and the results to display in the GUI.
I first used the trace capabilities to generate a function and was able to successfully generate my results on the GUI but when i shut down and restarted and run the scripts just generated from the trace it doesn't display the function in the Object inspector. Here's a sample python script that i'm using. Calculator1 = Calculator() Calculator1.AttributeMode = 'point_data' # i'd like to display this function in the GUI Calculator1.Function = 'Hdemag_Z*2' Calculator1.ScalarVariable = ['Hdemag_X', 'Hdemag', '0', 'Hdemag_Y', 'Hdemag', '1', 'Hdemag_Z', 'Hdemag', '2', 'M_X', 'M', '0', 'M_Y', 'M', '1', 'M_Z', 'M', '2'] Calculator1.CoordinateScalarVariable = ['coordsX', '0', 'coordsY', '1', 'coordsZ', '2'] Calculator1.CoordinateVectorVariable = ['coords', '0', '1', '2'] Calculator1.VectorVariable = ['Hdemag', 'Hdemag', '0', '1', '2', 'M', 'M', '0', '1', '2'] Calculator1.ResultArrayName = 'Heffective' DataRepresentation5 = Show() DataRepresentation4.Visibility = 1 Any help would be greatly appreciated.
_______________________________________________ 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
