home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.infosystems.gis
- Path: sparky!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!hobbes.physics.uiowa.edu!news.iastate.edu!pv141b.vincent.iastate.edu!sheldon
- From: sheldon@iastate.edu (Steve Sheldon)
- Subject: Re: Referencing Blanks in ARC/INFO AML's
- Message-ID: <sheldon.727637943@pv141b.vincent.iastate.edu>
- Sender: news@news.iastate.edu (USENET News System)
- Organization: Iowa State University, Ames IA
- References: <1993Jan21.120634.811@netnews.whoi.edu>
- Date: Thu, 21 Jan 1993 17:39:03 GMT
- Lines: 83
-
- In <1993Jan21.120634.811@netnews.whoi.edu> dsheehan@whsun1.wh.whoi.edu (John F. Kocik) writes:
-
- >A couple of months ago, there was a thread on referencing blanks in text in
- >ARC/INFO amls. I am making a generic mapping package which will run
- >smoother if I create my own keyarea command (so that I may place by map
- >coordinates rather than page units). To do this easily, I need to use
- >blanks in legend entries so that my text is justified.
- >I missed this post. If someone saved this please email or repost.
-
- I saved part of it...
-
- Basically it uses the aml [format <args>] command to pad with spaces.
-
- This was from melton@zen.wes.army.mil
- -------------------------------------------------------
-
- Try this:
- ----- cut here -----
- &args .tmp$var tmp$cnt
-
- /* PAD.AML
- /*
- /* Description: This AML will accept a string, .tmp$var, and
- /* pad it with blanks until it is of length
- /* tmp$cnt.
- /*
- /* Author: R. Eddie Melton, Jr
- /* Atlantic Research Corporation
- /* US Army Corps of Engineers
- /* Waterways Experiment Station
- /* Vicksburg, MS
-
- &if [null %.tmp$var%] &then &goto usage
- &if [null %tmp$cnt%] &then &goto usage
-
- &s .tmp$str := [value %.tmp$var%]
-
- &s tmp$reps := %tmp$cnt% - [length %.tmp$str%]
-
- &do tmp$I = 1 &to %tmp$reps% &by 1
- &s .tmp$str := [format ' %1%' %.tmp$str%]
- &end
-
- &s %.tmp$var% := %.tmp$str%
-
- &dv tmp$I
- &dv tmp$cnt
- &dv tmp$reps
- &dv .tmp$var
- &dv .tmp$str
-
- &return
- &end
-
- /*
- /* Display usage
- /*
- &label usage
- &type Usage: PAD <variable name> <desired length>
- &return
- ----- cut here -----
-
- Call this from the command line or an aml with:
-
- &run pad <variable name> <desired length>
-
- do not use the %s with the variable name.
-
- Eddie Melton
-
- _______________________________________________________________________________
- --------------------------------------+----------------------------------------
- R. Eddie Melton, Jr., (EN-C) | E-mail: melton@zen.wes.army.mil
- Atlantic Research Corporation | melton@mc1.wes.army.mil
- Waterways Experiment Station |
- 3909 Halls Ferry Road | Voice: (601) 634-2373
- Vicksburg, MS 39180 | Fax: (601) 634-3726
- --------------------------------------+----------------------------------------
- --
- sheldon@iastate.edu Steve Sheldon
- Project Vincent ICSS Resource Unit
- SCO ODT, Arc/Info, Atlas GIS 2142 Agronomy Hall
- Iowa State University
-