微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > PCB设计问答 > Genesis学习交流 > 脚本修改尾孔顺序

脚本修改尾孔顺序

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

请问各位大佬:

我原来所在公司须将字符孔(0.55MM)的刀序排到最后

我打算通过将其在AUTO DRILL MANAGER中将其字符孔的STAGE设为3后再修改下面这段程式来达到目的(下面这段只能将SLOT孔与钻孔分开来排),我如何修改这段程式保证钻带(在有槽孔的时候)将字符孔提出来排到最后

且在没有槽孔的时候也不会冲突了?

if ( $slotyn == "2" ) then
     PAUSE Please check slot and drll table
     source $GENESIS_DIR/sys/scripts/program/gui_set2
     gui_out FORM
     guiout LABEL Please Enter Hole num:
     guiout ENDFORM
     gui_out FORM
     guiout LABEL HoleNum
     guiout TEXT holenum 3
     guiout ENDFORM
     gui_out FORM
     guiout LABEL SlotNum
     guiout TEXT slotnum 3
     guiout ENDFORM
     guiout CLABEL Execute
     dogui
     set holetmp = `echo "scale = 1; $holenum + 2" | bc`
     set holetmp1 = `echo "scale = 1; $holenum + 3" | bc`
     set slottmp = `echo "scale = 1; $slotnum + 2" | bc`
     set slottmp1 = `echo "scale = 1; $slotnum + 4" | bc`
     set i = 1
     set n = 1
     sed -n 1,"$holetmp"p d:/disk/film/$JOB/$JOB.out > d:/disk/film/$JOB/$JOB.drlhead
     while ( $i <= $slotnum )
           set tempnum = `echo "scale = 1; $holenum + $i" | bc`
        if ( $tempnum < 10 ) then
           sed s/T0"$i"/T0"$tempnum"/g d:/disk/film/$JOB/$JOB.slot > d:/disk/film/$JOB/$JOB.slotnew
        else
           sed s/T0"$i"/T"$tempnum"/g d:/disk/film/$JOB/$JOB.slot > d:/disk/film/$JOB/$JOB.slotnew
        endif
        @ i++
        mv d:/disk/film/$JOB/$JOB.slotnew d:/disk/film/$JOB/$JOB.slot
     end
     sed -n 3,"$slottmp"p d:/disk/film/$JOB/$JOB.slot > d:/disk/film/$JOB/$JOB.slothead
     cat d:/disk/film/$JOB/$JOB.slothead >> d:/disk/film/$JOB/$JOB.drlhead
     sed /M30/d d:/disk/film/$JOB/$JOB.out > d:/disk/film/$JOB/$JOB.drll
     sed -n "$holetmp1",\$p d:/disk/film/$JOB/$JOB.drll > d:/disk/film/$JOB/$JOB.drlbody
     sed -n "$slottmp1",\$p d:/disk/film/$JOB/$JOB.slot > d:/disk/film/$JOB/$JOB.slotbody
     cat d:/disk/film/$JOB/$JOB.drlhead > d:/disk/film/$JOB/$JOB.out
     cat d:/disk/film/$JOB/$JOB.drlbody >> d:/disk/film/$JOB/$JOB.out
     cat d:/disk/film/$JOB/$JOB.slotbody >> d:/disk/film/$JOB/$JOB.out
     rm -r d:/disk/film/$JOB/$JOB.drlbody
     rm -r d:/disk/film/$JOB/$JOB.drlhead
     rm -r d:/disk/film/$JOB/$JOB.drll
     rm -r d:/disk/film/$JOB/$JOB.slot
     rm -r d:/disk/film/$JOB/$JOB.slotbody
     rm -r d:/disk/film/$JOB/$JOB.slothead
     rm -r d:/disk/film/$JOB/$JOB.rep
     rm -r d:/disk/film/$JOB/$JOB.slotrep
     PAUSE Thank you,Please check drl
     COM ncset_page_close
else
     PAUSE Thank you,Please check out
     COM ncset_page_close
endif


这不是你写的吧?

可以联系我帮你看看!QQ:517749542

呵呵

我已修改OK了,只不过槽孔不能超过10把刀

不过我不会修改SET_TABLE文件将其字符孔自动设成STAGE 3

24580968QQ 联系我 给你一个简单的脚本

这个脚本我可以搞定了

但是没有办法将字符孔的属性在SET_TABLE文件中将其自动设为STAGE 3(有SLOT孔时);没有SLOT孔时设为STAGE 2  IF语名好像不太可能实现这个功能

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

网站地图

Top