How To: Create a link file from a link coverage for WARP


The AML in this article allows you to convert your link coverages to link files.


  1. Start a text editor.
  2. Copy this AML:

    /* ================================================
    /* linkcov2file.aml
    /* Convert link coverage to ASCII link file
    /* USAGE: &RUN linkcov2file.aml <incover> <outfile>
    /* ================================================
    &args incov outfile

    edit %incov% link
    select all
    &sv numlinks = [show number selected]

    /* Open file for writing
    &sv outfileunit = [open %outfile% openstat -write]
    &if %openstat% <> 0 &then &return Error %openstat% opening file %filename%

    /* Loop through all links, check for identity links, write file
    &do i = 1 &to %numlinks%
    select $recno = %i%
    &sv fromxy = [show link [show select 1] from]
    &sv toxy = [show link [show select 1] to]
    &if %fromxy% = %toxy% &then ~
    &ty Identity link - not written to output
    /* If identity tics, do not write
    &else &sv writestat = [write %outfileunit% %fromxy%,%toxy%]

    /* Close write file
    &sv x = [close %outfileunit%]

  3. Save the file as linkcov2file.aml. Make sure your editor does not append any other extension.
  4. Run the AML in the same workspace as the link coverage.

    Arc: &RUN linkcov2file.aml mylincov mylinkfile.txt