EDA365电子工程师网

标题: [求助]请问如何用skill重播script?axlShell("replay xxx.scr")会有问题 [打印本页]

作者: leilei4908    时间: 2017-7-11 18:32
标题: [求助]请问如何用skill重播script?axlShell("replay xxx.scr")会有问题
本帖最后由 leilei4908 于 2017-7-11 18:48 编辑

在command窗口可以用replay xxx.scr重播
skill可以用
axlShell("replay xxx.scr")
但用这个指令,经常会出现E-Can't found window;form.xxx这种问题
比如我需要Export dxf,录制的scr如下
scriptmode +c
version 15.51
setwindow pcb
dxf out
setwindow form.dxf_out
FORM dxf_out dxffile top
FORM dxf_out layercnvfile TOP_1
FORM dxf_out edit
setwindow form.dxfOutMapping
FORM dxfOutMapping selectall YES
FORM dxfOutMapping newlayer
fillin "top"
FORM dxfOutMapping map
FORM dxfOutMapping done
setwindow form.dxf_out
FORM dxf_out exportsymbols NO
FORM dxf_out drillinfo NO
FORM dxf_out nomultisegpoly NO
FORM dxf_out monochrome YES
FORM dxf_out execute
FORM dxf_out close
setwindow pcb

反馈如下:
Script version: 15.51
E- Can't find window; form.dxf_out
E- Command not found: FORM dxf_out dxffile top
E- Command not found: FORM dxf_out layercnvfile TOP_1
E- Command not found: FORM dxf_out edit
E- Can't find window; form.dxfOutMapping
E- Command not found: FORM dxfOutMapping selectall YES
E- Command not found: FORM dxfOutMapping newlayer
E- Command not found: fillin top
E- Command not found: FORM dxfOutMapping map
E- Command not found: FORM dxfOutMapping done
E- Can't find window; form.dxf_out
E- Command not found: FORM dxf_out exportsymbols NO
E- Command not found: FORM dxf_out drillinfo NO
E- Command not found: FORM dxf_out nomultisegpoly NO
E- Command not found: FORM dxf_out monochrome YES
E- Command not found: FORM dxf_out execute
E- Command not found: FORM dxf_out close
用replay xxx.scr就不会有这个问题;用axlShell("replay xxx.scr")就出现了


在注册功能 axlCmdRegister("cmd" 'cmd) 的时候需要加上?cmdType 'general
即axlCmdRegister("cmd" 'cmd ?cmdType 'general)

好像是没出现上面的问题了






欢迎光临 EDA365电子工程师网 (http://bbs.elecnest.cn/) Powered by Discuz! X3.2