DESIGNrev scripts, a few basic templates

Document created by chris_balcom on Jun 19, 2012Last modified by chris_balcom on Aug 23, 2014
Version 3Show Document
  • View in full screen mode

Wondering how to use DESIGNrev Tcl commands with scripts in batch mode?

 

Here are some very simple templates you can use to get started.

 

 

For command-line execution with user input:

 

#===================================

# user input from command line

if {$argc != 1} {

  puts "Error: wrong # of arguments"

  exit

}

set input [lindex $argv 0]

set L [layout create $input]

#add Tcl code here

#===================================

 

Save as a .tcl file and execute with:

 

$MGC_HOME/bin/calibredrv <filename>.tcl  <layout_filename>

 

 

 

 

For command-line execution with layout name hard-coded into the tcl script:

 

#===================================

# Use if layout name is known

set L [layout create lab2.gds]

#add tcl code here

#===================================

 

Save to a file and execute in batch mode from the command line in a terminal window with:

 

$MGC_HOME/bin/calibredrv <filename.tcl>

 

Or, if DESIGNrev is currently running, execute from the DESIGNrev Tcl shell as:

 

% source <filename.tcl>

 

 

 

For Tcl shell execution if layout is currently open in DESIGNrev:

 

#===================================

#Use if layout is currently open in DESIGNrev

set cwb [find object -class cwbWorkBench]

set L [$cwb cget -_layout]

#add tcl code here

#===================================

 

Save to a file with the .tcl extension and execute from DESIGNrev Tcl shell as:

 

% source <filename.tcl>

 

 

 

For more details and examples see the Calibre DESIGNrev Reference Manual.

 

For downloadable examples of DESIGNrev Tcl go to Supportnet, select the Downloads tab and select "Calibre_Utilities,Examples,Scripts_and_Interface_Software" under Related Downloads.

 

Content © Copyright 1995-2012 Mentor Graphics Corp, All rights reserved.

Product names are trademarks and/or ® registered trademarks of their respective owners.

Attachments

    Outcomes