Genesis2000脚本命令大全
genesis2000脚本(外挂接口)

开发语言: 以 Windows 系统为背景,Genflex Genesis2000 为载体,采用 Perl5.14 + Tkx 结合 PCB 工程 CAM 设计实际情况开发而成。 服务宗旨: 为 CAM 系统维护、脚本开发人员度身配置一套外挂系统环境,让您的精力更专注于 CAM 制作自动化功能的实现。 项目优势: 1、不工作时可最小化至系统托盘,或靠边隐藏。 2、无需绑定可自动获取当前工作 JOB、STEP。 3、外部执行方式操作 Genesis LMC,它是单独运行,不影响 Genesis 任何操作 4、完全用户自定义、自行配置厂内 CAM 作业流程,可以关联先前已有的所有程序, 在整个软件环境里可自己开发其他新的程序。 5、Script 运行结束后的状态图标会根据 script 运行结果而改变以此提醒用户。 6、实现 274X、Tgz、钻孔、Dxf 文件鼠标一键拖放读取
根据公司 CAM 实际情况将设计标 准化操作流程步骤配置到系统中, 并可实现流程步骤的动态调整
专为 PCB/FPC 量身定做的外挂系统!
个性设置: 可根据个人爱好在界面中设置不同的背景图
-----------------------------------------------------谢谢您的关注! -----------------------
《可自定义一套 CAM Guide 流程》 CAM Guide 是一套 CAM 自动化作 业系统工具,它依据不同 PCB 厂统 一的 CAM 作业流程定制的一个超强 大向导器,可以指导和帮助每一位 CAM 技术人员来完成一个料号的制 作。它又像是一个管理工具,它能够 有效记录每一个操作的结果和时间, 方便以后问题追踪和查询。
Genesis2000脚本编写常用命令剖析

