#!/bin/ksh ############################################################################### # # # Name: edgfx Version: 3 11/06/95 # # # ############################################################################### # # Written by: Tom Edwards email: trtome@trws # Sr. Delin. Phone: 498-6311 # Proj. Plans / ESC / Sacramento # # Description : # # allows user to run edg on multiple files by inputing search string. # The user picks among various common "fix" scenarios. # # # # Revisions : # - put in fourth option: change old iplot date stamp to zeh stamp. # Note: had to use edg command file "ztime.edg" to get it to work. # (9-18-95) # # - put in fith option: drop all text nodes to simple text. # to accomadate zeh plot's inability to process text nodes correctly # at this time. (This edg solution is from Bently Bros.) # (11-2-95) # # - sixth option: fix design file header # (11-6-95) # ############################################################################### # # Note: the "case" command did not work with "here" file labels so I used # if/then statements instead. ## # SEEDFILE="/ps1/pp/edghdr.dgn" ##--DEFINE SEED FILE IF NEEDED echo "--batch edg routine--" echo "" echo "WARNING! if you are not sure of results, please make backup of dgn files!" set -o noglob read -r SS?"enter Search String (no ext) >" SS="${SS}.dgn" echo $SS set +o noglob #--menu below---------------------- echo "enter choices below (combination of choices ok)" echo "" echo "(1) - change all view independent text,cells to view dependent" echo "(2) - change ft 43 text to proper wieght of 0" echo "(3) - change all construction elements to primary" echo "(4) - change iplot date/time stamp to zeh date/time stamp" echo "(5) - change all text nodes to simple text" echo "(6) - Replace design file header with new one" read -r OPT?"enter option number(s) here >" # #--process loop-------------------- # echo "----------------------edg log file----------------------">${HOME}/edg.log for FNAME in ${SS} do echo "processing ${FNAME}-------------------------------------------------------------" if [[ `echo ${OPT}|grep "1"` != "" ]] then echo "-Changing properties of text from vi to no_vi" /ustation/edg/edg.zzz ${FNAME} <>${HOME}/edg.log set search/type=text,cell set search/p_bits=view_ind mod p_bits=noview_ind whole exit !DONE1 fi if [[ `echo ${OPT}|grep "2"` != "" ]] then echo "-Changing weight of all font 43 text to wt=0" /ustation/edg/edg.zzz ${FNAME} <>${HOME}/edg.log set search/type=text set search/font=43 mod weight=0 whole exit !DONE2 fi if [[ `echo ${OPT}|grep "3"` != "" ]] then echo "-Changing All Construction elements to Primary" /ustation/edg/edg.zzz ${FNAME} <>${HOME}/edg.log set search/all set search/type=graphic set search/class=2 modify class=0 whole exit !DONE3 fi if [[ `echo ${OPT}|grep "4"` != "" ]] then echo "-Changing Iplot date/time stamp to Zeh stamp" #--line below uses a edg "command file" intead of a "here" file /ustation/edg/edg.zzz ${FNAME} @/admin/ps1/pp/macros/ztime.edg >> ${HOME}/edg.log fi if [[ `echo ${OPT}|grep "5"` != "" ]] then echo "-Changing Text Nodes to Simple Text" /ustation/edg/edg.zzz ${FNAME} <>${HOME}/edg.log set search/all set search/type=7 mod status=delete whole set nosearch set search/type=17 mod status=simple whole exit !DONE5 fi ################################################################################################### if [[ `echo ${OPT}|grep "6"` != "" ]] then FNAME2=`echo ${FNAME}|cut -d. -f1` ### - redefine FNAME ##echo "FNAME2 = ${FNAME2}" echo "-Replacing design file Header" mv ${FNAME2}.dgn ${FNAME2}.baddgn # #--"here" file "6" below-------------------------------------------- # /ustation/edg/edg.zzz ${SEEDFILE} <>${HOME}/edg.log open ./${FNAME2}.dgn edg ./${FNAME2}.baddgn patch wtf 0 automatic 5 save type next write rest close exit !DONE6 echo " new file created (orig file renamed to ${FNAME}.baddgn)" fi #################################################################################################### done echo "" echo "--processing complete--" echo "--see \"edg.log\" file in HOME directory for modifications performed"