Hi Folks,
OK - Track Masters - need a pointer here.
First issue - I was juggling some track around and the shape vanished - probably accidently flung to some far corner of the route - yet the track database entry remains and I inadvertently saved it. How do I remove this errant piece of track and db entry ? I turned off the terrain and water - searched high and low and I can't find the shape.
Image1.jpg
On the Gantry removal issue - noticed Route Riter had the function and even though it's only one item at a time - it doesn't appear to work.
I'm not a real programmer but I did stay in a Holiday Inn Express last night - so I know a little ksh/csh scripting and successfully scripted the same. Although it took me an evening - so much faster and less tedious than doing it by hand. The code is for anyone interested - it does show you how to compress and uncompress world tiles by hand just using TSUTILS.
Code:
#!/bin/bash
declaration () {
#ROUTE="Tristate_Rails 3-1-13"
ROUTE="L&HR_1940_DEV"
TEMP="${HOME}/tmp"
DOSTEMP="h:\cygwin64\home\N63503\tmp"
LOG=${TEMP}/mooterlog.txt
MSTSPATH="/cygdrive/e/MSTSmini/L&HR/Train Simulator"
DOSMSTSPATH="E:\MSTSmini\L&HR\Train Simulator"
WORKDIR="/home/N63503/HOLD"
DOSWORKDIR="h:\cygwin64\home\N63503\HOLD"
TEXT2UNI="/cygdrive/e/MSTSmini/Train Simulator/UTILS/txt2uni.exe"
TILES="${MSTSPATH}/Routes/${ROUTE}/Tiles"
WORLD="${MSTSPATH}/Routes/${ROUTE}/World"
DOSTILES="${DOSMSTSPATH}\Routes\\${ROUTE}\Tiles"
DOSWORLD="${DOSMSTSPATH}\Routes\\${ROUTE}\World"
}
cleanup() {
rm ${LLISTUSED} 2>/dev/null
rm ${LLISTTEXT} 2>/dev/null
rm ${LLISTDELT} 2>/dev/null
cd "${WORKDIR}"
echo "Cleaning working directory..." | tee -a ${LOG}
rm "${WORKDIR}"/* 2>/dev/null
rm "${TEMP}"/* 2>/dev/null
}
uncomp () {
echo "Start decompression T files - ${ROUTE}..." | tee -a ${LOG}
java TSUtil fmgr -w -e -o "${DOSWORLD}" "${DOSWORKDIR}" | tee -a ${LOG}
echo "DOS to UNIX conversions..." | tee -a ${LOG}
dos2unix `ls ${WORKDIR}/*` 2>>${LOG}
echo " " | tee -a ${LOG}
}
removegant () {
for x in `ls ${WORKDIR}`
do
echo "Removing Gantry: ${x}" | tee -a ${LOG}
sed -e '/^\tGantry/,/^\t)/{d;}' ${x} >> ${TEMP}/${x}
done
}
comp () {
cd "${TEMP}"
echo "UNIX to DOS conversions..." | tee -a ${LOG}
unix2dos `ls ${TEMP}/*.w` 2>>${LOG}
echo "TEXT to UNI conversions..." | tee -a ${LOG}
for x in `ls`
do
echo "Processing ${TEXT2UNI} ${x}"
"${TEXT2UNI}" ${x} 2>>${LOG}
done
echo " " | tee -a ${LOG}
echo "Start compressing T files - ${ROUTE}..." | tee -a ${LOG}
java TSUtil fmgr -w -e -o "${DOSTEMP}" "${DOSWORLD}" | tee -a ${LOG}
}
###START###
declaration
date > ${LOG}
cleanup
uncomp
removegant
comp
date >> ${LOG}
Regards,
Scott