[vtkusers] simple question about Tcl and VTK

Romy Schneider romy at tacc.utexas.edu
Tue Oct 10 17:53:34 EDT 2006


I know there is probably some simple fix for this or some Tcl syntax I am just not aware of, but I seem to be having issues combing commands when arrays of numbers are involved.  For instance, the following code:

vtkCamera cam1
cam1 SetFocalPoint 0.0 0.0 0.0
vtkLight light
light SetFocalPoint [cam1 GetFocalPoint]

returns the following error:

"
Error in startup script: Object named: light, could not find requested method: SetFocalPoint
or the method was called with incorrect arguments.

    while executing
"light SetFocalPoint [cam1 GetFocalPoint]"
"

This is inside a script that I run with % vtk script.  If I change the fourth line to "light SetFocalPoint 0.0 0.0 0.0", it works.  I am very confused why I am getting an error, there are plenty of VTK/Tcl examples in the literature that use these very commands.  It seems to happen whenever the command in [ ] returns an array or list of numbers.  Is there some setting or something in Tcl that I am missing?  

thanks, 
Romy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20061010/2042ecdf/attachment.htm>


More information about the vtkusers mailing list