1. switch 的用法,注意每一个case 必须要以breaksw 结尾 否则会继续执行下一个case 的命令(1) 另外,$< 的意思是取得使用者的stand input(2) echo 若加上-n 的选项,则游标会停留在该行最后echo -n "Input one color: "set STOPLIGHT = $<switch ($STOPLIGHT)case red:echo "red"breakswcase orange:echo "orange"breakswcase green:echo "green"breakswdefault:echo "you input $STOPLIGHT"endsw--------------------------------------------------------------------2. 利用set 来取得变数,set ABC = "I am ABC"也可以利用`command` 来取得命令且外,case 也可以用万用字元* 来代替set VER = `uname -r`switch ($VER)case 5.5:echo "run the setup of $VER"breakswcase 5.3:echo "run the setup of $VER"breakswcase 5.*:echo "like 5.x"breakswcase 4.*:echo "like 4.x"breakswdefault:echo "no idea"endsw--------------------------------------------------------------------3. if 的语法,比较数字set n1 = 1set n2 = 2if ($n1 == $n2) thenecho "$n1 Equal $n2"elseecho "$n1 Not Equal $n2"endif--------------------------------------------------------------------4. if 的语法,比较字串set n1 = abcdefset n2 = abcdeif ($n1 == $n2) thenecho "$n1 Equal $n2"elseecho "$n1 Not Equal $n2"endif--------------------------------------------------------------------5. if 的语法,比较相似的字串set n1 = abcdefset n2 = abcdeif ($n1 =~ $n2) thenecho "$n1 Like $n2"elseecho "$n1 Not Like $n2"endif--------------------------------------------------------------------6. if 的语法,比较数字的大小set n1 = 1set n2 = 2if ($n1 > $n2) thenecho "$n1 > $n2"elseendif--------------------------------------------------------------------7. 每分钟执行一次的程式# mm 等于当天时间的【分钟】数set mm = `date | cut -d' ' -f4 | cut -d: -f2`if ( -r $0.out ) thenrm $0.outtouch $0.outelsetouch $0.outendifwhile ( $mm <= 16 )set mm = `date | cut -d' ' -f4 | cut -d: -f2`echo "$mm now is `date`"sleep 60#echo "$mm now is `date`" >> $0.outendecho "Over" >> $0.out--------------------------------------------------------------------8. 一个回圈的范例,并且利用expr 去作加的动作回圈的语法如下:foreach number (1 2 3)echo $numberendset counter = 0while ($counter <= 10)echo "sleeping for 5 seconds"sleep 5counter = `expr $counter + 1 `end--------------------------------------------------------------------9. 设定一个用当天月份与日期作为档案名称的程式如今天是10/02 , 则$prefix 会等于该程式+ 1002set prefix = `basename $0``date '+ %m%d'`echo $0echo $prefix--------------------------------------------------------------------10. 移除在foreach 回圈内指定的档案内的font 字串foreach file ([b,e,g,h,s]*.html)echo -n "Processing $file, remove the line number `grep -n font $file`"# $log 表示这个$file 有几个font 字串set log = `grep -c font $file`if ( $log == '0' ) thenecho ", pass $file"else# 先找出该档案的第一次出现font 的行数,如果3,则$cmd = 3dset cmd = `grep -n font $file | cut -d: -f1 | head -1`d# 利用sed 去执行删除的动作,并把结果输出到${file}1sed $cmd $file > ${file}1# 如果${file}1 没有资料,则passingif ( -z ${file}1 ) thenecho " , ${file}1 is zero"elsecp ${file}1 $filerm {$file}1echo " , $file remove ok"endifendifend# 后来看过sed 的更进一步用法,发现先前写的太笨了,试试这个# sed /font/d $file > ${file}1# 一次OK, 我真是大笨蛋--------------------------------------------------------------------11. 功能:将指定的档案中,出现第一次【回】的那一行,加上<title> xxxx </title>foreach file (sky*.html)set filetitle = ftitle# 主要部份为sed 部份 s/^ *// 表示将该行第一个字元前的空白删除echo "<title>`grep 回$file | head -1 | sed -e 's/^ *//'`</title>" > $ftitle# 将刚刚那一行,再插回去head -1 $file > ${file}headsed 1d $file > ${file}1cat $ftitle >> ${file}headcat ${file}1 >> ${file}headcp ${file}head $filerm ${file}1rm $ftitlerm ${file}headecho "$file ok"end--------------------------------------------------------------------12. 一个实际建立一个ftp server 的程式 里面包括许多应用,相当有参考价值( 未完成)set path = ( /usr/bin /usr/sbin )#set true = `grep -c ftp /etc/passwd`if ( $true == 0 ) thenecho "no ftp user in your system"echo -n "do you want to create the ftp user? "set answer = $<if ($answer == 'y' || $answer == 'Y') thenset maxid = `sort /etc/passwd | tail -1 | cut -d: -f3`echo $maxidset newid = `expr $maxid + 1`echo $newidecho "/usr/sbin/useradd -d /home1/ftp -u $newid -s /etc/false ftp"endifelseecho "Good. Your system already has the ftp user. "set ftphome = `grep ftp: /etc/passwd | cut -d: -f6`echo $ftphomeendifif ( -z $ftphome ) thenecho "ftphome must be non-null"exit 2endifif ( $ftphome == "/usr" || $ftphome == "/" ) thenecho "ftphome can't be / or /usr"exit 2endif# create the ftp home directoryif ( ! -d $ftphome ) thenecho "mkdir $ftphome"endifecho "Setting up the ftphome for SunOS `uname -r`"if ( ! -d $ftphome ) thenecho "mkdir -p $ftphome/usr/bin"endifcp /bin/ls $ftphome/usr/binchmod 111 $ftphome/usr/bin/lschown root $ftphome/usr/binchmod 555 $ftphome/usr/binif ( -r $ftphome/bin ) thenmv -f $ftphome/bin $ftphome/Obinendifln -s usr/bin $ftphome--------------------------------------------------------------------13. 取得该使用者的UIDif ( $#argv == 0 ) thenecho "$0 usage: $1 username"exit 2endifset uid = `grep $1 /etc/passwd | cut -d: -f3`echo $uid--------------------------------------------------------------------14. 将指定档案内的html 取代成htmforeach file ( *.html )echo "Processing $file ..."sed s/html/htm/ $file > ${file}1cp ${file}1 $filerm ${file}1end--------------------------------------------------------------------15. 一个简简单单的范例,看看就好#!/bin/csh -fecho .................echo WELCOME to \* TAPE COPY \*echo .................echo Enter your name:# $< can read from stand inputset name = $<echo " "echo Hi $name \!set D = `date`echo Today\'s date is $D[1] $D[2] $D[3]if ($D[1] == Mon) thenecho -------------------------------------------------------------echo Today is $D[1]day $name, it\'s time to copy your directorys\! echo -------------------------------------------------------------elseecho -------------------------------------------------------------echo Today is $D[1]day $name, no tape copies today\!echo -------------------------------------------------------------endif--------------------------------------------------------------------16. 一个finger 的程式set FINGER = "/usr/ucb/finger"if ( -x $FINGER ) thenif ( $#argv == 0 ) thencat << TAG---------------------------------Hahahah ....---------------------------------TAGelse$FINGER "$*"endifelseecho "Cannot find finger on this system."endif--------------------------------------------------------------------17. 取得变数的方法set W = `who -r`echo $W[9]--------------------------------------------------------------------18. 更改档案名称,将*.html --> *.htm# rename *.html to *.htmecho -n "This will change *.html to *.htm. Can I continue ? (y/n) : " set input = $<if ( $input != "y" && $input != "Y" ) thenecho "Ok. Quit..."exit 2endifforeach file ( *.html )echo "Processing $file to `basename $file .html`.htm "mv $file `basename $file .html`.htmend--------------------------------------------------------------------19. 更改档案名称,将*.htm --> *.htmlecho -n "This will change *.htm to *.html. Can I continue ? (y/n) : " set input = $<if ( $input != "y" && $input != "Y" ) thenecho "Ok. Quit..."exit 2endif# rename *.htm to *.htmlforeach file ( *.htm )echo "Processing $file to `basename $file .htm`.html " mv $file `basename $file .htm`.htmlend--------------------------------------------------------------------20. 将大写的档名改成小写的档名tr string1 string2 会将standard input 的字串,所对应到的string1, 都以string2 取代foreach file ( * )mv $file `echo $file | tr '[A-Z]' '[a-z]'`end--------------------------------------------------------------------21. 将小写的档名改成大写的档名foreach file (*)mv $file `echo $file | tr '[a-z]' '[A-Z]'`end</P< p>。
Genesis2000脚本编写常用命令解析

