&rem NEAT.SML &rem **** use single poly coverage or reselected poly ***************** &rem **** as mask/neatline in ARCPLOTW ******************************** &rem Original version: 10/9/95 mtc &rem Revised for 3.5.2: 1/27/99 &goto usage &if &eq "x%-1" "x" &goto usage &if &eq "x%-1" "x/?" &sv -11 %-1 &value -12 WKSP &rem **** check validity of argument ********************************** &goto *FALSE0000* &if &NF %-12neat & DELETE %-12neat -NQ &LABEL *FALSE0000* &goto *FALSE0001* &if &FN %-11 &type "ERROR: Coverage not found." &return &LABEL *FALSE0001* &goto *FALSE0002* &if &FN %-11\pal &type "ERROR: Coverage is not polygon coverage." &return &LABEL *FALSE0002* STATISTICS %-11 POLY AREA SHOW STATISTICS -1 -2 -3 -4 -5 &goto *FALSE0003* &if &EQ %-1 1 &goto *TRUE_0004* &if &NE %-1 2 &goto *FALSE0004* &if &EQ %-4 0 &LABEL *TRUE_0004* &type "ERROR: Only one polygon may be used as neatline" &return &LABEL *FALSE0004* &LABEL *FALSE0003* &rem **** generate selection file ************************************* WIN SEL W %-11 POLY %-12t$neat.sel &rem **** get current directory *************************************** & CD >%-12t$curdir &open %-12t$curdir error &read -1 done &label done &close & DEL %-12t$curdir &value -13 -1 &rem **** generate SMLs to create mask coverage *********************** &openw %-12t$neat1.sml &write "A %-13" &write "GENERATE %-12temp1 %-12t$neat2.sml" &write "EXTRACT %-11 %-12t$neat.sel %-12temp2 POLY" &write "APPEND %-12neat NOTEST NONE %-12t$neat3.sml" &write "BUILD %-12neat POLY" &write "&goto error &if &nf %-12neat\pal" &write "CREATELA %-12neat" &write "BUILD %-12neat POLY" &write "&goto end" &write "&label error" &write "&openw %-12t$neat.err" &write "&write ""Neatline polygon cannot intersect mapextent"" " &write "& DELETE %-12neat -NQ" &write "&closew" &write "&label end" &write "QUIT" &closew &openw %-12t$neat2.sml SHOW MAPEXTENT -1 -2 -3 -4 &write "LINES" &write "101" &write "%-1, %-2" &write "%-1, %-4" &write "%-3, %-4" &write "%-3, %-2" &write "%-1, %-2" &write "END" &write "END" &write "QUIT" &closew &openw %-12t$neat3.sml &write "%-12temp1" &write "%-12temp2" &write "END" &write "Y" &closew WIN RUNW arcx %-12t$neat1.sml &rem **** shade neatline coverage ************************************* &goto *FALSE0005* &if &NF %-12t$neat.err & type %-12t$neat.err &goto *END__0005* &LABEL *FALSE0005* SHADESET hardware.shd RES %-12neat POLY NEAT_ = 2 POLYGONSHADES %-12neat 0 &rem **** get rid of edge speckles ********************************* LINESET HARDWARE.LIN LINESYMBOL 1 LINECOLOR 0 SHOW MAPEXTENT -1 -2 -3 -4 SHOW UNITS -10 UNITS MAP BOX %-1 %-2 %-3 %-4 SHOW MAPLIMITS -1 -2 -3 -4 UNITS PAGE BOX %-1 %-2 %-3 %-4 UNITS %-10 &LABEL *END__0005* &rem **** keep the neatline coverage in case it's wanted ************** & DELETE %-12temp* -NQ & DEL %-12t$neat*.* &return &label usage &type "Usage: &r NEAT [cover]" &type " " &type " cover = polygon coverage to use as mask" &return &label error &type "I/O Error" &return &rem ******************************************************************