TA的每日心情 | 无聊 2025-5-16 15:22 |
---|
签到天数: 34 天 [LV.5]常住居民I
|
EDA365欢迎您登录!
您需要 登录 才可以下载或查看,没有帐号?注册
x
本帖最后由 雞翅加辣 于 2024-8-8 09:31 编辑
前言:
相信大家知道allegro.menu的用途了。 但你可能不知道,該如何尋找你所使用allegro.menu
確認Allegro抓取路徑(可以讀此篇 MENU離奇消失)
commend 輸入 > set並確認系統讀取的menu路徑
set menupath = . C:/cadence/SPB_17.4/share/local/pcb/menus C:/Cadence/SPB_17.4/share/pcb/text/cuimenus
. 是依你開啟檔案目錄
C:/cadence/SPB_17.4/share/local/pcb/menus 使用者設定不依附 HOME ( pcbenv ), 原廠預設. 空的,沒檔案
C:/Cadence/SPB_17.4/share/pcb/text/cuimenus allegro 基本原廠預設.
正文開始:
我們來說說怎麼透過skill 增加Allegro.menu
首先我們從手冊上可以知道,以下指令用途,我簡單介紹他們。
- axlUIMenuLoad 載入我們當前的menu
- axlUIMenuFind查找我們待會想要插入的菜單-菜名 前後菜單是誰。
- axlUIMenuInsert 塞入我們菜單名
- axlUIMenuDump 儲存本次異動的菜單
話不囉嗦,先上圖
![]()
以下範例,可以直接儲存成.il檔;沒什麼技術含量,單純弄個範例給自己看而已。
最後,系統會自動幫我們把原本的allegro.men 備份成allegro.men1
新的塞入的資料,就會是allegro.men
- axlCmdRegister( "yukilearn", 'yukilearn ?cmdType "general")
- procedure(yukilearn()
- let((q z off_item)
-
-
- ;載入使用者所使用的menu
- oriMenuFile=strcat(cdsGetInstPath() "\\share\\pcb\\text\\cuimenus\\allegro.men")
- oriMenuView=axlUIMenuLoad(oriMenuFile)
-
-
- ;新增一個大格子
- z=axlUIMenuInsert(q 'popup "MyTest")
- axlUIMenuInsert(z "Google" "http http://goole.com")
- axlUIMenuInsert(z "Yahoo" "http http://yahoo.com")
-
-
- ;尋找某個指令屬於哪一個menu item ,top是放在最頂端 bottom在最尾端,-1在命令前
- q=axlUIMenuFind(nil "http http://goole.com" 'bottom) ;
- axlUIMenuInsert(q ,"EDA365" "http http://EDA365.com")
-
-
- ;關閉某個item
- off_item=axlUIMenuFind(z "http http://yahoo.com")
- axlUIMenuChange(off_item 'enable nil)
-
- ;儲存當前menu
- axlUIMenuDump(oriMenuFile)
-
- )
- )
复制代码
|
|