ExpeditionPCB는 간단한 조작으로 단축키를 지정할 수 있습니다.
아래와 같이 여러 가지 단일 키 또는 키의 조합으로 단축키를 지정할 수 있는데, F1-F12 나 단일 키는 일반적인 사용에 문제를 일으킬 수 있으므로 가급적 사용하지 않는 것이 좋습니다.
<key>
Alt+<key>
Ctrl+<key>
Alt+Shift+<key>
Ctrl+Shift+<key>
Ctrl+Alt+Shift+<key>
단축키의 지정을 위해서는 우선 아래와 같이 BindingTables 컬렉션에 접근해야 합니다.
Set keyBindTables = Gui.Bindings("Document")
아래와 같이 AddKeyBinding method로 BindingTables컬렉션에 단축키를 정의하는 것으로 즉시 단축키를 사용할 수 있게 됩니다.
(아래의 예에서 BindMenu, BindAccelerator, BindCommand는 상수로 각각의 값은 0, 1, 1 에 해당합니다. 경우에 따라 숫자로 바꿔서 사용해야 할 수 있습니다.)
* 단축키로 ExpeditionPCB의 메뉴 호출
keyBindTables.AddKeyBinding "Ctrl+1", "Edit->Review->DesignStatus", BindMenu, BindAccelerator
* 단축키로 key-in command 또는 작성된 Automation script 호출 (아래에서 key-in command로 사용된 "za"는 View to fit all 기능입니다.
keyBindTables.AddKeyBinding "Ctrl+2", "za", BindCommand, BindAccelerator
keyBindTables.AddKeyBinding "Ctrl+3", "run c:/WDIR/my_script.vbs", BindCommand, BindAccelerator
첨부된 my_key.vbs는 위의 세 가지 단축키를 지정한 것으로 ExpeditionPCB에서 실행한 후 다음과 같은 단축키를 사용할 수 있습니다.
Ctrl+1 : Edit > Review > Design Status메뉴 호출
Ctrl+2 : Fit All 상태로 view scale 조정
Ctrl+3 : c드라이브의 WDIR디렉터리에 있는 my_script.vbs 파일을 실행
Shortcut Keys와 관련된 내용은 PCB Automation Reference(expedition_pcb_auto.pdf)의 Chapter 2 Common Application Servers > Using Shortcut Keys 에 자세히 소개되어 있습니다.
PCB Automation Tutorial(pcb_auto_tut.pdf) 의 Chapter 6. Adding Accelerator Keys > Exercise 1: Adding an Accelerator Key 에 자세히 소개되어 있습니다. 예제 script도 툴 설치와 함께 아래의 위치에 제공됩니다.
%SDD_HOME%\standard\examples\pcb\Automation\Scripts\KeyBindings.vbs
//==========================================================================
// DISCLAIMER OF WARRANTY: Unless otherwise agreed in writing,
// Mentor Graphics software and associated files are provided "as is"
// and without warranty. Mentor Graphics has no obligation to support
// or otherwise maintain software. Mentor Graphics makes no warranties,
// express or implied with respect to software including any warranty
// of merchantability or fitness for a particular purpose.
//
// LIMITATION OF LIABILITY: Mentor Graphics is not liable for any property
// damage, personal injury, loss of profits, interruption of business, or for
// any other special, consequential or incidental damages, however caused,
// whether for breach of warranty, contract, tort (including negligence),
// strict liability or otherwise. In no event shall Mentor Graphics'
// liability exceed the amount paid for the product giving rise to the claim.
//==========================================================================
Comments