Hello

I have a problem I cannot figure out:

1 -> read in VTR file (Rectiliniear Grid)
2 -> apply "cell data to point data" filter
3 -> apply "calculator" on it, that selects only the Z component. Call
it "M_Z" (result array name).
4 -> apply "gradientofunstructureddataset" on the calc. with Scalar
Array set to "M_Z".

Works perfectly in the GUI.

Now I code it in a macro and I do it like that (after the celldatatopointdata):

# create a new 'Calculator'
Mz = Calculator(Input=cellDatatoPointData1)
Mz.ResultArrayName = 'M_Z'
Mz.Function = 'M_Z'
RenameSource('Mz', Mz)



# create a new 'Gradient Of Unstructured DataSet'
grad_Mz = GradientOfUnstructuredDataSet(Input=Mz)
grad_Mz.ScalarArray = ['POINTS', 'M_Z']
grad_Mz.ResultArrayName = 'grad_Mz'
RenameSource('grad_Mz', grad_Mz)

No matter what I do, I always get the wrong Scalar Array selected in
the GUI when I start the macro. When I then correct it in the GUI ->
works.

Any ideas?

Thanks
Richard
_______________________________________________
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

Reply via email to