TCL/TK Tutorial
Part 1

TCL/TK Part 1: Installing, configuring, and testing TCL/TK and VTK

Download the following files:



We are going to need to install all the above, however when we do so we will need to change the default installation paths. The default installation path for vtk will be c:\program files\vtk40, however tcl seems to have issues with long filenames, or names that include a space in them. For this reason we will change the install path for vtk to c:\vtk40 and the install path for tcl to c:\tcl.

Install tcl832.

When you choose the installation directory make sure you change the default path to one that doesn't include spaces or long filenames. Recommended: "c:\tcl" Let it reboot when it asks you to.

Install vtk40Core

As with tcl832 you wish to change the default installation directory to get rid of long filenames and spaces. Recommended: "c:\vtk40"

Install vtk40TCL

When you install tell it to install to the same directory as where you installed vtk40Core.

Extract vtk40Data to the location where you installed vtk40.

Configure VTK TCL wrappings

Browse to the directory where vtk is installed and go to wrapping\tcl, example: "c:\vtk40\wrapping\tcl". Execute MakePackages.tcl by double-clicking on it.

Next enter the vtkbase directory (example: c:\vtk40\wrapping\tcl\vtkbase). Open vtkbase.tcl in notepad (or other text editor). At the very bottom of the file there will be this line:


We need to replace the $::vtk::VTK_DATA_ROOT with the location of where you extracted vtk40data to. If you followed all the previous recomendations the line should look like this:

set VTK_DATA_ROOT "c:\\vtk40\\VTKData"

Note the \\ instead of \.


Everything should now be configured properly. To test you installation browse to the folder <vtk install directory>\Examples\IO\TCL directory, and run flamingo.tcl by double-clicking on it. You should see the following picture:

Congratulations you now have TCL/TK and VTKinstalled.

C++ Tutorial
Python Tutorial
TCL/TK Tutorial

About Us

TCL/TK Tutorial
Part 1: Installation
Part 2: Molecules
Part 3: Terrain
Part 4: Interactive
Part 5: Shapes