1. switch 的用法,注意每一个case 必须要以breaksw 结尾否则会继续执行下一个case 的命令(1) 另外,$< 的意思是取得使用者的stand input(2) echo 若加上-n 的选项,则游标会停留在该行最后echo -n "Input one color: "set STOPLIGHT = $<switch ($STOPLIGHT)case red:echo "red"breakswcase orange:echo "orange"breakswcase green:echo "green"breakswdefault:echo "you input $STOPLIGHT"endsw--------------------------------------------------------------------2. 利用set 来取得变数,set ABC = "I am ABC"也可以利用`command` 来取得命令且外,case 也可以用万用字元* 来代替set VER = `uname -r`switch ($VER)case 5.5:echo "run the setup of $VER"breakswcase 5.3:echo "run the setup of $VER"breakswcase 5.*:echo "like 5.x"breakswcase 4.*:echo "like 4.x"breakswdefault:echo "no idea"endsw-------------------------------------------------------------------- 3. if 的语法,比较数字set n1 = 1set n2 = 2if ($n1 == $n2) thenecho "$n1 Equal $n2"elseecho "$n1 Not Equal $n2"endif-------------------------------------------------------------------- 4. if 的语法,比较字串set n1 = abcdefset n2 = abcdeif ($n1 == $n2) thenecho "$n1 Equal $n2"elseecho "$n1 Not Equal $n2"endif-------------------------------------------------------------------- 5. if 的语法,比较相似的字串set n1 = abcdefset n2 = abcdeif ($n1 =~ $n2) thenecho "$n1 Like $n2"elseecho "$n1 Not Like $n2"endif-------------------------------------------------------------------- 6. if 的语法,比较数字的大小set n1 = 1set n2 = 2if ($n1 > $n2) thenecho "$n1 > $n2"elseecho "$n1 < $n2"endif-------------------------------------------------------------------- 7. 每分钟执行一次的程式# mm 等于当天时间的【分钟】数set mm = `date | cut -d' ' -f4 | cut -d: -f2`if ( -r $0.out ) thenrm $0.outtouch $0.outelsetouch $0.outendifwhile ( $mm <= 16 )set mm = `date | cut -d' ' -f4 | cut -d: -f2`echo "$mm now is `date`"sleep 60#echo "$mm now is `date`" >> $0.outendecho "Over" >> $0.out-------------------------------------------------------------------- 8. 一个回圈的范例,并且利用expr 去作加的动作回圈的语法如下:foreach number (1 2 3)echo $numberendset counter = 0while ($counter <= 10)echo "sleeping for 5 seconds"sleep 5counter = `expr $counter + 1 `end-------------------------------------------------------------------- 9. 设定一个用当天月份与日期作为档案名称的程式如今天是10/02 , 则$prefix 会等于该程式+ 1002date.csh1002set prefix = `basename $0``date '+ %m%d'`echo $0echo $prefix--------------------------------------------------------------------10. 移除在foreach 回圈内指定的档案内的font 字串foreach file ([b,e,g,h,s]*.html)echo -n "Processing $file, remove the line number `grep -n font $file`"# $log 表示这个$file 有几个font 字串set log = `grep -c font $file`if ( $log == '0' ) thenecho ", pass $file"else# 先找出该档案的第一次出现font 的行数,如果3,则$cmd = 3dset cmd = `grep -n font $file | cut -d: -f1 | head -1`d# 利用sed 去执行删除的动作,并把结果输出到${file}1sed $cmd $file > ${file}1# 如果${file}1 没有资料,则passingif ( -z ${file}1 ) thenecho " , ${file}1 is zero"elsecp ${file}1 $filerm {$file}1echo " , $file remove ok"endifendifend# 后来看过sed 的更进一步用法,发现先前写的太笨了,试试这个# sed /font/d $file > ${file}1# 一次OK, 我真是大笨蛋--------------------------------------------------------------------11. 功能:将指定的档案中,出现第一次【回】的那一行,加上<title> xxxx </title>foreach file (sky*.html)set filetitle = ftitle# 主要部份为sed 部份s/^ *// 表示将该行第一个字元前的空白删除echo "<title>`grep 回$file | head -1 | sed -e 's/^ *//'`</title>" > $ftitle# 将刚刚那一行,再插回去head -1 $file > ${file}headsed 1d $file > ${file}1cat $ftitle >> ${file}headcat ${file}1 >> ${file}headcp ${file}head $filerm ${file}1rm $ftitlerm ${file}headecho "$file ok"end--------------------------------------------------------------------12. 一个实际建立一个ftp server 的程式里面包括许多应用,相当有参考价值( 未完成)set path = ( /usr/bin /usr/sbin )#set true = `grep -c ftp /etc/passwd`if ( $true == 0 ) thenecho "no ftp user in your system"echo -n "do you want to create the ftp user? "set answer = $<if ($answer == 'y' || $answer == 'Y') thenset maxid = `sort /etc/passwd | tail -1 | cut -d: -f3`echo $maxidset newid = `expr $maxid + 1`echo $newidecho "/usr/sbin/useradd -d /home1/ftp -u $newid -s /etc/false ftp"endifelseecho "Good. Your system already has the ftp user. "set ftphome = `grep ftp: /etc/passwd | cut -d: -f6`echo $ftphomeendifif ( -z $ftphome ) thenecho "ftphome must be non-null"exit 2endifif ( $ftphome == "/usr" || $ftphome == "/" ) then echo "ftphome can't be / or /usr"exit 2endif# create the ftp home directoryif ( ! -d $ftphome ) thenecho "mkdir $ftphome"endifecho "Setting up the ftphome for SunOS `uname -r`"if ( ! -d $ftphome ) thenecho "mkdir -p $ftphome/usr/bin"endifcp /bin/ls $ftphome/usr/binchmod 111 $ftphome/usr/bin/lschown root $ftphome/usr/binchmod 555 $ftphome/usr/binif ( -r $ftphome/bin ) thenmv -f $ftphome/bin $ftphome/Obinendifln -s usr/bin $ftphome-------------------------------------------------------------------- 13. 取得该使用者的UIDif ( $#argv == 0 ) thenecho "$0 usage: $1 username"exit 2endifset uid = `grep $1 /etc/passwd | cut -d: -f3`echo $uid-------------------------------------------------------------------- 14. 将指定档案内的html 取代成htmforeach file ( *.html )echo "Processing $file ..."sed s/html/htm/ $file > ${file}1cp ${file}1 $filerm ${file}1end--------------------------------------------------------------------15. 一个简简单单的范例,看看就好#!/bin/csh -fecho .................echo WELCOME to \* TAPE COPY \*echo .................echo Enter your name:# $< can read from stand inputset name = $<echo " "echo Hi $name \!set D = `date`echo Today\'s date is $D[1] $D[2] $D[3]if ($D[1] == Mon) thenecho -------------------------------------------------------------echo Today is $D[1]day $name, it\'s time to copy your directorys\!echo -------------------------------------------------------------elseecho -------------------------------------------------------------echo Today is $D[1]day $name, no tape copies today\!echo -------------------------------------------------------------endif--------------------------------------------------------------------16. 一个finger 的程式set FINGER = "/usr/ucb/finger"if ( -x $FINGER ) thenif ( $#argv == 0 ) thencat << TAG---------------------------------Hahahah ....---------------------------------TAGelse$FINGER "$*"endifelseecho "Cannot find finger on this system."endif--------------------------------------------------------------------17. 取得变数的方法set W = `who -r`echo $W[9]--------------------------------------------------------------------18. 更改档案名称,将*.html --> *.htm# rename *.html to *.htmecho -n "This will change *.html to *.htm. Can I continue ? (y/n) : " set input = $<if ( $input != "y" && $input != "Y" ) thenecho "Ok. Quit..."exit 2endifforeach file ( *.html )echo "Processing $file to `basename $file .html`.htm "mv $file `basename $file .html`.htmend--------------------------------------------------------------------19. 更改档案名称,将*.htm --> *.htmlecho -n "This will change *.htm to *.html. Can I continue ? (y/n) : " set input = $<if ( $input != "y" && $input != "Y" ) thenecho "Ok. Quit..."exit 2endif# rename *.htm to *.htmlforeach file ( *.htm )echo "Processing $file to `basename $file .htm`.html "mv $file `basename $file .htm`.htmlend-------------------------------------------------------------------- 20. 将大写的档名改成小写的档名tr string1 string2 会将standard input 的字串,所对应到的string1, 都以string2 取代foreach file ( * )mv $file `echo $file | tr '[A-Z]' '[a-z]'`end-------------------------------------------------------------------- 21. 将小写的档名改成大写的档名foreach file (*)mv $file `echo $file | tr '[a-z]' '[A-Z]'`end</P< p>。
Genesis2000 Script 脚本编程1

