[vtkusers] Help with tcl interpreter
shahid
shahed at isb.paknet.com.pk
Tue Jul 29 08:24:38 EDT 2003
You probably need to first check that you Interp process is initialized
properly
code=Tcl_Eval(tclinterp,"info library"); # returned path must include path
to vtk files
#else "package require vtk"
shall fail
doing
Tcl_EvalFile(tclinterp, "your_tcllibpath/init.tcl"); # may help to
initialize the interpreter properly
Hope this shall solve your problem.
shahed
-----Original Message-----
From: vtkusers-admin at vtk.org [mailto:vtkusers-admin at vtk.org]On Behalf Of
Johanna
Sent: Tuesday, July 29, 2003 12:38 PM
To: vtkusers at vtk.org
Subject: [vtkusers] Help with tcl interpreter
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
More information about the vtkusers
mailing list