微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > PCB设计问答 > Genesis学习交流 > 学着写的一个脚本,大家看看

学着写的一个脚本,大家看看

时间:10-02 整理:3721RD 点击:

##############
start:
##Pre-define the setting
set GUI_CMD = /tmp/gui_cmd.$$
set GUI_RESP = /tmp/gui_resp.$$
set IFILE = /tmp/do_info.$$
alias GUI_OUT 'echo \!:* >> $GUI_CMD'
alias GUI_EXE 'c:/genesis/e82/all/gui $GUI_CMD > $GUI_RESP; source $GUI_RESP; rm $GUI_CMD; rm $GUI_RESP'
GUI_OUT WIN 200 200
GUI_OUT LABEL 'input the filename'
GUI_OUT FORM
GUI_OUT TEXT fname 4 F/N:
GUI_OUT DTEXT fname m
GUI_OUT ENDFORM
GUI_OUT RADIO quit Quit H 1 990099
GUI_OUT Continue
GUI_OUT Quit
GUI_EXE

###########################
switch ($quit)
       case 1:
            if ( -e c:/genesis/fw/jobs/$fname|$fname ==   ) then
                                    GUI_OUT WIN 200 200
                                    GUI_OUT LABEL 'file has exist or the filename error'
                                    GUI_OUT ENDFORM
                                    GUI_OUT CLABEL CONTINUE
                                    GUI_EXE 
                                    goto start
             else

         ### creat job
             COM create_entity,job=,is_fw=no,type=job,name=$fname,db=genesis,fw_type=form
         ### creat step-orig
            COM create_entity,job=$fname,is_fw=no,type=step,name=orig,db=genesis,\
            fw_type=form
         ### creat step-pcb
            COM create_entity,job=$fname,is_fw=no,type=step,name=pcb,db=genesis,\
            fw_type=form
         ### open the job
            COM clipb_open_job,job=$fname,update_clipboard=view_job
            COM open_job,job=$fname

            endif

       breaksw
  
       case 2:
           echo "quit the scripts"
                   exit
                    exit
                     exit
                      exit
                        exit
       breaksw
endsw


exit
exit
exit
exit

你的这个脚本有什么用呢?

可以认识一下你吗?

QQ:6966350

:qaes1728@21cn.com

Genesis脚本学习交流!如需要脚本的加QQ469821706!

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top