[vtkusers] Help with tcl interpreter
Johanna
pettersson.johanna at home.se
Tue Jul 29 06:53:00 EDT 2003
Thank you for your tip.
I have already done that however. The problem is not to find the tcl script but to run it. When the tcl script only contains for example setting a variable, 'set var 5', everything works fine and I can access the variable from my c++ file. But when I try to use vtk classes in the tcl script the Tcl_EvalFile returns an error, i.e. the problem seems to have something to do with vtk...
Johanna
-----Original Message-----
From: Robert Belleman <robbel at science.uva.nl>
To: Johanna <pettersson.johanna at home.se>
Date: Tue, 29 Jul 2003 11:56:18 +0200
Subject: Re: [vtkusers] Help with tcl interpreter
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/ []
_______________________________________________
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
More information about the vtkusers
mailing list