AR# 32513

Tcl - lib_vhdl command fails with full path name - ERROR:TclTasksC:lib_vhdl_022: File "d:/project_dir/lib_file.vhd" does not exist in the project

Description

The lib_vhdl command fails when the full path name of a source file is given.

Example:

The command "lib_vhdl add_file my_lib d:/project_dir/lib_file.vhd" returns the following error.

ERROR:TclTasksC:lib_vhdl_022: File "d:/project_dir/lib_file.vhd" does not exist in the project.

Solution

If lib_file.vhd has been added to the project, the example command above should be changed to : "lib_vhdl add_file my_lib lib_file.vhd"

If you are using a looping command to add files to a library, you may need to use the "file tail" command.

Example:

foreach {file2add} [glob ../source/dir/*] {lib_vhdl add_file my_lib $file2add}

does not work, as $file2add returns a file name qualified with the path.

Workaround is:

foreach {file2add} [glob ../source/dir/*] {lib_vhdl add_file my_lib [file tail $file2add]}

Linked Answer Records

Associated Answer Records

Answer Number Answer Title Version Found Version Resolved
35122 11.5 ISE - Project Navigator does not use Custom Editor for File -> Open or Recent Files N/A N/A
AR# 32513
Date 12/15/2012
Status Archive
Type General Article