HOW TO

Create a link file from a link coverage for WARP

Last Published: April 25, 2020

Summary

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

Procedure



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

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

    arcedit
    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%]
    &end

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

  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.

    Code:
    Arc: &RUN linkcov2file.aml mylincov mylinkfile.txt

Article ID:000004406

Software:
  • Legacy Products

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options