HOW TO
1) COVER.STDDB
2) COVER.DMRS
3) COVER.USER
Code:
Arc: RELATE ADD
Relation Name: STDDB
Table Identifier: COVER.STDDB
Database Name: INFO
INFO Item: COVER-ID
Relate Column: COVER-ID
Relate Type: ORDERED
Relate Access: RW
Relation Name: STD-REL
Table Identifier: COVER.DAT ----> Where this is the converted external
database file.
Database Name: INFO
INFO Item: MSLINK
Relate Column: MSLINK ----> This is the key field for standard database
linkages.
Relate Type: ORDERED
Relate Access: RW
Code:
Arcplot: reselect cover arc stddb//std-rel//item = 20
Code:
/* LISTATTRIB.AML
/*
/*P-----------------------------PURPOSE--------------------------------------
/*
/* This aml lists all database linkage attributes after a design file
/* is converted to a coverage. The external database file must be converted
/* to an INFO table, that is related to the feature attribute table by a
/* previously defined relate. It is for arcs only. The aml must be run in
/* ARCPLOT.
/*
/* Relate Example:
/* Arcplot: relate add
/* Relation Name: dmrs
/* Table Identifier: soils2.dmrs
/* Database Name: info
/* INFO Item: soils2-id
/* Relate Column: soils2-id
/* Relate Type: ordered
/* Relate Access: rw
/*
/*U------------------------------USAGE---------------------------------------
/*
/* &r listattrib <cover> <infofile> <relate_name>
/*
/*V----------------------------VARIABLES-------------------------------------
/*
/* cover: The input annotation coverage
/* infofile: The info file that contains the supplemental data
/* relate_name: relate linking the FAT to the DMRS table
/* database: the type of data base linkage. Either std, dmrs or user.
/*
/*C------------------------------CALLS---------------------------------------
/*
/* GETLIST
/*
/*============================DISCLAIMER=====================================
/*You may use, copy, modify, merge, distribute, alter, reproduce and/or
/*create derivative works of this AML for your own internal use. All rights
/*not specifically granted herein are reserved to ESRI.
/*
/*THIS AML IS PROVIDED "AS-IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS
/*OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
/*MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, WITH RESPECT TO THE
/*AML.
/*
/*ESRI shall not be liable for any damages under any theory of law related
/*to your use of this AML, even if ESRI is advised of the possibilities of
/*such damage. This AML is not supported by ESRI.
/*===========================================================================
&arg cover infofile relate_name type
&if %type% cn 'std' &then &do
&sv item = mslink
&sv name = Mslink
&end
&if %type% cn 'dmrs' &then &do
&sv item = occur
&sv name = Occurrence
&end
&if %type% cn 'user' &then &do
&sv item = [response 'Enter the key item name']
&sv name = %item%
&end
&severity &error &routine bailout
/* Declare and open cursor
cursor rel declare %cover% arc
cursor rel open
cursor rel first
/* Step thru each feature in the currently selected set
&do &while %:rel.AML$NEXT%
&set feature [value :rel.%cover%-id]
&type
&type Feature [translate %cover%-id] = %feature%
cursor rel relate %relate_name% first
/* Loop thru each related record in JOIN table
&do &while [value :rel.%relate_name%//AML$NEXT]
&set record := [value :rel.%relate_name%//%item%]
&type %name% = %record%
&type
&call getlist
cursor rel relate %relate_name% next
&end
cursor rel next
&end
cursor rel (!close remove!)
&return
&routine getlist
/* routine to list all items in related table
/* workaround for problem specifying ^relate
reselect %infofile% INFO %item% = %record%
list %infofile%
aselect %infofile% INFO
&pause &seconds 4
&return
&routine bailout
&severity &error &ignore
&sv stat = [extract 2 [show cursor rel]]
&call exit
&return &error Bailing out of listjoin.aml due to error
&routine exit
&if not stat = OPEN &then cursor rel (!close remove!)
&return
Get help from ArcGIS experts
Download the Esri Support App