EDA365电子论坛网
标题: axlUIPopupDefine问题请教下版主 [打印本页]
作者: yneda 时间: 2013-11-5 16:09
标题: axlUIPopupDefine问题请教下版主
本帖最后由 yneda 于 2013-11-5 16:16 编辑
版主你好!
有个问题请教下,我想做这样一个操作,运行skill后,进入到框选状态,框选完后对框选后的目标进行处理,处理完后,再进入到下次框选状态,直到右键cancel后,结束退出。如下代码,不知道如何能实现,谢谢!
procedure( test()
let((mypopup dbid_symbol)
if(axlOKToProceed() then
axlClearSelSet()
axlSetFindFilter(?enabled '("NOALL" "SYMBOLS") ?onButtons '("SYMBOLS"))
mypopup = axlUIPopupDefine(nil list(list("Done" 'axlFinishEnterFun) list("Cancel" 'axlCancelEnterFun))
axlUIPopupSet(mypopup)
dbid_symbol = axlSingleSelectBox()
if(dbid_symbol then
fun1() ;运行完后,如再这里调用test()则会进入死循环,除非框选为nil,否则中止不了。
else
fun2() ;如果框选目标为nil,再调用test()和上面的情况差不多。
)
else
axlUIConfirm("Finish current command first.")
)
);end let
);end procedure
作者: deargds 时间: 2013-11-6 13:16
参考- procedure( test()
- let((mypopup dbid_symbol)
- if(axlOKToProceed() then
- axlClearSelSet()
- axlSetFindFilter(?enabled '("NOALL" "SYMBOLS") ?onButtons '("SYMBOLS"))
- mypopup = axlUIPopupDefine(nil list(list("Done" 'test_done) list("Cancel" 'test_cancel)))
- axlUIPopupSet(mypopup)
- stop = t
- while(stop
- axlClearSelSet()
- dbid_symbol = axlGetSelSet(axlSingleSelectBox())
- if(dbid_symbol then
- axlHighlightObject(dbid_symbol t)
- println(dbid_symbol~>name)
- else
- println(dbid_symbol~>name)
- )
- )
- axlUIPopupSet(nil)
- else
- axlUIConfirm("Finish current command first.")
- )
- );end let
- );end procedure
- procedure( test_done()
- let(()
- stop = nil
- axlFinishEnterFun()
- )
- )
- procedure( test_cancel()
- let(()
- stop = nil
- axlCancelEnterFun()
- )
- )
复制代码
作者: yneda 时间: 2013-11-6 14:30
谢谢版主指点,非常给力,我测试了下,好的很。谢谢!
针对这,还有一个问题请教下,如果注册一个命令来运行test这个命令没问题,但如果直接调用test()这个函数却有问题,不能中止,不知道是什么原因。
调用方法一(没问题):
;;
axlCmdRegister( "test" 'test)
;;点击check button来掉调用
( "Field_check"
axlShell("test")
)
调用方法二(不能中止):
;;
;;点击check button来掉调用
( "Field_check"
test()
)
;;
procedure( test()
......
)
作者: deargds 时间: 2013-11-6 16:16
需要右键菜单执行Done,或Cancel时才会中止,中止条件为
stop = nil,确认是否满足。
作者: bruce777 时间: 2017-5-23 14:29
收下学习了,谢谢楼主

作者: liuyidao 时间: 2022-2-11 14:14
楼主这个问题解决了吗
作者: mofise007 时间: 2022-2-11 15:06
11111111111
作者: liuyidao 时间: 2022-2-14 17:09
我也有这样的问题,第一次点按钮,启动函数,没有右键菜单,再点一次按钮就有了。解决方法是首先把allegro的模式即applicaiton mode设置为None- if( axlVersion('version)>=15.7 then
- axlShell("noappmode")
- )
复制代码 解决方法参考的是cadence官方论坛
问题的网址是:https://community.cadence.com/cadence_technology_forums/pcb-design/f/pcb-editor-skill/15999/axluipopupdefine-axluipopupset/70397#70397
#1
The example you give can run successfully without any problem just in the Application mode "NONE" of Allegro 16.3.
And in other three Application Modes (Genaral Edit/ Placement Edit/ Etch Edit) the PopupMenu won't display when we run the command "showElement " the first time.
But after we select anything on the board, we can see the PopupMenu displayed again.
Can you tell me how to display the PopupMenu when we run the command "showElement " the first time ??
Thanks a lot !
#2
for Allegro version higher than 15.7, we usually "force" allegro into Application mode "NONE"
(if allegroVersion>15.7 then
axlShell("noappmode")
)
#3
After we force allegro into Application mode "NONE",it work very well.
Thank you for your suggestion!
作者: 白胡子 时间: 2022-7-19 18:51
解决了,太棒了,谢谢分享
| 欢迎光临 EDA365电子论坛网 (https://bbs.eda365.com/) |
Powered by Discuz! X3.2 |