<DIV>Thanks Tom,</DIV>
<DIV> </DIV>
<DIV>But it did not work, perhaps because I am using an unstructured grid, which doesn't seem to recognise the method "SetActiveScalars", what should be the equivalent I think, "SetScalarsName", is recognised, but doesn't do what I expected as I said (It always uses the scalar field that comes last in the script).</DIV>
<DIV> </DIV>
<DIV>Does anyone know how to use different scalar fields in different parts of the one TCL script?</DIV>
<DIV> </DIV>
<DIV>I am guessing this has something to do with the lazy algorithm, meaning that these scripts don't execute in a linear fasion?</DIV>
<DIV> </DIV>
<DIV>Sonam<BR><BR><B><I>tom fogal <tfogal@apollo.sr.unh.edu></I></B> wrote:</DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid"><20041018115934.57007.qmail@web61101.mail.yahoo.com>s comp writes:<BR>>How, for example, do I contour 2 different scalar fields from the one data set<BR>> at the same time?<BR>><BR>>The obvious way of using SetScalarsName once creating a contour, and then usin<BR>>g SetScalarsName again to change the scalar field, and creating another contou<BR>>r does not work - both contours are of the same scalar field.<BR><BR>Try 'SetActiveScalars(char*)'. The string it takes is the name given to<BR>the scalars via AddArray() and SetArray() [which both use the name of<BR>the vtk<X>Array which is passed into it].<BR>These methods are off of vtkPointData or one of its parents, I believe.<BR>For example, for a rectilinear grid (at least) I would do:<BR><BR>Grid->GetPointData()->SetActiveScalars("data1");<BR>[ . . . generate contour . .
.]<BR>Grid->GetPointData()->SetActiveScalars("data2");<BR>[ . . . generate contour . . .]<BR><BR>HTH,<BR><BR>-tom<BR><BR><SNIP><BR></BLOCKQUOTE><p><br><hr size=1>
Find local movie times and trailers on <a href="http://au.rd.yahoo.com/mail/tagline/*http://au.movies.yahoo.com" target=_blank><b>Yahoo! Movies.</b></a><br>