在unix系统中,像在DOS中的batch一样,你可以把一系列命令输入到一个叫做script的文件中. 利用source命令或者设置这个文件的x(可运行)属性并直接键入该文件名, 就像用一个命令那样, 你就可以让 C shell 从文件中读入命令并执行它们.
if ( expression ) command
if ( expression )
command
# ""(backslash)后面只能接newline(回车即可), 不能有任何其他字符载
# 单个命令command不能包括"|", "&" 以及";". 也不能使用其它控制语句
不能使用下面的格式
对其他变量, 也不会发生"下标溢出"的错误, 例如:
当(n > $#var) 时, $var[n-]不给任何结果和错误信息. 而$var[m-n]给出$var[m]到$var[$#var]的words.如果(m > $#var) 则没有任何结果
2.文件操作格式
-操作符 filename
-e 文件存在返回1(.true.), 否则返回0(.false
#!/bin/csh
set ai=1
while ( $ai <= 10 )
echo the ${ai}th time running.
@ ai++
end
4. 开关控制 switchfans
语法为:
switch ( $word )
case str_1:
你可以对路径名进行操作, 以便于去掉你不需要的部分
genesis 2000 自动化阻抗制作脚本使用说明

自动化阻抗制作脚本使用说明1,脚本运行环境:WINDOWS 操作系统,GENESIS8.2、GENESIS9.1、GENESIS9.2、GENESIS9.8 2,制作阻抗测试条种类。
差动阻抗(DF),特性阻抗(SE)。
3,程式运行界面和介绍。
阻抗信息显示区。
A,阻抗信息录入,首先阻搞信息,请确定录入阻抗是的状态,如果状态不对,参考资料将保证是正B.TopRefLayer : 阻抗顶层,即顶层C.BotRefLayer: 阻抗不,测试阻抗条底层。
D.ArtWorkLine :工作稿线宽。
E.ArtWorkSpacing :工作稿线距。
F.SafeCopperSpacing:阻抗线线距铜皮距离。
G.SafeCopperWidthMin:保护铜皮最小宽度。
H.Imp:阻抗值(注:此参数仅添加文字标注时用)。
I.ImpTol:阻抗公差(注:此参数仅添加文字标注时用)。
J.阻抗条宽:测试条宽度。
K.阻抗条长:阻抗条长度。
L.阻抗定位孔:阻抗定位孔左右各一个(左右距板边各1.5MM,上下居阻抗条宽中心)。
M.阻抗测试孔:阻抗测试孔大小为1.00mm。
单组阻抗信息:New:选项:新增阻抗,点击《添加阻抗参数》为新增一组阻抗值。
View选项:点击《添加阻抗参数》,自动计算阻抗组数和添加阻抗条数量,以及查看当Order组数的详细信息。
Edit选项:双击阻抗信息显示区对应ORDER对应组数如下,刚才当前为View,修改时点选EDIT,修改当前组抗条的参数,再选《添加阻抗参数》执行编辑。
所有阻抗参数添加OK后,执行《添加阻抗条》。
结果如下:。
genesis2000脚本GUI界面编写

genesis2000脚本GUI界面编写下面就是Genesis的GUI的demo程序,从里面可以学到几乎全部的GUI的功能了.前面的变量设定的部份省略不讲,大家可以参考Shell编程#!/bin/csh# This script is for GUI demo.############################################################## ####################alias gui '${GENESIS_DIR}/e${GENESIS_VER}/all/gui'alias gui_out 'echo !:* >> $GuiDefFile'alias gui_lst 'cat !:* >> $GuiDefFile'alias dogui 'gui < $GuiDefFile > $GuiDatFile; source $GuiDatFile; rm -f $GuiDefFile $GuiDatFile'if ($?GENESIS_TMP) thenset TMP = $GENESIS_TMPelse if ($?GENESIS_DIR) thenset TMP = $GENESIS_DIR/tmpelseset TMP = /genesis/tmpendif# Set gui parametersset GuiDefFile = $TMP/GuiDefFile.$$set GuiDatFile = $TMP/GuiDatFile.$$# Set fonts for gui #设定字体前三码表示字体格式,后两码数字表示大小#格式三码h 表字型(可选t) b表字宽粗体(bold)(可选m,细体) r表字正(可选i 表斜体)set TitleFont = hbr18set NormFont = hbr14set HintFont = hbi14# Set colors for gui #颜色是用RGB的型式表示,可以用Genesis中OPTION下COLOR功能来选自己喜欢的,#然后设定到GUI中去每一种颜色用两位数字表示99表示最深00表示最浅依次为R-red G-Green B-Blueset RedColor = 990000set WhiteColor = 999999set TitleColor = 772288set NormColor = 222299############################################################## #set job_list = `dbutil list jobs | awk '{print $1}'`gui_out WIN 200 200 #确定GUI窗口左上角在屏幕中的位置gui_out BG $WhiteColor #BG background背景颜色gui_out LABEL @/tmp/orblogo.xbm #添加标签(可以是一串字符,也可以是一个XPM格式图片我们在#后面会讨论如果制作这种图片,在6.如何加入中文里有说明)gui_out BG $TitleColorgui_out FG $WhiteColor #FG font ground字体颜色gui_out LABEL GUI Demogui_out BG $NormColorgui_out TEXT user_name User name : #TEXT文字输入窗口,并将值传给user_name变量, 显示”User name”gui_out DTEXT user_name Beyond Li #设定文字窗口的初始值Default TEXT=>DTEXT, 初始为Beyond Ligui_out BW 3 #BW 区隔线宽BOLD Width 设为3gui_out FORM #表格开始gui_out LABEL 'Select Job -->'gui_out LIST StepJob 5 S 1 #LIST列表选择功能StepJob为变量5表示显示5行S表示单选#多选为M, 1表示显示时从第1个项目开始显示foreach JobName ($job_list) #这里将除了genesislib以外的所有料号名都显示于LIST列表中if ($JobName != "genesislib") thengui_out $JobName #列表的内容endifendgui_out END #LIST功能结束(LIST传回的值为具体的列表中的值)gui_out ENDFORM #表格结束gui_out BW 1gui_out OPTION pnl_size Panel size: #OPTION下拉选项功能pnl_size 为变量显示”Panel size”gui_out 16x18 #选项的内容gui_out 18x24gui_out 20x24gui_out END #选项功能结束(OPTION传回的值为项目内容具体的值如16x18等)gui_out RADIO sel_pnl 'Panel name method:' H 1 $RedColor #RADIO点选功能变量为sel_p nl “’ . ’”为显示内容#H表示水平显示1表示一栏来显示最后是颜色gui_out Default #供点选的内容gui_out Keyingui_out END #点选功能结束gui_out FORM sel_pnl 2 #表格开始注意到后面有变量sel_pnl 2表示当sel_pnl选2时表格#才显现出来否则将以阴影不可编辑或选择的方式来显示gui_out TEXT pnl_name Panel name:gui_out ENDFORMgui_out CLABEL OK #按钮功能显示”OK”gui_out END #功能结束dogui #将这些传到GUI的程序中,它就会生成我们要的GUI界面.笔者通常在GUI最后,dogui之前加入一个RADIO让人员可以选择是否退出如下gui_out RADIO Exit_Chk 'Exit:' H 1 $RedColor #RADIO点选功能变量为sel_pnl “’ . ’”为显示内容#H表示水平显示1表示一栏来显示最后是颜色gui_out No #供点选的内容gui_out Yesgui_out END #点选功能结束在dogui后紧接着就设置检查if ( $Exit_Chk == 2 ) thenexit 0endif这样就可随时推出目前的GUI画面.其它的应用大家就要思考自己的工作要求,然后将这些功能灵活使用了.。
Genesis2000各大菜单的介绍

②Electrical Test Manager测试电源管理器( Ctrl+T)
Out put:输出文档
Message:信号
View Log:查看记录
Auto drill manage:输出钻带管理器
Auto rout manage:输出锣带管理器Aoi:测试光学点( Ctrl+G)
Panelization Wizard:排版精灵Panelization Setup:排版设置Sharelist:分析列表ODB++ Messenge:r奥宝使用者Quote Sunmdry:立刻提供ERF editor:编辑ERF档
Options选项
Users:用户
Groups:群
Configuration:组
料号内菜单
Go up:向上Matrix:特性表Steps:文件Symbols: D码库
Stackups:叠板Wheels: D码学习器Forms:表单Flows:流程Attribates:属性Input:导入Output:输出User:用户Extension:贮存资料档案导入资料
Actions(行动菜单)–Input–Path:(找资料路径)–Job:(生产料号)-Identify(读入资料格式) - Translate(执行转换)–Editor(进入编辑) Job(料号):
Create shapelist:产生形状列表Delete shapelist:删除形状列表工作界面左下角
第一个坐标:
绝对坐标(白色)。相对/任意坐标(黑色) 第二个坐标
圆弧坐标。相对/任意坐标(黑色)
第三个坐标
中心坐标:
genesis2000个人操作总结及其它软件程序转换

文件分层后标示:板内:字符(SILK_SCREEN)开窗(SOLDER_MASK)线路(SIGNAL)板外:无需理会Genesis操作快捷键:孔编辑(指复制到钻层的圆圈):1、Alt+E+E+C(填充)2、Alt+E+E+F(打散)3、DFM+Cleanup+Ref(转Pad)Alt+E+B+O:复制后文件旋转Alt+E+E+S:改线宽Alt+O:修边框Alt+E+G+D:加内D块转线框:1、Alt+E+E+O(转块在转线)注:先将线放大在转块,在缩回原样在转线2、Alt+E+E+Surface to Outline(转线)Alt+E++R+P:外形加白线Alt+S+P+C:白线画外形Alt+E+Z+G:图形扩大(图形线扩大)Alt+T:图像放大Alt+E+Z+P:边框扩大(主要用于开窗)Alt+E+C+S:手动拼板Alt+E+M+P:线整体伸缩Alt+E+P+P或N:目标正负层更换Alt+P+E 点Unselect(反选)全局反选:选中目标 Alt+A+EAlt+E+G+S 点stagnant line:first(平均线) Alt+E+E+O (转整体) 注:将正负层阴影部份合并Ctrl+X:移动Ctrl+R:加列 Ctrl+U:加行Alt+E+E+P(铜转PAD)导出文件:(Alt+A+O)开窗层、线路层、字符层转出格式:单位:英制(Inch)MORE:钻孔转出格式:单位:公制(mm)MORE:孔环复制扩充尺寸:孔层复制到线路层淘空:1:1500倍孔层复制到开窗层:1:500倍十字架转圆环:Alt+E+E+U(十字架转圆环)+捉中心点Alt+E+E+U选Mode:Select(选同一类型)拼板步骤:Alt+S+L+T+A:自动拼板AltS+P+C:加边框点击标示层+右键Flatten(打散):标示线到拼板层拼板边框填充:点击填充层(或区域)+右键Fill profile模组板编辑铜皮层:1.将铜片从线路层中移开(新建层1)。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Genesis2000脚本命令大全1.switch的用法,注意每一个case必须要以breaksw结尾否则会继续执行下一个case的命令(1)另外,$<的意思是取得使用者的stand input(2)echo若加上-n的选项,则游标会停留在该行最后echo-n"Input one color:"set STOPLIGHT=$<switch($STOPLIGHT)case red:echo"red"breakswcase orange:echo"orange"breakswcase green:echo"green"breakswdefault:echo"you input$STOPLIGHT"endsw--------------------------------------------------------------------2.利用set来取得变数,set ABC="I am ABC"也可以利用`command`来取得命令且外,case也可以用万用字元*来代替set VER=`uname-r`switch($VER)case5.5:echo"run the setup of$VER"breakswcase5.3:echo"run the setup of$VER"breakswcase5.*:echo"like5.x"breakswcase4.*:echo"like4.x"breakswdefault:echo"no idea"endsw--------------------------------------------------------------------3.if的语法,比较数字set n1=1set n2=2if($n1==$n2)thenecho"$n1Equal$n2"elseecho"$n1Not Equal$n2"endif--------------------------------------------------------------------4.if的语法,比较字串set n1=abcdefset n2=abcdeif($n1==$n2)thenecho"$n1Equal$n2"elseecho"$n1Not Equal$n2"--------------------------------------------------------------------5.if的语法,比较相似的字串set n1=abcdefset n2=abcdeif($n1=~$n2)thenecho"$n1Like$n2"elseecho"$n1Not Like$n2"endif--------------------------------------------------------------------6.if的语法,比较数字的大小set n1=1set n2=2if($n1>$n2)thenecho"$n1>$n2"echo"$n1<$n2"endif--------------------------------------------------------------------7.每分钟执行一次的程式#mm等于当天时间的【分钟】数set mm=`date|cut-d''-f4|cut-d:-f2`if(-r$0.out)thenrm$0.outtouch$0.outelsetouch$0.outendifwhile($mm<=16)set mm=`date|cut-d''-f4|cut-d:-f2`echo"$mm now is`date`"sleep60#echo"$mm now is`date`">>$0.outendecho"Over">>$0.out--------------------------------------------------------------------8.一个回圈的范例,并且利用expr去作加的动作回圈的语法如下:foreach number(123)echo$numberendset counter=0while($counter<=10)echo"sleeping for5seconds"sleep5counter=`expr$counter+1`end--------------------------------------------------------------------9.设定一个用当天月份与日期作为档案名称的程式如今天是10/02,则$prefix会等于该程式+1002date.csh1002set prefix=`basename$0``date'+%m%d'`echo$0echo$prefix--------------------------------------------------------------------10.移除在foreach回圈内指定的档案内的font字串foreach file([b,e,g,h,s]*.html)echo-n"Processing$file,remove the line number`grep-n font $file`"#$log表示这个$file有几个font字串set log=`grep-c font$file`if($log=='0')thenecho",pass$file"else#先找出该档案的第一次出现font的行数,如果3,则$cmd=3dset cmd=`grep-n font$file|cut-d:-f1|head-1`d#利用sed去执行删除的动作,并把结果输出到${file}1sed$cmd$file>${file}1#如果${file}1没有资料,则passingif(-z${file}1)thenecho",${file}1is zero"elsecp${file}1$filerm{$file}1echo",$file remove ok"endifendifend#后来看过sed的更进一步用法,发现先前写的太笨了,试试这个#sed/font/d$file>${file}1#一次OK,我真是大笨蛋--------------------------------------------------------------------11.功能:将指定的档案中,出现第一次【回】的那一行,加上<ti tle>xxxx</title>foreach file(sky*.html)set filetitle=ftitle#主要部份为sed部份s/^*//表示将该行第一个字元前的空白删除echo"<title>`grep回$file|head-1|sed-e's/^*//'`</tit le>">$ftitle#将刚刚那一行,再插回去head-1$file>${file}headsed1d$file>${file}1cat$ftitle>>${file}headcat${file}1>>${file}headcp${file}head$filerm${file}1rm$ftitlerm${file}headecho"$file ok"end--------------------------------------------------------------------12.一个实际建立一个ftp server的程式里面包括许多应用,相当有参考价值(未完成)set path=(/usr/bin/usr/sbin)#set true=`grep-c ftp/etc/passwd`if($true==0)thenecho"no ftp user in your system"echo-n"do you want to create the ftp user?"set answer=$<if($answer=='y'||$answer=='Y')thenset maxid=`sort/etc/passwd|tail-1|cut-d:-f3`echo$maxidset newid=`expr$maxid+1`echo$newidecho"/usr/sbin/useradd-d/home1/ftp-u$newid-s/etc/false ftp"endifelseecho"Good.Your system already has the ftp user."set ftphome=`grep ftp:/etc/passwd|cut-d:-f6`echo$ftphomeendifif(-z$ftphome)thenecho"ftphome must be non-null"exit2endifif($ftphome=="/usr"||$ftphome=="/")then echo"ftphome can't be/or/usr"exit2endif#create the ftp home directoryif(!-d$ftphome)thenecho"mkdir$ftphome"endifecho"Setting up the ftphome for SunOS`uname-r`"if(!-d$ftphome)thenecho"mkdir-p$ftphome/usr/bin"endifcp/bin/ls$ftphome/usr/binchmod111$ftphome/usr/bin/lschown root$ftphome/usr/binchmod555$ftphome/usr/binif(-r$ftphome/bin)thenmv-f$ftphome/bin$ftphome/Obinendifln-s usr/bin$ftphome--------------------------------------------------------------------13.取得该使用者的UIDif($#argv==0)thenecho"$0usage:$1username"exit2endifset uid=`grep$1/etc/passwd|cut-d:-f3`echo$uid--------------------------------------------------------------------14.将指定档案内的html取代成htmforeach file(*.html)echo"Processing$file..."sed s/html/htm/$file>${file}1cp${file}1$filerm${file}1end--------------------------------------------------------------------15.一个简简单单的范例,看看就好#!/bin/csh-f echo.................echo WELCOME to\*TAPE COPY\* echo.................echo Enter your name:#$<can read from stand inputset name=$<echo""echo Hi$name\!set D=`date`echo Today\'s date is$D[1]$D[2]$D[3]if($D[1]==Mon)thenecho-------------------------------------------------------------echo Today is$D[1]day$name,it\'s time to copy your director ys\!echo-------------------------------------------------------------elseecho-------------------------------------------------------------echo Today is$D[1]day$name,no tape copies today\!echo-------------------------------------------------------------endif--------------------------------------------------------------------16.一个finger的程式set FINGER="/usr/ucb/finger"if(-x$FINGER)thenif($#argv==0)thencat<<TAG---------------------------------Hahahah....---------------------------------TAGelse$FINGER"$*"endifelseecho"Cannot find finger on this system."endif--------------------------------------------------------------------17.取得变数的方法set W=`who-r`echo$W[9]--------------------------------------------------------------------18.更改档案名称,将*.html-->*.htm#rename*.html to*.htmecho-n"This will change*.html to*.htm.Can I continue?(y/n): "set input=$<if($input!="y"&&$input!="Y")thenecho"Ok.Quit..."exit2endifforeach file(*.html)echo"Processing$file to`basename$file.html`.htm"mv$file`basename$file.html`.htmend--------------------------------------------------------------------19.更改档案名称,将*.htm-->*.htmlecho-n"This will change*.htm to*.html.Can I continue?(y/n): "set input=$<if($input!="y"&&$input!="Y")thenecho"Ok.Quit..."exit2endif#rename*.htm to*.htmlforeach file(*.htm)echo"Processing$file to`basename$file.htm`.html"mv$file`basename$file.htm`.htmlend--------------------------------------------------------------------20.将大写的档名改成小写的档名tr string1string2会将standard input的字串,所对应到的string1,都以string2取代foreach file(*)mv$file`echo$file|tr'[A-Z]''[a-z]'`end--------------------------------------------------------------------21.将小写的档名改成大写的档名foreach file(*)mv$file`echo$file|tr'[a-z]''[A-Z]'`end。