微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > PCB设计问答 > Genesis学习交流 > save_job.post设置求助!

save_job.post设置求助!

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

#!/bin/csh
if ($JOB == genesislib) then
else
touch /gen_db/odb1/jobs/$JOB/user/save.log
COM get_user_name
set hostname = `hostname`
set user_name = "$COMANS"
set time_in = `date`
echo "$user_name saved $JOB on $time_in on $hostname">> /genesis/fw/jobs/$JOB/user/save.log
endif

如何添加变量才能保存出现修改过的STEP和LAYER的信息?

顶起来!1

顶起来!1

#!/bin/csh
# File Name:    save_job.pre
# File Purpose: This is a line hook . The file is a c-shell script which is called when
#               the command line "COM save_job" is actioned. This file will be run
#               before the command line is executed (note the .pre in the name).
# Written by:   Ian Ticehurst (Autom8 Ltd.)
# Version 1A.:  Date: 04.12.00 - Initial design and development.
# Version 1B.:  Date: 05.12.00 - Removal of "gui" alias and "gui" data and response settings (not used).
############################# Start of notes ###############################
# This file is an example line hook. It is designed to be called when the command line
# "COM save_job" is actioned. Note that in order to run it must be named "save_job.pre".
# It will be run before the job save command. This example removes any "+++" layers (DFM
# modification back-up layers) when a save job is actioned.
# The script has any command line parameters passed to it as an array ($lnPARAM) and any
# values passed to it as an array ($lnVAL).
# As with any (".pre") line hook, if the main command is to be skipped this can be done by
# EITHER using the command line "skip_current_command" OR exit the program with a non-zero
# status (this method causes an error to be shown).
############################# End of notes ###############################
# Define correct temp. dir. depending on env. vars.
if ($?GENESIS_TMP) then
        set TMP = $GENESIS_TMP
else if ($?GENESIS_DIR) then
        set TMP = $GENESIS_DIR/tmp
else
        set TMP = /genesis/tmp
endif
# Delete any "+++" layers that exist in the matrix.
DO_INFO -t matrix -e $JOB/matrix
foreach LAYER ($gROWname)
        set TST = `echo "$LAYER" | grep -c +++`
        if ($TST != 0) then
                COM delete_layer,layer=$LAYER
        endif
end
abort:
exit 0
############################ END OF PROGRAM #####################

end
source $GENESIS_DIR/sys/hooks/line_hooks/drl_list
abort:
exit 0
############################ END OF PROGRAM #####################

目的是知道谁在哪台电脑修改了什么东西啊,修改了哪个料号,哪个STEP里面的哪一层这样的

顶起来,麻烦高手来解决

顶起来,麻烦高手来解决

用DO_INFO -t job -e $JOB -d CHANGES可以得到修改的内容,但是有很多多余的信息,你得自己用程序处理一下,取你想要的东西。

我现在改为直接从Genesis的log文件内提取相关信息

同意楼上的说法,它就是把保存前的help调用了下

set tmp_file = "/tmp/job-change.$$"
COM info,args=-t job -e $JOB -d CHANGES,out_file=$tmp_file,write_mode=replace,units=inch
set odb = `dbutil list jobs $JOB | awk '{print $4}'`
set date = `date`
COM get_user_name
set user = $COMANS
set job_path = `dbutil path jobs $JOB`
echo "# [$user] on $date ----- JobJOB saved jobs log ----- " >> $job_path/user/save.report
cat $tmp_file | sed -n '/Modified Entities/,/Deleted Entities/p' | sed '/Deleted Entities/d' >> $job_path/user/save.report
echo "-------------------------------------------------------------------------------------------" >> $job_path/user/save.report
rm -fr $tmp_file

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

网站地图

Top