没有合适的资源?快使用搜索试试~ 我知道了~
首页cadence二次开发手册TCL
资源详情
资源评论
资源推荐
OrCAD Capture Tcl/Tk Extensions – Application Notes Page 1
Cadence Design Systems, Inc.
Application Notes
OrCAD Capture TCL/Tk Extensions
Revision: 1.1
Note: This is a work in progress document and updated versions
will be available periodically. For any inputs/feedback please
email to orcad_scripting@cadence.com
OrCAD Capture Tcl/Tk Extensions – Application Notes Page 2
OrCAD Capture Tcl/Tk Extensions – Application Notes Page 3
Contents
1 Scripting Capability in OrCAD Capture .................................................................................................... 9
1.1 User action TCL commands ........................................................................................................... 10
1.2 Database TCL commands .............................................................................................................. 12
1.3 Automatic script load and procedure calls ................................................................................... 13
1.3.1 Automatic scripts loading at Capture startup ........................................................................... 13
1.3.1.1 Recommendation to TCL application providers .............................................................. 13
1.3.2 TCL procedure callback on various events ................................................................................ 14
1.4 Capture TCL/Tk Advanced Environment Setup ............................................................................. 15
1.4.1 Installation instructions ............................................................................................................ 15
2 Learn Basic TCL ...................................................................................................................................... 17
2.1 Command ...................................................................................................................................... 17
2.2 Command as a parameter (argument) to another command ...................................................... 17
2.3 Variable ......................................................................................................................................... 18
2.4 “Space” .......................................................................................................................................... 18
2.4.1 Enclose in double quotes, i.e. " and " ...................................................................................... 18
2.4.2 Enclose in curly braces, i.e. { and } ............................................................................................ 18
2.5 Control constructs and Eval .......................................................................................................... 19
2.6 String ............................................................................................................................................. 19
2.7 List ................................................................................................................................................. 19
2.8 Math .............................................................................................................................................. 20
2.9 User defined command, aka Procedure ....................................................................................... 20
3 Learn Capture Database TCL ................................................................................................................. 22
3.1 Database Object Model ................................................................................................................ 22
OrCAD Capture Tcl/Tk Extensions – Application Notes Page 4
3.1.1 Design Database Object Model ................................................................................................. 22
3.1.2 Library Database Object Model ................................................................................................ 23
3.2 Database TCL commands .............................................................................................................. 25
3.2.1 Getting Started .......................................................................................................................... 25
3.2.1.1 An easy way to find the commands and its parameters ................................................. 25
3.2.1.2 Database class hierarchy ................................................................................................. 26
3.2.1.3 String type conversion .................................................................................................... 28
3.2.1.4 DboTclHelper* commands .............................................................................................. 28
3.2.1.5 Convention used in this chapter ..................................................................................... 29
3.2.2 Get the current Capture session ............................................................................................... 29
3.2.3 Create a new Capture session ................................................................................................... 29
3.2.4 Open/Get a design in the Capture session ............................................................................... 29
3.2.5 Iterate over all open designs in the session .............................................................................. 29
3.2.6 Get schematic of a design ......................................................................................................... 30
3.2.7 Iterate over all schematics of a design ..................................................................................... 30
3.2.8 Get page of a schematic ............................................................................................................ 30
3.2.9 Iterate over all pages of a schematic ........................................................................................ 31
3.2.10 Iterate over all part instances of a page ............................................................................. 31
3.2.11 Iterate over all hierarchical instances of a page ................................................................. 31
3.2.12 Iterate over all wires of a page ........................................................................................... 32
3.2.13 Iterate over all globals of a page ......................................................................................... 32
3.2.14 Iterate over all title-blocks of a page .................................................................................. 33
3.2.15 Iterate over all ports of a page ............................................................................................ 33
3.2.16 Iterate over all off-pages of page ........................................................................................ 33
3.2.17 Iterate over all graphics of a page ....................................................................................... 34
OrCAD Capture Tcl/Tk Extensions – Application Notes Page 5
3.2.18 Iterate over all pins of a part instance / drawn instance .................................................... 35
3.2.19 Iterate over all aliases of a wire .......................................................................................... 35
3.2.20 Iterate over all flat nets of a design .................................................................................... 35
3.2.21 Iterate over all user properties of any object ..................................................................... 36
3.2.22 Iterate over all display properties of any object ................................................................. 36
3.2.23 Iterate over all effective properties of any object .............................................................. 37
3.2.24 Get part instance/drawn instance attributes ..................................................................... 37
3.2.25 Get wire attributes .............................................................................................................. 38
3.2.26 Get other objects attributes ............................................................................................... 39
3.2.27 Hierarchy traversal .............................................................................................................. 39
3.2.27.1 Get root instance occurrence of a design ................................................................... 39
3.2.27.2 Iterate over instance occurrence hierarchy ................................................................ 39
3.2.27.3 Iterating port occurrence within an instance occurrence .......................................... 40
3.2.27.4 Iterating off-page occurrence within an instance occurrence .................................... 40
3.2.27.5 Iterating net occurrence within an instance occurrence ............................................ 40
3.2.27.6 Iterating title-block occurrence within an instance occurrence ................................. 41
4 Migrating OrCAD Capture Designs ........................................................................................................ 42
4.1 Introduction .................................................................................................................................. 42
4.2 Script and Usage ........................................................................................................................... 43
4.2.1 TCL Script Source for Capture design revision .......................................................................... 46
5 Synchronizing PCB Footprint Property Value on Part Instances with the Property Value on Their
Cached Packages after Replace Cache ........................................................................................................ 49
5.1 Introduction .................................................................................................................................. 49
5.2 Script and Usage ........................................................................................................................... 49
5.2.1 TCL Script Source for synchronizing PCB footprint property value .......................................... 51
剩余445页未读,继续阅读
surpassLiang
- 粉丝: 273
- 资源: 35
上传资源 快速赚钱
- 我的内容管理 收起
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
会员权益专享
最新资源
- zigbee-cluster-library-specification
- JSBSim Reference Manual
- c++校园超市商品信息管理系统课程设计说明书(含源代码) (2).pdf
- 建筑供配电系统相关课件.pptx
- 企业管理规章制度及管理模式.doc
- vb打开摄像头.doc
- 云计算-可信计算中认证协议改进方案.pdf
- [详细完整版]单片机编程4.ppt
- c语言常用算法.pdf
- c++经典程序代码大全.pdf
- 单片机数字时钟资料.doc
- 11项目管理前沿1.0.pptx
- 基于ssm的“魅力”繁峙宣传网站的设计与实现论文.doc
- 智慧交通综合解决方案.pptx
- 建筑防潮设计-PowerPointPresentati.pptx
- SPC统计过程控制程序.pptx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论2