实例介绍
cadence二次发开手册,使用tcl语言。这个手册使cadence更加智能化。
Contents 1 Scripting Capa bility 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........... a:..a.aaaa.:::.::.a..a. 14 1.4 Capture TCL/Tk Advanced Environment Setup 15 1.41 Installation instructions 15 2 Learn Basic tc 17 2.1 Command 2.2 Command as a parameter(argument to another command 2.3 Variable 18 2.4“ Space".. 18 2.4.1 Enclose in double quotes, i 2.4.2 Enclose in curly braces, i.e. i and y 18 2.5 Control constructs and eval..……19 2.6 String…………,…… 19 2.7 List 9 2.8 翻看音 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 age 3 3.1.1 Design Database Object Model 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 sessio∩...,… 29 324Open/ 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 . 3.2. 11 Iterate over all hierarchical instances of a page .. 3.2. 12 Iterate over all wires of a page .. 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 age 4 3.2.18 Iterate over all pins of a part instance/drawn 3.219iterateoverallaliasesofawirewwwwwwwwwwwwwwwww.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. 225 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 32.27.2 Iterate over instance occurrence hierarchy.……………………………,39 3.2.27.3 terating 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 ntroduction∴……………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 OrCAD Capture Tcl/Tk Extensions-Application Notes age 5 6 Package Corrections in Capture Library or design..,.,.,,…,,…,…,…156 6.1 Introduction 56 6.2 Script and Usage… 56 6.21 TCL Script Source for package corrections in library or design..………… 58 7 Enumerating Al! Open Libraries and Designs in Active Session.………,…,…,…,…,……….62 7.1 Introduction .62 7.2 Script and Usage .62 7. 2. 1 TCL Script Source for enumerating open libraries and designs in the currently active Capture session 63 8 Adding Custom Commands to Capture 164 8.1 Introduction∴…….64 8. 2 Requirement 164 8.3 Context aware rotation 翻看·音 65 8.3.1 Problem statement 65 8.3.2 Making a Custom Command Available in the Ul 66 8.3.3 TCL Script Source for Context Aware Rotation .67 9 Search and replace text Globally using Regular Expression 68 9.1 Introduction 68 2 Script and Usage 68 9. 2. 1 TCL Script Source for searching and replacing text globally in design in the currently active Capture session……………,…,…,…,…,…,…,…,…,…,…,…,………,………,69 10 Adding custom menus/ submenus under Accessories and associating TCL callbacks 73 10.1 Introduction 着自自,道·着音重自着·自自,自自自自···自 73 10.2 Script and Usage............... 73 10.2.1 TCL Script Source for adding menus/ submenus and define their tcl callbacks 6 OrCAD Capture Tcl/Tk Extensions-Application Notes age 11 OrCAD Capture TCL/Tk Applications Dashboard....................77 11.1 Introduction 77 11.2 Use-Model and customization 77 12 Extended Preferences Dialog…… 281 12.1 Introduction ..............................................................................................81 12.2 Use-model and custom ization 81 13 PD F Export for Capture design 84 13.1 Introduction 84 13.2 Architecture 84 13.3 Use model a::.::::::::.:.::::.a:::.::::·:.:·::::::::·:::::·:·:a:· 85 3.4 Output PDF File Features 93 13.5 The pDF Export Form. ..........................................................................................................95 13.5.1 PDF EXport form field descriptions 96 13.6 More Customization capabilities…......,.,…,…, 98 13.6.1 Object and properties filtering for PDF annotation 98 13.7 Minimum software requirement 98 13. 8 Handling Error Code in PDF Export. ..........................................................................98 14 Capture Communication Server... ……101 14.1 Introduction..…….…101 14.2 Use-model and custom ization 4101 5 Tcl Encryption Support 105 15.1 Steps to Encrypt Tcl Scripts…………,… 105 15.2 Important Information about Encrypting Tcl Scripts 106 16 Page Customization 108 16.1 Introduction 108 OrCAD Capture Tcl/Tk Extensions- Application Notes age 7 16.2Use- model and customization.………… 00 108 17 Common TCL/Tk Issues...................111 8 Appendix a: Database Commands List 112 OrCAD Capture Tcl/Tk Extensions-Application Notes age 8 1 Scripting Capability in OrCAD Capture As part of the Cadence 16. 3 release, OrCaD@ Capture was enhanced to include support for TCL/TK scripting capability greatly extending users' ability to develop custom applications and scripts for their design environment. This provides users with immense power to interact with both the capture Ul and the design database. Productivity improvements and tool efficiency drive the need for scripting and customization in a users design environment. With scripting and customization, designers can apply automation to manual processes and complete projects faster. Manual, often tedious, tasks can be automated, difficult operations can be streamlined, and custom features that dont exist natively can be created; further enhancing and extending the capture environment Capture's new scripting functionality provides the ability for users to execute TCl/TK commands as well as custom scripts through a command window or GUI customizations. The integrated TCL interpreter also allows execution of any standard TCl/TK command as well as numerous Capture specific TCL/TK commands The Capture Command Window can be displayed (if not already available by selecting View->Toolbar->Command window menu 圈 OrCAD Capture CIs File View Tools Edit Options Window Hell Toolbar Capture Draw FPGA CIs Explorer maNager Search Footprint viewer Command window Customize OrCAD Capture Tcl/Tk Extensions-Application Notes age 9 TCL/Tk provides an extensive set of scripting functionality the core tcl/tk functiona lity includes procedures and commands for data manipulation control constructs, mathematical expressions file l/o routines, system calls, registry handling gul designing and many more the always growing additional packages of tCL/Tk are just making almost everything possible that can be done using any procedural language. Refer to Learn Basic TCl for learning basic TCl syntax The integrated TCL interpreter in OrCad Capture allows any commands from these tcl/tk packages to run seamlessly. On top of that, OrCAD Capture provides a rich set of its own TCL commands that gives immense power to the users to interact with both Capture UI and database through the scripting interface Capture tcl Communication Server-Client cOrCAD Capture Other Or CaD Command window OrCAD Capture Standalone Capture Database(dsn. olb Applications User action TCL commands]4 Database TCL Commands I TCL installation Capture provides two sets of its own tCl commands User action tcl commands Database tcl commands 1.1 User action tcl commands User-action TCL commands correspond to the operations within the gui performed by the user. Every user action performed in Capture is logged in the form of a tcl command Journaling provides the facility to store and later replay the command or copy for use in an external script OrCAD Capture Tcl/Tk Extensions- Application Notes Page 10 【实例截图】
【核心代码】
标签:
小贴士
感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。
- 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
- 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
- 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
- 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。
关于好例子网
本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明
网友评论
我要评论