|
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
×
本帖最后由 xiaohe8696 于 2012-12-14 23:36 编辑
最近在学习Laker Tcl脚本语言,下面是laker自带的一段示例,我想让结果输出成一个文本文档应该怎么做?
proc findLabel {libname} {
dbOpenLib -lib $libname
set cellList [dbGetAllCells -lib $libname]
puts ""
foreach cell $cellList {
set cellType [dbGetAllViews -lib $libname -cell $cell]
#
# There are three possible cell types: symbolic, layout, and mdevice
#
if { $cellType == "layout" } {
set cv [dbOpenCV -lib $libname -cell $cell]
if { $cv != 0 } {
set aList [dbGet -obj $cv -attr Shapes]; #a label is a shape object
foreach object $aList {
if { [dbGet -obj $object -attr Type] == "Label" } {
set labelValue [dbGet -obj $object -attr Text]
puts "Lib: $libname Cell: $cell Label Text: $labelValue"
}
}
dbCloseCV -cv $cv
}
}
}
dbCloseLib -lib $libname
} |
|