[vtkusers] Help with tcl interpreter

Robert Belleman robbel at science.uva.nl
Tue Jul 29 05:56:18 EDT 2003


Johanna,

Try setting an explicit path to myTclScript.tcl in
your call to Tcl_EvalFile().

-- Rob

On Tue, Jul 29, 2003 at 09:38:04AM +0200, Johanna wrote:
> Hello
> 
> I am trying to use Tcl_Interp and Tcl_EvalFile to evaluate a tcl script from a c++ file. My code looks like this: 
> 
> Tcl_Interp *tclinterp;
> tclinterp = Tcl_CreateInterp();
> 
> int code = Tcl_EvalFile(tclinterp, "myTclScript.tcl");
>   
> if (code!=TCL_OK) {
>   return TCL_ERROR;
> }
> 
> The problem is that Tcl_EvalFile is never TCL_OK and always returns an error, i.e. myTclScript.tcl can not be evaluated. When my tcl script has been run by the interpreter I would like to access some actors generated in the tcl script.
> 
> Does anyone have any experience on this and can see what I am doing wrong?
> 
> Sincerely
> Johanna
> 
> _______________________________________________
> This is the private VTK discussion list. 
> Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers

-- 
[] Robert Belleman, PhD    X  Faculty of Science, Informatics Inst.    []
[] robbel at science.uva.nl  |X| University of Amsterdam, the Netherlands []
[] tel: (+31) 20 525 7510  X  http://www.science.uva.nl/~robbel/       []



More information about the vtkusers mailing list