This is one possibility. If you change the CURRENT and DESIGN variables in the TechNote script that you linked to the following:
set inFile test.gds
set DESIGN [layout create $inFile]
set CURRENT [find objects -class cwbWorkBench]
# set CURRENT [find objects -class cwbWorkBench]
# set DESIGN [ $CURRENT cget -_layout ]
set PADREF [open padref.txt r]
then you can invoke Calibre DESIGNrev in batch mode as follows:
calibredrv -s macro_padref.tcl
This should achieve the same objective without having the layout already open.
macro_padref.tcl.zip 1.2 KB
Thanks Matthew, this was exactly what i was looking for.