If "puts $::tcl_interactive" is run in the Vivado Tcl shell using either batch or GUI mode, it always returns a value of 1.
According to the help on the command tcl_interactive:
"tcl_interactive Contains 1 if tclsh or wish is running interactively (no script was specified and standard input is a terminal-like device), 0 otherwise."
I need to execute different Tcl commands in Vivado according to the mode (batch or GUI) of Vivado.
I expect to be able to use the standard $::tcl_interactive Tcl variable, but it equals 1 in both modes of Vivado.
Is there another way to know the current mode Vivado is running?
In batch mode, I see an unexpected value:
In GUI mode, I can see the expected value:
Two possible options to work around this command limitation are:
$rdi::mode returns one of following depending on how Vivado was started.